summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 05:19:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 05:19:36 +0000
commita27564377f2c52189860b1c1d6bbdd2c55725397 (patch)
tree358a8da92c6890663f9c6de362ecb76438845d0d /test
parentabbe73bf028ce05949fde6c067df3a0f302f6d7f (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_super.rb7
1 files changed, 7 insertions, 0 deletions
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