summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-08-27 21:55:45 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-08-27 21:55:45 +0900
commit43b93126e79e4c3f137b0f75aa887c103ffd6511 (patch)
tree20bd654bcf924e1e4cebfd651111ab57cc5881de /test
parent1a45447b8b66159a4a7d0348c4a01a175b3778fd (diff)
parent69e835cd0f1ab24da191e8c09e23288bf64a2fcf (diff)
downloadmruby-43b93126e79e4c3f137b0f75aa887c103ffd6511.tar.gz
mruby-43b93126e79e4c3f137b0f75aa887c103ffd6511.zip
Merge pull request #2925 from suzukaze/test-string-freeze
Add String#freeze test
Diffstat (limited to 'test')
-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
+