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
This commit is contained in:
parent
b89367d6d5
commit
80aa1e6218
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user