From 18cdd60101a6041a93b279459fd4042f41dd6131 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 10 Aug 2015 05:12:46 +0900 Subject: [PATCH] Test for prepend + unbound super_method --- test/ruby/test_method.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index da893b0..86f5b15 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -875,6 +875,15 @@ class TestMethod < Test::Unit::TestCase assert_nil(m, bug11419) end + def test_super_method_unbound_with_prepend + c = Class.new { def a; end } + m = Module.new { def a; end } + c.prepend m + super_meth = c.instance_method(:a).super_method + assert_not_nil super_meth + assert_equal c, super_meth.owner + end + def test_super_method_module m1 = Module.new {def foo; end} c1 = Class.new(Derived) {include m1; def foo; end} -- 2.5.0