mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
abbe73bf02
commit
a27564377f
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue