You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, in order for that snippet to work, I have to pass some value (empty hash) to the #call method.
That snippet would fail due to the fact, that default argument is nil.
The second aspect is about explicitness of what we're trying to achieve. With nil as default value protocol makes unexpected decision for me.
Thanks in advance, waiting for your comments. :)
The text was updated successfully, but these errors were encountered:
Hi guys.
Do we have some kind of motivation to set the value of env to
nil
?Cause, to my mind, it makes some features of current Ruby usable only in certain ways.
For example - keyword arguments:
So, in order for that snippet to work, I have to pass some value (empty hash) to the
#call
method.That snippet would fail due to the fact, that default argument is
nil
.The second aspect is about explicitness of what we're trying to achieve. With
nil
as default value protocol makes unexpected decision for me.Thanks in advance, waiting for your comments. :)
The text was updated successfully, but these errors were encountered: