summaryrefslogtreecommitdiffhomepage
path: root/test/t/array.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2016-12-11 01:45:38 +0900
committerTakashi Kokubun <[email protected]>2016-12-11 03:44:15 +0900
commit10bb7ad693e7c7443de924a39c1fedb4461108ba (patch)
tree8ba3d7bd9992f0097f99a034012565adb43c4d4a /test/t/array.rb
parent3cc913490b708fe4d0e78e48f86e6e39cf3d8576 (diff)
downloadmruby-10bb7ad693e7c7443de924a39c1fedb4461108ba.tar.gz
mruby-10bb7ad693e7c7443de924a39c1fedb4461108ba.zip
Implement Object#freeze
Diffstat (limited to 'test/t/array.rb')
-rw-r--r--test/t/array.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/array.rb b/test/t/array.rb
index 9cc2f64ad..cf7ed4704 100644
--- a/test/t/array.rb
+++ b/test/t/array.rb
@@ -373,3 +373,10 @@ assert("Array#rindex") do
$a = [2, 3, 4, 5, 6, 7, 8, 9, 10, Sneaky.new]
assert_equal 0, $a.rindex(1)
end
+
+assert('Array#freeze') do
+ a = [].freeze
+ assert_raise(RuntimeError) do
+ a[0] = 1
+ end
+end