Disallow "in" as a keyword argument name
in" is a reserved keyword and thus can't be accessed directly anyway.
e.g. the following is a syntax error:
def m(in:); p in; end; m(in: 1)
And as usual, doing
in = 1 doesn't work.
in" could still be passed as a keyword argument if using some kind of catch-all, e.g.
Updated by drbrain (Eric Hodel) over 2 years ago
This would break the Kernel#spawn family's backward compatibility make wrapping methods in this family harder than it already is, as you can work around this with Binding#local_variable_get.
I think this should be rejected.
Updated by nobu (Nobuyoshi Nakada) over 2 years ago
- Status changed from Open to Rejected
- Description updated (diff)
It is known that reserved words can be keyword arguments.
Binding#local_variable_get has been added for that purpose,
if argument for instance.