diff options
Diffstat (limited to 'test/ruby/test_refinement.rb')
-rw-r--r-- | test/ruby/test_refinement.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index 6a1a1ccf80..fe1e23b656 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -520,4 +520,14 @@ class TestRefinement < Test::Unit::TestCase } assert_equal({c2 => c2_ext}, m2.refinements) end + + def test_refine_without_block + c1 = Class.new + e = assert_raise(ArgumentError) { + Module.new do + refine c1 + end + } + assert_equal("no block given", e.message) + end end |