summaryrefslogtreecommitdiff
path: root/test/ruby/test_name_error.rb
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2021-06-18 17:11:39 +0900
committerYusuke Endoh <[email protected]>2021-06-29 23:45:49 +0900
commite94604966572bb43fc887856d54aa54b8e9f7719 (patch)
tree789d92c232f671c6620af5c4bfd1a3fc0d9d26b3 /test/ruby/test_name_error.rb
parent03dc66449326ce0945c1ccad7f51e57125b2b854 (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_name_error.rb')
-rw-r--r--test/ruby/test_name_error.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_name_error.rb b/test/ruby/test_name_error.rb
index 813a976e96..8fcc2dcb26 100644
--- a/test/ruby/test_name_error.rb
+++ b/test/ruby/test_name_error.rb
@@ -151,6 +151,6 @@ class TestNameError < Test::Unit::TestCase
error = assert_raise(NameError) do
receiver::FOO
end
- assert_equal "uninitialized constant #{'A' * 120}::FOO", error.message
+ assert_match /\Auninitialized constant #{'A' * 120}::FOO$/, error.message
end
end