summaryrefslogtreecommitdiff
path: root/test/stringio/test_stringio.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/stringio/test_stringio.rb')
-rw-r--r--test/stringio/test_stringio.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index b7327adced..78718a2d86 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -471,4 +471,13 @@ class TestStringIO < Test::Unit::TestCase
expected_pos += 1
end
end
+
+ def test_frozen
+ s = StringIO.new
+ s.freeze
+ bug = '[ruby-core:33648]'
+ assert_raise(RuntimeError, bug) {s.puts("foo")}
+ assert_raise(RuntimeError, bug) {s.string = "foo"}
+ assert_raise(RuntimeError, bug) {s.reopen("")}
+ end
end