From: nobu@... Date: 2019-03-08T23:36:18+00:00 Subject: [ruby-core:91725] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name Issue #15647 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Rejected Description updated It is known that reserved words can be keyword arguments. And `Binding#local_variable_get` has been added for that purpose, `if` argument for instance. ---------------------------------------- Bug #15647: Disallow "in" as a keyword argument name https://bugs.ruby-lang.org/issues/15647#change-77000 * Author: localhostdotdev (localhost .dev) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- "`in`" is a reserved keyword and thus can't be accessed directly anyway. e.g. the following is a syntax error: ```ruby 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. `m(args)`, `m(*args)`, etc. Source: https://twitter.com/drbrain/status/1104152696339087361 -- https://bugs.ruby-lang.org/ Unsubscribe: