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

config: return nil on unknown option instead of raising #2126

Merged
merged 1 commit into from Apr 12, 2020

Commits on Apr 12, 2020

  1. config: return nil on unknown option instead of raising

    Returning `nil` on unknown option was default behaviour for Pry v0.12.x. In
    e5556a2 I changed that but I am not sure if it
    was intentional. This breaks plugins such as
    pry-theme (kyrylo/pry-theme#59).
    
    Returning `nil` makes more sense, because we can write code like this:
    
    ```
    Pry.config.foo ||= 123
    ```
    
    ...whereas as of now this is no longer possible and you would need to use
    `respond_to?` to achieve the same effect.
    kyrylo committed Apr 12, 2020
    Copy the full SHA
    5dd061c View commit details
    Browse the repository at this point in the history