Skip to content

Commit

Permalink
fix: catch ruby3.3 format NoMethodError message (#1579)
Browse files Browse the repository at this point in the history
ruby3.3.0dev changes the error messages on NoMethodError with the following
commit / issue:

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

So to catch this new NoMethodError message, modify regex accordingly.

Fixes #1578 .
  • Loading branch information
mtasaka authored Dec 1, 2023
1 parent 5d60245 commit 3654e5c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def subject_handles_nil_delegate_object?
false
rescue NoMethodError => e
if e.message =~
/undefined method `#{delegate_method}' for nil:NilClass/
/undefined method `#{delegate_method}' for nil/
false
else
raise e
Expand Down

0 comments on commit 3654e5c

Please sign in to comment.