update NoMethodError tests; ref #3291

parent 8f510be2
...@@ -22,7 +22,7 @@ assert('NoMethodError#args', '15.2.32.2.1') do ...@@ -22,7 +22,7 @@ assert('NoMethodError#args', '15.2.32.2.1') do
end end
assert('Can still raise when BasicObject#method_missing is removed') do assert('Can still raise when BasicObject#method_missing is removed') do
assert_raise(TypeError) do assert_raise(NoMethodError) do
begin begin
BasicObject.alias_method(:old_method_missing, :method_missing) BasicObject.alias_method(:old_method_missing, :method_missing)
BasicObject.remove_method(:method_missing) BasicObject.remove_method(:method_missing)
...@@ -35,7 +35,7 @@ assert('Can still raise when BasicObject#method_missing is removed') do ...@@ -35,7 +35,7 @@ assert('Can still raise when BasicObject#method_missing is removed') do
end end
assert('Can still call super when BasicObject#method_missing is removed') do assert('Can still call super when BasicObject#method_missing is removed') do
assert_raise(TypeError) do assert_raise(NoMethodError) do
class A class A
def foo def foo
super super
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment