aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_refinement.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_refinement.rb')
-rw-r--r--test/ruby/test_refinement.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 9d8bb92648..618175f931 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -2322,6 +2322,34 @@ class TestRefinement < Test::Unit::TestCase
assert_equal(:ok, RefineInUsing.test)
end
+ class Bug16242
+ module OtherM
+ end
+
+ module M
+ prepend OtherM
+
+ refine M do
+ def refine_method
+ "refine_method"
+ end
+ end
+ using M
+
+ def hoge
+ refine_method
+ end
+ end
+
+ class X
+ include M
+ end
+ end
+
+ def test_refine_prepended_module
+ assert_equal("refine_method", Bug16242::X.new.hoge)
+ end
+
private
def eval_using(mod, s)