summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r--test/ruby/test_method.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index 0f0807af9da..03a6c560e66 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -1144,6 +1144,19 @@ class TestMethod < Test::Unit::TestCase
assert_nil(m.super_method)
end
+ # Bug 17780
+ def test_super_method_module_alias
+ m = Module.new do
+ def foo
+ end
+ alias :f :foo
+ end
+
+ method = m.instance_method(:f)
+ super_method = method.super_method
+ assert_nil(super_method)
+ end
+
def rest_parameter(*rest)
rest
end