summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-03-01 13:00:15 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-17 11:12:44 +0900
commitdc1081f3ca02f740d7e123658e3d0b32b51ac1aa (patch)
treec92c46d9fd471e54bb1b78572f8093976c262dfb
parent3a69ee35ef3e536ca616770906a4099d40b73c70 (diff)
downloadbundler-dc1081f3ca02f740d7e123658e3d0b32b51ac1aa.tar.gz
Removed compatibility hack for old rubies.
-rw-r--r--lib/bundler/env.rb10
-rw-r--r--lib/bundler/gem_helper.rb29
-rw-r--r--lib/bundler/installer/parallel_installer.rb4
3 files changed, 9 insertions, 34 deletions
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
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index 29dee3e514..469b15b96c 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -91,10 +91,6 @@ module Bundler
end
def call
- # Since `autoload` has the potential for threading issues on 1.8.7
- # TODO: remove in bundler 2.0
- require "bundler/gem_remote_fetcher" if RUBY_VERSION < "1.9"
-
check_for_corrupt_lockfile
if @size > 1