Commit 731dd78a authored by Christopher Aue's avatar Christopher Aue

Added basic test for calling a missing method through super

parent d077a5f0
......@@ -359,6 +359,26 @@ assert('Kernel#method_missing', '15.3.1.3.30') do
mm_test = MMTestClass.new
assert_equal 'A call to no_method_named_this', mm_test.no_method_named_this
class SuperMMTestClass < MMTestClass
def no_super_method_named_this
super
end
end
super_mm_test = SuperMMTestClass.new
assert_equal 'A call to no_super_method_named_this', super_mm_test.no_super_method_named_this
class NoSuperMethodTestClass
def no_super_method_named_this
super
end
end
no_super_test = NoSuperMethodTestClass.new
begin
no_super_test.no_super_method_named_this
rescue NoMethodError => e
assert_equal "undefined method 'no_super_method_named_this' for #{no_super_test}", e.message
end
a = String.new
begin
a.no_method_named_this
......
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