Fix 36fc1f14 not checking in the right location

This commit is contained in:
Bouke van der Bijl
2016-12-06 14:25:56 -05:00
committed by Clayton Smith
parent db1bd078be
commit 6be5160eb6
2 changed files with 21 additions and 2 deletions
+18
View File
@@ -51,3 +51,21 @@ assert('Can still call super when BasicObject#method_missing is removed') do
end
end
end
assert("NoMethodError#new does not return an exception") do
begin
class << NoMethodError
def new(*)
nil
end
end
assert_raise(TypeError) do
Object.q
end
ensure
class << NoMethodError
remove_method :new
end
end
end