test_proc.rb: test_local_variables

* test/ruby/test_proc.rb (test_local_variables): missing test for
  Binding#local_variables.  [Feature #8773]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-07-01 17:14:22 +00:00
parent d34c478634
commit bc1fafaea3

View File

@ -1251,6 +1251,11 @@ class TestProc < Test::Unit::TestCase
binding binding
end end
def test_local_variables
b = get_binding
assert_equal(%i[if case when begin end a], b.local_variables)
end
def local_variables_of(bind) def local_variables_of(bind)
this_should_not_be_in_bind = 2 this_should_not_be_in_bind = 2
bind.local_variables bind.local_variables