path: root/ext/-test-
diff options
authorYusuke Endoh <>2021-06-18 17:32:47 +0900
committerYusuke Endoh <>2021-06-29 15:49:51 +0900
commit612b6fcd371adc199fb4503941edfdbbac704ef4 (patch)
tree923e8930d2f25a1423327aaeba1491ecba7afbf5 /ext/-test-
parent4670458af890e9430395c7f56cb23437932f7f52 (diff)
Let Correctable#original_message skip prepended method definitions
Previously, DidYouMean::Correctable#original_message did `method(:to_s)` 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)` 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`.
Diffstat (limited to 'ext/-test-')
0 files changed, 0 insertions, 0 deletions