Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions io = STDOUT.dup assert_equal("#<IO:<STDOUT>>", io.inspect) io = File.open("/tmp/foo", "w") io2 = io.dup assert_equal("#<File:/tmp/foo>", io2.inspect) io.close r, w = IO.pipe io = r.dup assert_match(/#<IO:fd \d+>/, io.inspect) f = File.open("/tmp/foo", "w") w.reopen(f) assert_equal("/tmp/foo", w.path) puts :ok }}}
- Loading branch information