From e94604966572bb43fc887856d54aa54b8e9f7719 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Fri, 18 Jun 2021 17:11:39 +0900 Subject: [WIP] add error_squiggle gem ``` $ ./local/bin/ruby -e '1.time {}' -e:1:in `
': undefined method `time' for 1:Integer (NoMethodError) 1.time {} ^^^^^ Did you mean? times ``` https://bugs.ruby-lang.org/issues/17930 --- test/ruby/test_module.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_module.rb') 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 -- cgit v1.2.1