Project

General

Profile

« Previous | Next » 

Revision 809f1203

Added by mame (Yusuke Endoh) over 4 years ago

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