mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add String#freeze test
This commit is contained in:
@@ -542,3 +542,11 @@ assert('String#each_byte') do
|
||||
|
||||
assert_equal bytes1, bytes2
|
||||
end
|
||||
|
||||
assert('String#freeze') do
|
||||
str = "hello"
|
||||
str.freeze
|
||||
|
||||
assert_raise(RuntimeError) { str.upcase! }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user