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

Catch error and warn if unable to remove a method #750

Merged
merged 1 commit into from
Mar 18, 2019

Commits on Mar 18, 2019

  1. Catch error and warn if unable to remove a method

    In some cases there can be a method that's detected with
    `method_defined?`, but which cannot be removed with `remove_method`,
    even though it's on the same class. The only case so far that we've
    noticed this is when a class is reopened for monkey patching like in
    issue #749.
    
    We'll still try to discourage this sort of use, but here we swallow the
    error and issue a warning so at least the program doesn't crash.
    
    Fixes #749.
    brandur committed Mar 18, 2019
    Configuration menu
    Copy the full SHA
    8702e71 View commit details
    Browse the repository at this point in the history