This bug was introduced in Ruby 1.8.3 and still exists as of the nightly snapshot as of 30-Jun-2006, so I didn't want
it forgotten.
class Foo < IO
def close
STDOUT.puts "Hello"
super
end
end
if $0 == __FILE__
Foo.open(File.open("testio.txt","w+").fileno){ |fh|
fh.puts "hello"
}
end
djberge@~/programming/ruby-514>ruby -v
ruby 1.8.2 (2004-12-25) [sparc-solaris2.10]
djberge@~/programming/ruby-515>ruby iotest.rb
Hello
djberge@~/programming/ruby-516>/opt/bin/ruby -v
ruby 1.8.5 (2006-06-29) [sparc-solaris2.10]
djberge@~/programming/ruby-517>/opt/bin/ruby iotest.rb
I originally reported this in ruby-core: 6911.
- Dan |