diff options
Diffstat (limited to 'bootstraptest/test_yjit.rb')
-rw-r--r-- | bootstraptest/test_yjit.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index e50d78a9dc..2ac37df0a2 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1,3 +1,15 @@ +assert_normal_exit %q{ + # regression test for a leak caught by an asert on --yjit-call-threshold=2 + Foo = 1 + + eval("def foo = [#{(['Foo,']*256).join}]") + + foo + foo + + Object.send(:remove_const, :Foo) +} + assert_equal '[nil, nil, nil, nil, nil, nil]', %q{ [NilClass, TrueClass, FalseClass, Integer, Float, Symbol].each do |klass| klass.class_eval("def foo = @foo") |