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

Suppress unhelpful warnings on Ruby 2.7 #112

Merged
merged 1 commit into from
Jun 24, 2021
Merged

Suppress unhelpful warnings on Ruby 2.7 #112

merged 1 commit into from
Jun 24, 2021

Commits on Jun 23, 2021

  1. Suppress unhelpful warnings on Ruby 2.7

    Calling `[Attribute#default_value]` on record initialized with a
    `:default_value` triggered the following warning:
    
    ```
    instance variable @default_value_or_lambda not initialized
    ```
    
    The warning's not particularly useful as the caller will simply get a
    `nil` and carry on anyway[1]. By setting the variable to `nil` for
    records without a `:default_value` we maintain this behaviour and
    suppress the warning.
    
    [1]: Later versions of Ruby simply suppress this warning
    clowder committed Jun 23, 2021
    Configuration menu
    Copy the full SHA
    91c454e View commit details
    Browse the repository at this point in the history