summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-06 14:34:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-06 14:34:18 +0000
commit7dfbcc85d2e31fcb9af50c66486e82e1bc4dc2df (patch)
tree2215efa0ea562960daf05d53a234999b89ad32ff /test
parent15bd216c7c1c9a2b393981a12ee8873a5ea3e226 (diff)
test_super.rb: test_module_super_in_method_module
* test/ruby/test_super.rb (test_module_super_in_method_module): more test for the case searching super method from a method defined in a module. [ruby-core:59589] [Bug #9315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_super.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index b518aa2914..c5f724ebb8 100644
--- a/test/ruby/test_super.rb
+++ b/test/ruby/test_super.rb
@@ -422,4 +422,22 @@ class TestSuper < Test::Unit::TestCase
b.new.method(:foo).call
end
end
+
+ def test_module_super_in_method_module
+ bug9315 = '[ruby-core:59589] [Bug #9315]'
+ a = Module.new do
+ def foo
+ super
+ end
+ end
+ c = Class.new do
+ def foo
+ :ok
+ end
+ end
+ o = c.new.extend(a)
+ assert_nothing_raised(NoMethodError, bug9315) do
+ assert_equal(:ok, o.method(:foo).call, bug9315)
+ end
+ end
end