From a27564377f2c52189860b1c1d6bbdd2c55725397 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 31 Oct 2015 05:19:36 +0000 Subject: test_super.rb: test_missing_super * test/ruby/test_super.rb (test_missing_super): test for the simple case super method is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_super.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index 535383ee80..4f439a6e72 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -403,6 +403,13 @@ class TestSuper < Test::Unit::TestCase assert_equal([1, 2, 3, false, 5], y.foo(1, 2, 3, false, 5)) end + def test_missing_super + o = Class.new {def foo; super; end}.new + e = assert_raise(NoMethodError) {o.foo} + assert_same(o, e.receiver) + assert_equal(:foo, e.name) + end + def test_missing_super_in_method_module bug9315 = '[ruby-core:59358] [Bug #9315]' a = Module.new do -- cgit v1.2.3