test/-ext-/array/test_to_ary_concat.rb
raw| 1 | # frozen_string_literal: false |
| 2 | require 'test/unit' |
| 3 | require '-test-/array/to_ary_concat' |
| 4 | |
| 5 | class TestConcatStress < Test::Unit::TestCase |
| 6 | def setup |
| 7 | @stress_level = GC.stress |
| 8 | GC.stress = true |
| 9 | end |
| 10 | |
| 11 | def teardown |
| 12 | GC.stress = @stress_level |
| 13 | end |
| 14 | |
| 15 | def test_concat |
| 16 | arr = [nil] |
| 17 | bar = Bug::Bar.new |
| 18 | arr.concat(bar) |
| 19 | end |
| 20 | end |