diff options
author | Bundlerbot <bot@bundler.io> | 2019-01-23 11:31:32 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-01-23 11:31:32 +0000 |
commit | 1b2559ab57da944e92f93db61a0a322642cd0b31 (patch) | |
tree | 8c07ef3b6b36df23e241b87f8f623137a67a0641 | |
parent | ab06ed2e865cb40c75c83bc76bb7161277d6a185 (diff) | |
parent | 5be598bec45b571c5ec6e0637f5ecd56c1add458 (diff) | |
download | bundler-1b2559ab57da944e92f93db61a0a322642cd0b31.tar.gz |
Merge #6315
6315: Removed compatibility hack for old rubies. r=hsbt a=hsbt
### What was the end-user problem that led to this PR?
Nothing.
### What is your fix for the problem, implemented in this PR?
Bundler will never use them in version 2.
Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | lib/bundler/env.rb | 10 | ||||
-rw-r--r-- | lib/bundler/gem_helper.rb | 29 |
3 files changed, 9 insertions, 33 deletions
diff --git a/.travis.yml b/.travis.yml index 02c60d693c..a1ab44d7f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,9 +78,6 @@ jobs: - rvm: 2.6.0 env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98 stage: test - - rvm: 1.8.7 - env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98 - stage: test allow_failures: - rvm: ruby-head diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb index 51738139fa..9cd9b8baca 100644 --- a/lib/bundler/env.rb +++ b/lib/bundler/env.rb @@ -70,14 +70,8 @@ module Bundler def self.ruby_version str = String.new("#{RUBY_VERSION}") - if RUBY_VERSION < "1.9" - str << " (#{RUBY_RELEASE_DATE}" - str << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL - str << ") [#{RUBY_PLATFORM}]" - else - str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL - str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]" - end + str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL + str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]" end def self.git_version diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 8ed1af231f..ca39f122e9 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -187,28 +187,13 @@ module Bundler out end - if RUBY_VERSION >= "1.9" - def sh_with_status(cmd, &block) - Bundler.ui.debug(cmd) - SharedHelpers.chdir(base) do - outbuf = IO.popen(cmd, :err => [:child, :out], &:read) - status = $? - block.call(outbuf) if status.success? && block - [outbuf, status] - end - end - else - def sh_with_status(cmd, &block) - cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin) - cmd += " 2>&1" - outbuf = String.new - Bundler.ui.debug(cmd) - SharedHelpers.chdir(base) do - outbuf = `#{cmd}` - status = $? - block.call(outbuf) if status.success? && block - [outbuf, status] - end + def sh_with_status(cmd, &block) + Bundler.ui.debug(cmd) + SharedHelpers.chdir(base) do + outbuf = IO.popen(cmd, :err => [:child, :out], &:read) + status = $? + block.call(outbuf) if status.success? && block + [outbuf, status] end end |