diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/stringio/test_stringio.rb | 9 |
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 |