[macruby-changes] [MacRuby/MacRuby] 4081b7: StringIO#reopen will copy status of passed object ...
noreply at github.com
noreply at github.com
Tue Apr 5 09:18:04 PDT 2011
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: 4081b721c7deb2c8e019b2af5e80b5dadb05e385
https://github.com/MacRuby/MacRuby/commit/4081b721c7deb2c8e019b2af5e80b5dadb05e385
Author: Watson <watson1978 at 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
}}}
More information about the macruby-changes
mailing list