summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_array.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 59e1ad463c..8de51c159d 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -654,6 +654,12 @@ class TestArray < Test::Unit::TestCase
assert_raise(TypeError) { [0].concat(:foo) }
assert_raise(FrozenError) { [0].freeze.concat(:foo) }
+
+ a = @cls[nil]
+ def (x = Object.new).to_ary; Array.new(10) {nil} << :ok; end
+ EnvUtil.under_gc_stress {a.concat(x)}
+ GC.start
+ assert_equal(:ok, a.last)
end
def test_count