summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 84e74693aa..3411c3d701 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -267,7 +267,7 @@ class TestModule < Test::Unit::TestCase
].each do |name, msg|
expected = "wrong constant name %s" % name
msg = "#{msg}#{': ' if msg}wrong constant name #{name.dump}"
- assert_raise_with_message(NameError, expected, "#{msg} to #{m}") do
+ assert_raise_with_message(NameError, Regexp.compile(Regexp.quote(expected)), "#{msg} to #{m}") do
yield name
end
end