summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-20 05:45:53 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-20 05:45:53 +0000
commit28f249a75bb6d6d15ba3ad558af6a5d9d4c650d0 (patch)
treea9edc99173c7b287b9606f8aea51c95a70f0dff3 /test
parent13d3a280490bee122444b3398b6bd2a489c5ca08 (diff)
merge revision(s) 48000: [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_0_0@48048 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 8e7416b333..af24ee1361 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -483,4 +483,19 @@ class TestEval < Test::Unit::TestCase
fname = "\u{3042}".encode("euc-jp")
assert_equal(fname, eval("__FILE__", nil, fname, 1))
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