aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-18 04:29:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-18 04:29:05 +0000
commit01082829f5a77352dd886bbfcca526e6e2961a81 (patch)
tree8aa124d2bdab5d47b1b43f54736fedd890af9fbe /test
parentc663d9fb61a7831c4c76be07931fa35272c82f82 (diff)
downloadruby-01082829f5a77352dd886bbfcca526e6e2961a81.tar.gz
test_string.rb: chomp! frozen string
* test/ruby/test_string.rb (TestString#test_chomp): should raise if frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb3
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