diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 05:19:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 05:19:36 +0000 |
commit | ea1eca002e6432203cc13079f4edd7686ce722e2 (patch) | |
tree | 358a8da92c6890663f9c6de362ecb76438845d0d /test/ruby/test_super.rb | |
parent | 6128c252f396d788cbe2abbbbb7a36f7b411741f (diff) | |
download | ruby-ea1eca002e6432203cc13079f4edd7686ce722e2.tar.gz |
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/ruby/test_super.rb')
-rw-r--r-- | test/ruby/test_super.rb | 7 |
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 |