diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 23:27:30 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 23:27:30 +0000 |
commit | 5307d803f5cce7b14a6afd1d51f6d53ec85ca87d (patch) | |
tree | aac2997a9ff000fbf2f1f9f27077bb7b2403f2c9 /lib/rubygems/util.rb | |
parent | b1529a30e08040b717adef8ac1fa8be1c060e7e1 (diff) | |
download | ruby-5307d803f5cce7b14a6afd1d51f6d53ec85ca87d.tar.gz |
* lib/rubygems: Update to RubyGems master 50a8210. Important changes
in this commit:
RubyGems now automatically checks for gem.deps.rb or Gemfile when
running ruby executables. This behavior is similar to `bundle exec
rake`. This change may be reverted before Ruby 2.1.0 if too many bugs
are found.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/util.rb')
-rw-r--r-- | lib/rubygems/util.rb | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/rubygems/util.rb b/lib/rubygems/util.rb index af53e599b5..42663974a5 100644 --- a/lib/rubygems/util.rb +++ b/lib/rubygems/util.rb @@ -40,27 +40,24 @@ module Gem::Util # for a command. def self.popen *command - begin - r, = IO.popen command, &:read - rescue TypeError # ruby 1.8 only supports string command - r, w = IO.pipe + IO.popen command, &:read + rescue TypeError # ruby 1.8 only supports string command + r, w = IO.pipe - pid = fork do - STDIN.close - STDOUT.reopen w + pid = fork do + STDIN.close + STDOUT.reopen w - exec(*command) - end + exec(*command) + end - w.close + w.close - begin - return r.read - ensure - Process.wait pid - end + begin + return r.read + ensure + Process.wait pid end - end end |