summaryrefslogtreecommitdiff
path: root/test/stringio
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-09 07:34:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-09 07:34:39 +0000
commit2e02f2dfd2dab936e7cd9a68d46bd910c5d184e5 (patch)
treee01a27c2c8dd86a6e66eede5c517f748c2749fa2 /test/stringio
parent5c87e39165b7c736224e134d0ed216914c81ccb1 (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@49905 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 07d89d16e1..6ba1e25791 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -193,12 +193,12 @@ class TestStringIO < Test::Unit::TestCase
def test_close
f = StringIO.new("")
f.close
- assert_raise(IOError) { f.close }
+ assert_nil(f.close)
f = StringIO.new("")
f.close_read
f.close_write
- assert_raise(IOError) { f.close }
+ assert_nil(f.close)
ensure
f.close unless f.closed?
end