summaryrefslogtreecommitdiff
path: root/test/ruby/test_proc.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-01 17:14:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-01 17:14:48 +0000
commit02c391a1c90ceb05f5243d1aececc299a2080f76 (patch)
treeee658c0e5442aac3154ebe30686177a481439095 /test/ruby/test_proc.rb
parentbc1fafaea343eddb7f39680c894dff6bc2f201e1 (diff)
proc.c: fix infinite loop
* proc.c (bind_local_variables): update env from envval for each iterations. [ruby-dev:48351] [Bug #10001] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_proc.rb')
-rw-r--r--test/ruby/test_proc.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 4cfbf9a1be..5a22afee85 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -1256,6 +1256,11 @@ class TestProc < Test::Unit::TestCase
assert_equal(%i[if case when begin end a], b.local_variables)
end
+ def test_local_variables_nested
+ b = tap {break binding}
+ assert_equal(%i[b], b.local_variables, '[ruby-dev:48351] [Bug #10001]')
+ end
+
def local_variables_of(bind)
this_should_not_be_in_bind = 2
bind.local_variables