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