diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_string.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index e28dca5012..dc76b53810 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -441,6 +441,9 @@ CODE assert_equal("foo\r", s) assert_equal(S("a").hash, S("a\u0101").chomp!(S("\u0101")).hash, '[ruby-core:22414]') + + s = S("").freeze + assert_raise_with_message(RuntimeError, /frozen/) {s.chomp!} ensure $/ = save end |