summaryrefslogtreecommitdiff
path: root/test/stringio
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-13 06:04:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-13 06:04:39 +0000
commitf75fe0bcc7d1143f33c91ab2096aafcf618394d2 (patch)
tree60422735fa52139bc59eff492dbe636ed3c76249 /test/stringio
parent89bfc9b70b05ac598d24bb712222b79fb9af1880 (diff)
stringio.c: don't raise after close
* ext/stringio/stringio.c (strio_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/stringio')
-rw-r--r--test/stringio/test_stringio.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 6ba1e25..966bbe1 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -207,7 +207,7 @@ class TestStringIO < Test::Unit::TestCase
f = StringIO.new("")
f.close_read
assert_raise(IOError) { f.read }
- assert_raise(IOError) { f.close_read }
+ assert_nothing_raised(IOError) {f.close_read}
f.close
f = StringIO.new("", "w")
@@ -221,7 +221,7 @@ class TestStringIO < Test::Unit::TestCase
f = StringIO.new("")
f.close_write
assert_raise(IOError) { f.write("foo") }
- assert_raise(IOError) { f.close_write }
+ assert_nothing_raised(IOError) {f.close_write}
f.close
f = StringIO.new("", "r")