summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-18 18:35:31 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-18 18:35:31 +0000
commit3e6dbba4e2eabbd639711054233c8325375cdf75 (patch)
tree0fe6aaac2baadde6f92db985d3c878f16485b030 /test
parentb090826d2affbafd84f3cf36b695188c13556534 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_eval.rb15
1 files changed, 15 insertions, 0 deletions
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