From 78a73a538d6779eddbaac947c3d50361b2082a3b Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Mar 2015 14:18:30 +0000 Subject: dir.c: don't raise after close * dir.c (dir_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_dir.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 69ea57d0a7..85247afc17 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -126,6 +126,7 @@ class TestDir < Test::Unit::TestCase def test_close d = Dir.open(@root) d.close + assert_nothing_raised(IOError) { d.close } assert_raise(IOError) { d.read } end -- cgit v1.2.3