From 50cd822f31ced126b4baa1cf30e2e45bbacaee0c Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 7 Aug 2015 08:07:58 +0000 Subject: proc.c: fix for uncallable method * proc.c (method_super_method): uncallable method entry does not have the defined class, use the owner instead. [ruby-core:70254] [Bug #11419] * test/ruby/test_method.rb (test_super_method_unbound): add test by Akira Matsuda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_method.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index b7b140d9a0..da893b0646 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -868,6 +868,11 @@ class TestMethod < Test::Unit::TestCase assert_equal(Base.instance_method(:foo), m, Feature9781) m = assert_nothing_raised(NameError, Feature9781) {break m.super_method} assert_nil(m, Feature9781) + + bug11419 = '[ruby-core:70254]' + m = Object.instance_method(:tap) + m = assert_nothing_raised(NameError, bug11419) {break m.super_method} + assert_nil(m, bug11419) end def test_super_method_module -- cgit v1.2.3