diff options
Diffstat (limited to 'test/ruby/test_super.rb')
-rw-r--r-- | test/ruby/test_super.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index 846f40946d..b518aa2914 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -407,4 +407,19 @@ class TestSuper < Test::Unit::TestCase assert_equal([false, false], y.foo(false, false)) assert_equal([1, 2, 3, false, 5], y.foo(1, 2, 3, false, 5)) end + + def test_missing_super_in_method_module + bug9315 = '[ruby-core:59358] [Bug #9315]' + a = Module.new do + def foo + super + end + end + b = Class.new do + include a + end + assert_raise(NoMethodError, bug9315) do + b.new.method(:foo).call + end + end end |