diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-16 21:13:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-16 21:13:10 +0000 |
commit | 0884d0b944de777d22b963dda47294d939c9fd90 (patch) | |
tree | 1c461fb938315f690eae1a3d6f5eb9d88ab63a60 /test/ruby | |
parent | 85ba516877f26444bf9382f19bdb5d94527de945 (diff) | |
download | ruby-0884d0b944de777d22b963dda47294d939c9fd90.tar.gz |
proc.c: fix method proc binding location
* proc.c (proc_binding): use the original iseq on a binding from
proc from method object to get the location.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_proc.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index f760cce3ee..728e2b7987 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -205,6 +205,13 @@ class TestProc < Test::Unit::TestCase assert_instance_of(Binding, b, '[ruby-core:25589]') bug10432 = '[ruby-core:65919] [Bug #10432]' assert_same(self, b.receiver, bug10432) + assert_not_send [b, :local_variable_defined?, :value] + assert_raise(NameError) { + b.local_variable_get(:value) + } + assert_equal 42, b.local_variable_set(:value, 42) + assert_send [b, :local_variable_defined?, :value] + assert_equal 42, b.local_variable_get(:value) end def test_block_given_method |