From aa490f9442c32cd0e1e449ac817f410bd5924c8b Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 29 Sep 2022 12:09:01 +0200 Subject: Reduce diff to proc.c @ b0b9f7201acab05c2a3ad92c3043a1f01df3e17f * So it's easy to review https://github.com/ruby/ruby/pull/6242 + https://github.com/ruby/ruby/pull/6467 and there are less changes overall. --- test/ruby/test_method.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 0b838f5e40..b1eee7381a 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -1063,7 +1063,7 @@ class TestMethod < Test::Unit::TestCase c1.class_eval {undef foo} m = c3.instance_method(:foo) m = assert_nothing_raised(NameError, Feature9781) {break m.super_method} - assert_equal c2, m.owner + assert_nil(m, Feature9781) end def test_super_method_removed_regular @@ -1248,7 +1248,10 @@ class TestMethod < Test::Unit::TestCase assert_equal 1, unbound.bind_call(obj) assert_include b.instance_methods(false), :foo - assert_equal "#", b.instance_method(:foo).inspect + link = 'https://github.com/ruby/ruby/pull/6467#issuecomment-1262159088' + assert_raise(NameError, link) { b.instance_method(:foo) } + # For #test_method_list below, otherwise we get the same error as just above + b.remove_method(:foo) end def test_zsuper_method_removed_higher_method -- cgit v1.2.3