1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/did_you_mean
Yusuke Endoh 612b6fcd37 Let Correctable#original_message skip prepended method definitions
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-29 15:49:51 +09:00
..
core_ext Let Correctable#original_message skip prepended method definitions 2021-06-29 15:49:51 +09:00
formatters
spell_checkers Should require "rbconfig" to use RbConfig 2021-06-29 15:49:51 +09:00
did_you_mean.gemspec
experimental.rb
jaro_winkler.rb
levenshtein.rb
spell_checker.rb
tree_spell_checker.rb Sync did_you_mean 2020-06-06 13:02:08 -04:00
verbose.rb
version.rb Start v1.6.0 development 2021-06-29 15:49:51 +09:00