summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-06-18 17:11:39 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-06-29 23:45:49 +0900
commite94604966572bb43fc887856d54aa54b8e9f7719 (patch)
tree789d92c232f671c6620af5c4bfd1a3fc0d9d26b3 /test/ruby/test_module.rb
parent03dc66449326ce0945c1ccad7f51e57125b2b854 (diff)
downloadruby-e94604966572bb43fc887856d54aa54b8e9f7719.tar.gz
[WIP] add error_squiggle gem
``` $ ./local/bin/ruby -e '1.time {}' -e:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError) 1.time {} ^^^^^ Did you mean? times ``` https://bugs.ruby-lang.org/issues/17930
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