summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-30 14:58:47 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-30 14:58:47 +0000
commite46471e90c656b6a4c0e6c6846040e51448c2255 (patch)
tree159502b64b891de8f284991fbfc8043e880e4943 /test
parent05ba90697f6a717b18bb9111960e157e8e9182eb (diff)
* eval.c (rb_mod_refine): fix the error message when no block is
given. [ruby-dev:46319] [Bug #7244] * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_refinement.rb10
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