diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-01 17:14:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-01 17:14:19 +0000 |
commit | d34c4786345a94c311aef998416858ff4abdf29c (patch) | |
tree | 65ad2853355f839fc43bd3b57fd49a2e6dc38f03 /test/ruby | |
parent | 82de71c2557de9d71c6f86ee866578ecbf9d3fd1 (diff) | |
download | ruby-d34c4786345a94c311aef998416858ff4abdf29c.tar.gz |
test_proc.rb: test_local_variables_in_other_context
* test/ruby/test_proc.rb (test_local_variables_in_other_context):
move from test_variable.rb, this is a test for the method of
Binding, not of Kernel.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_proc.rb | 10 | ||||
-rw-r--r-- | test/ruby/test_variable.rb | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 284b518121..61f8d3b635 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -1251,6 +1251,16 @@ class TestProc < Test::Unit::TestCase binding end + def local_variables_of(bind) + this_should_not_be_in_bind = 2 + bind.local_variables + end + + def test_local_variables_in_other_context + feature8773 = '[Feature #8773]' + assert_equal([:feature8773], local_variables_of(binding), feature8773) + end + def test_local_variable_get b = get_binding assert_equal(0, b.local_variable_get(:a)) diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb index 1c9b60183d..308839df14 100644 --- a/test/ruby/test_variable.rb +++ b/test/ruby/test_variable.rb @@ -95,16 +95,6 @@ class TestVariable < Test::Unit::TestCase assert_equal([:x, :bug9486], x) end - def local_variables_of(bind) - this_should_not_be_in_bind = 2 - bind.local_variables - end - - def test_binding_local_variables - feature8773 = '[Feature #8773]' - assert_equal([:feature8773], local_variables_of(binding), feature8773) - end - def test_global_variable_0 assert_in_out_err(["-e", "$0='t'*1000;print $0"], "", /\At+\z/, []) end |