diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-18 11:46:31 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-18 11:46:31 +0000 |
commit | 231f45ad3626a1c4e9828524ed661771a6793af0 (patch) | |
tree | 271309b86b954299303947848835fc3ed690a046 /test | |
parent | 108627d911260126ca144d2b4b74f3fda3acfabd (diff) | |
download | ruby-231f45ad3626a1c4e9828524ed661771a6793af0.tar.gz |
* 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/trunk@48000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_eval.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb index 2aa5e6b367..315cc72599 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 |