diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-30 08:59:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-30 08:59:16 +0000 |
commit | 499bf746da00eab7b0fc365bec0e791f1ca2b203 (patch) | |
tree | 6fe209baa581b08053a531b0bbe5ad17df8d2222 /lib/rubygems/test_utilities.rb | |
parent | 270ece8441b26dbfbd0ca3fdcb70efec263791a8 (diff) |
* gem_prelude.rb (push_all_highest_version_gems_on_load_path):
simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_utilities.rb')
-rw-r--r-- | lib/rubygems/test_utilities.rb | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb index 85541c9fc3..751c13441b 100644 --- a/lib/rubygems/test_utilities.rb +++ b/lib/rubygems/test_utilities.rb @@ -102,30 +102,17 @@ end #-- # This class was added to flush out problems in Rubinius' IO implementation. -class TempIO - - @@count = 0 - +class TempIO < Tempfile def initialize(string = '') - @tempfile = Tempfile.new "TempIO-#{@@count += 1}" - @tempfile.binmode - @tempfile.write string - @tempfile.rewind - end - - def method_missing(meth, *args, &block) - @tempfile.send(meth, *args, &block) - end - - def respond_to?(meth) - @tempfile.respond_to? meth + super "TempIO" + binmode + write string + rewind end def string - @tempfile.flush - - Gem.read_binary @tempfile.path + flush + Gem.read_binary path end - end |