Issue #1081 has been updated by Roger Pack.

File new.diff added

I was unable to reproduce the odd behavior observed previously by Run Paint Run.

Here is the original diff plus some test cases that cover the corner cases (they don't appear to fail--maybe something else has been fixed since then, allowing things to work right now?)
Maybe somebody can point out a failing test case to me?

Thanks.

 ./ruby  test/ruby/test_io.rb
Loaded suite test/ruby/test_io
Started
...........................................................................................
Finished in 0.687023 seconds.

91 tests, 358 assertions, 0 failures, 0 errors, 0 skips

Test run options: --seed 26858
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1081

----------------------------------------
http://redmine.ruby-lang.org