[MacRuby/MacRuby] 4081b7: StringIO#reopen will copy status of passed object ...
5 Apr
2011
5 Apr
'11
4:18 p.m.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 4081b721c7deb2c8e019b2af5e80b5dadb05e385 https://github.com/MacRuby/MacRuby/commit/4081b721c7deb2c8e019b2af5e80b5dadb... Author: Watson <watson1978@gmail.com> Date: 2011-04-05 (Tue, 05 Apr 2011) Changed paths: M lib/stringio.rb Log Message: ----------- StringIO#reopen will copy status of passed object when was passed non-String Object. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions require 'stringio' f = StringIO.new("qux\nquux\nquuux\n") assert_equal("qux\n", f.gets) f2 = StringIO.new("") assert_equal(0, f2.tell) f2.reopen(f) assert_equal(4, f2.tell) assert_equal("quux\n", f2.gets) puts :ok }}}
5331
Age (days ago)
5331
Last active (days ago)
0 comments
1 participants
participants (1)
-
noreply@github.com