diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_io.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index f4b65f7f36..89e347d2b3 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2800,4 +2800,13 @@ End ensure t.kill end + + def test_exception_at_close + bug10153 = '[ruby-core:64463] [Bug #10153] exception in close at the end of block' + assert_raise(Errno::EBADF, bug10153) do + IO.pipe do |r, w| + assert_nothing_raised {IO.open(w.fileno) {}} + end + end + end end |
