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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Calling
[Attribute#default_value]
on record initialized with a:default_value
triggered the following warning:The warning's not particularly useful as the caller will simply get a
nil
and carry on anyway[1]. By setting the variable tonil
for records without a:default_value
we maintain this behaviour and suppress the warning.[1]: Later versions of Ruby simply suppress this warning
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.