diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_refinement.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index e367532ec5..3ca00ed912 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -801,4 +801,25 @@ class TestRefinement < Test::Unit::TestCase p c.foo INPUT end + + def test_circular_using_is_not_allowed + a = Module.new + b = Module.new + + assert_raise ArgumentError do + a.module_eval do + using a + end + end + + b.module_eval do + using a + end + + assert_raise ArgumentError do + a.module_eval do + using b + end + end + end end |