diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-27 08:17:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-27 08:17:26 +0000 |
commit | e45b215fdd16f4fefc8f97f2391ef532f10c8f50 (patch) | |
tree | 55ea62bd06a3c3ad12fab42fbededf22b9e84fa5 /test/ruby/test_proc.rb | |
parent | 9bcf16f01a7d5d3b1e4c19b146a9426b44891a35 (diff) |
proc.c: fix method proc binding receiver
* proc.c (method_proc): the receiver of binding from method should
be same as the receiver of the method.
[ruby-core:65917] [Bug #10432]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_proc.rb')
-rw-r--r-- | test/ruby/test_proc.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 28ba8c9b57..17778dfede 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -202,7 +202,10 @@ class TestProc < Test::Unit::TestCase def test_method_to_proc b = block() assert_equal "OK", b.call - assert_instance_of(Binding, b.binding, '[ruby-core:25589]') + b = b.binding + assert_instance_of(Binding, b, '[ruby-core:25589]') + bug10432 = '[ruby-core:65919] [Bug #10432]' + assert_same(self, b.receiver, bug10432) end def test_block_given_method |