ruby-changes:40428
From: akr <ko1@a...>
Date: Tue, 10 Nov 2015 00:57:17 +0900 (JST)
Subject: [ruby-changes:40428] akr:r52509 (trunk): add a test.
akr 2015-11-10 00:57:07 +0900 (Tue, 10 Nov 2015) New Revision: 52509 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52509 Log: add a test. Modified files: trunk/test/ruby/test_refinement.rb Index: test/ruby/test_refinement.rb =================================================================== --- test/ruby/test_refinement.rb (revision 52508) +++ test/ruby/test_refinement.rb (revision 52509) @@ -1494,6 +1494,35 @@ class TestRefinement < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L1494 INPUT end + def test_reopen_refinement_module + assert_separately([], <<-"end;") + $VERBOSE = nil + class C + end + + module R + refine C do + def m + :foo + end + end + end + + using R + assert_equal(:foo, C.new.m) + + module R + refine C do + def m + :bar + end + end + end + + assert_equal(:bar, C.new.m) + end; + end + private def eval_using(mod, s) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/