Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Correctable#original_message skip prepended method definitions #152

Merged
merged 1 commit into from Jun 28, 2021

Commits on Jun 18, 2021

  1. 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`.
    mame committed Jun 18, 2021
    Configuration menu
    Copy the full SHA
    8352c15 View commit details
    Browse the repository at this point in the history