summaryrefslogtreecommitdiffhomepage
path: root/test/t/array.rb
diff options
context:
space:
mode:
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