[ruby/did_you_mean] Support the new message format of NameError in

Ruby 3.3
(https://github.com/ruby/did_you_mean/pull/184)

This change accepts the following change of the message of NameError in
a test.

https://bugs.ruby-lang.org/issues/18285#note-37

```
old: undefined method `sizee' for #<File:...>
new: undefined method `sizee' for an instance of File
```
This commit is contained in:
Yusuke Endoh 2023-02-19 16:10:30 +09:00 коммит произвёл git
Родитель cbac0fa4cb
Коммит 4dc2cb3c1a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -49,7 +49,7 @@ class NameErrorExtensionTest < Test::Unit::TestCase
get_message(error)
assert_equal "undefined method `sizee' for #<File:test_name_error_extension.rb (closed)>",
Marshal.load(Marshal.dump(error)).original_message
assert_match(/^undefined method `sizee' for /,
Marshal.load(Marshal.dump(error)).original_message)
end
end