From 3e6dbba4e2eabbd639711054233c8325375cdf75 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 18 Oct 2014 18:35:31 +0000 Subject: merge revision(s) r48000: [Backport #10368] * vm_core.h, vm.c, proc.c: fix GC mark miss on bindings. [ruby-dev:48616] [Bug #10368] * test/ruby/test_eval.rb: add a test code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@48004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_eval.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb index 2700aa33f3..28d797e2c8 100644 --- a/test/ruby/test_eval.rb +++ b/test/ruby/test_eval.rb @@ -484,4 +484,19 @@ class TestEval < Test::Unit::TestCase assert_same a, b end + + def test_gced_binding_block + assert_normal_exit %q{ + def m + binding + end + GC.stress = true + b = nil + tap do + b = m {} + end + 0.times.to_a + b.eval('yield') + }, '[Bug #10368]' + end end -- cgit v1.2.3