summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-26 13:16:18 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-26 13:16:18 +0000
commit834d2bbe4d63afd855b2e31946b5cbe9b99e9c47 (patch)
treef3a2d58d52f1cacbae3aecc7cf891fd3c05aa971 /test
parent37aec839d67e9691c3616cc257674f719f1590b8 (diff)
* vm_method.c (rb_alias): should resolve refined methods.
[ruby-core:69360] [Bug #11182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_refinement.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index fa8de1b85e..80f44ab706 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -1455,6 +1455,32 @@ class TestRefinement < Test::Unit::TestCase
}
end
+ def test_alias_refined_method2
+ bug11182 = '[ruby-core:69360]'
+ assert_in_out_err([], <<-INPUT, ["C"], [], bug11182)
+ class C
+ def foo
+ puts "C"
+ end
+ end
+
+ module M
+ refine C do
+ def foo
+ puts "Refiend C"
+ end
+ end
+ end
+
+ class D < C
+ alias bar foo
+ end
+
+ using M
+ D.new.bar
+ INPUT
+ end
+
private
def eval_using(mod, s)