aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/test_utilities.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/test_utilities.rb')
-rw-r--r--lib/rubygems/test_utilities.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb
index eed42f59a7..eddabeb6fd 100644
--- a/lib/rubygems/test_utilities.rb
+++ b/lib/rubygems/test_utilities.rb
@@ -168,6 +168,10 @@ end
# This class was added to flush out problems in Rubinius' IO implementation.
class TempIO < Tempfile
+
+ ##
+ # Creates a new TempIO that will be initialized to contain +string+.
+
def initialize(string = '')
super "TempIO"
binmode
@@ -175,6 +179,9 @@ class TempIO < Tempfile
rewind
end
+ ##
+ # The content of the TempIO as a String.
+
def string
flush
Gem.read_binary path