summaryrefslogtreecommitdiffhomepage
path: root/test/t/string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/string.rb')
-rw-r--r--test/t/string.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index ee6fe0848..7326adce9 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -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
+