diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-06-18 17:45:10 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-06-29 15:49:51 +0900 |
commit | 809f1203744e25fc4d095863593edbfb71529249 (patch) | |
tree | 3c939e581d3085f092c5320bfd5893c3e06e14db /test/-ext- | |
parent | 612b6fcd371adc199fb4503941edfdbbac704ef4 (diff) |
Use String#include? instead of end_with? to avoid message duplication
Previously, did_you_mean used `msg.end_with?(suggestion)` to check if
its suggestion is already added.
I'm now creating a gem that also modifies Exception's message. This
breaks did_you_mean's duplication check.
This change makes the check use String#include? instead of end_with?.
https://github.com/ruby/did_you_mean/commit/b35e030549
Diffstat (limited to 'test/-ext-')
0 files changed, 0 insertions, 0 deletions