summaryrefslogtreecommitdiff
path: root/lib/did_you_mean
AgeCommit message (Collapse)Author
2021-06-29Use String#include? instead of end_with? to avoid message duplicationYusuke Endoh
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
2021-06-29Let Correctable#original_message skip prepended method definitionsYusuke Endoh
Previously, DidYouMean::Correctable#original_message did `method(:to_s).super_method.call` to call the original to_s method by skipping Correctable#to_s. I'm now creating a gem that prepends another to_s method to NameError, which confuses the hack. An immediate solution is to replace it with `method(:to_s).super_method.super_method.call` to skip the two methods. But it is too ad-hoc. This changeset uses more extensible approach and allow a prepended module to declare that they should be skipped by defining a constant named `SKIP_TO_S_FOR_SUPER_LOOKUP`. https://github.com/ruby/did_you_mean/commit/8352c154e3
2021-06-29Should require "rbconfig" to use RbConfigNobuyoshi Nakada
https://github.com/ruby/did_you_mean/commit/fbe5aaaae8
2021-06-29Start v1.6.0 developmentYuki Nishijima
https://github.com/ruby/did_you_mean/commit/3f69171813
2020-12-22Sync did_you_meanYuki Nishijima
2020-06-06Remove experimental feaures and related code completelyYuki Nishijima
Original pull request: https://github.com/ruby/did_you_mean/pull/147
2020-06-06Sync did_you_meanYuki Nishijima
Notes: Merged: https://github.com/ruby/ruby/pull/3135
2020-05-12Revert "Sync did_you_mean"Nobuyoshi Nakada
This reverts commit 946dadd3f479198e87873a863d15c7660a8e2b56, which broke `TestGemRequire` and others.
2020-05-11Sync did_you_meanYuki Nishijima
2019-12-24Sync did_you_meanYuki Nishijima
2019-12-13Drop delegate dependencyYuki Nishijima
Original comment: https://github.com/ruby/did_you_mean/commit/2f26c9ee770f28da0942c42cbc9e5800535b75e1
2019-12-05Fix `warning: already initialized constant DidYouMean::VERSION`Kazuhiro NISHIYAMA
``` .../gems/did_you_mean-1.3.1/lib/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION .../lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here ```
2019-12-04Do not attempt to call methods on the receiver if it is a basic objectYuki Nishijima
2019-11-30Promote did_you_mean to default gemKevin Deisz
At the moment, there are some problems with regard to bundler + did_you_mean because of did_you_mean being a bundled gem. Since the vendored version of thor inside bundler and ruby itself explicitly requires did_you_mean, it can become difficult to load it when using Bundler.setup. See this issue: https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482733159 for more details. Notes: Merged: https://github.com/ruby/ruby/pull/2689