summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 d2edd0189..ecec39363 100644
--- a/test/t/array.rb
+++ b/test/t/array.rb
@@ -392,3 +392,10 @@ assert('Array#freeze') do
a[0] = 1
end
end
+
+assert('shared array replace') do
+ a = [0] * 40
+ b = [0, 1, 2]
+ b.replace a[1, 20].dup
+ assert_equal 20, b.size
+end