Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Removed compatibility hack for old rubies. #6315

Merged
4 commits merged into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions lib/bundler/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,8 @@ def self.read_file(filename)

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
Expand Down
29 changes: 7 additions & 22 deletions lib/bundler/gem_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,28 +187,13 @@ def sh(cmd, &block)
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

Expand Down