diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-01 17:14:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-01 17:14:22 +0000 |
commit | bc1fafaea343eddb7f39680c894dff6bc2f201e1 (patch) | |
tree | b6b533fc5da34a9155b66680a98996c3e5cda0b7 /test/ruby | |
parent | d34c4786345a94c311aef998416858ff4abdf29c (diff) | |
download | ruby-bc1fafaea343eddb7f39680c894dff6bc2f201e1.tar.gz |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_proc.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 61f8d3b635..4cfbf9a1be 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -1251,6 +1251,11 @@ class TestProc < Test::Unit::TestCase binding 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) this_should_not_be_in_bind = 2 bind.local_variables |