diff options
author | Yusuke Endoh <[email protected]> | 2021-06-18 17:11:39 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2021-06-29 23:45:49 +0900 |
commit | e94604966572bb43fc887856d54aa54b8e9f7719 (patch) | |
tree | 789d92c232f671c6620af5c4bfd1a3fc0d9d26b3 /test/ruby/test_module.rb | |
parent | 03dc66449326ce0945c1ccad7f51e57125b2b854 (diff) |
[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
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4586
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 2 |
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 |