From dc1081f3ca02f740d7e123658e3d0b32b51ac1aa Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 1 Mar 2018 13:00:15 +0900 Subject: Removed compatibility hack for old rubies. --- lib/bundler/env.rb | 10 ++-------- lib/bundler/gem_helper.rb | 29 +++++++---------------------- lib/bundler/installer/parallel_installer.rb | 4 ---- 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 -- cgit v1.2.1