diff options
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 9fbe321452..54253c1f99 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1605,6 +1605,9 @@ End IO.foreach(t.path, "b", 3) {|x| a << x } assert_equal(["foo", "\nb", "ar\n", "b", "az\n"], a) + bug6054 = '[ruby-dev:45267]' + e = assert_raise(IOError, bug6054) {IO.foreach(t.path, mode:"w").next} + assert_match(/not opened for reading/, e.message, bug6054) end def test_s_readlines |