summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2022-09-29 12:09:01 +0200
committerBenoit Daloze <eregontp@gmail.com>2022-09-29 15:48:35 +0200
commitaa490f9442c32cd0e1e449ac817f410bd5924c8b (patch)
treeba45c08205a2d2644851875eed84eca738a42b93 /test/ruby
parentc6319026caa6c8f0f569f80011e8502349a04b14 (diff)
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.
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_method.rb7
1 files changed, 5 insertions, 2 deletions
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 "#<UnboundMethod: B#foo(*)>", 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