* [ruby-core:91723] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name
[not found] <redmine.issue-15647.20190308230637@ruby-lang.org>
@ 2019-03-08 23:06 ` localhostdotdev
2019-03-08 23:14 ` [ruby-core:91724] " drbrain
2019-03-08 23:36 ` [ruby-core:91725] " nobu
2 siblings, 0 replies; 3+ messages in thread
From: localhostdotdev @ 2019-03-08 23:06 UTC (permalink / raw)
To: ruby-core
Issue #15647 has been reported by localhostdotdev (localhost .dev).
----------------------------------------
Bug #15647: Disallow "in" as a keyword argument name
https://bugs.ruby-lang.org/issues/15647
* Author: localhostdotdev (localhost .dev)
* Status: Open
* 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 reversed 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. m(args), m(*args), etc.
Source: https://twitter.com/drbrain/status/1104152696339087361
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:91724] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name
[not found] <redmine.issue-15647.20190308230637@ruby-lang.org>
2019-03-08 23:06 ` [ruby-core:91723] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name localhostdotdev
@ 2019-03-08 23:14 ` drbrain
2019-03-08 23:36 ` [ruby-core:91725] " nobu
2 siblings, 0 replies; 3+ messages in thread
From: drbrain @ 2019-03-08 23:14 UTC (permalink / raw)
To: ruby-core
Issue #15647 has been updated by drbrain (Eric Hodel).
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.
----------------------------------------
Bug #15647: Disallow "in" as a keyword argument name
https://bugs.ruby-lang.org/issues/15647#change-76999
* Author: localhostdotdev (localhost .dev)
* Status: Open
* 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 reversed 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. m(args), m(*args), etc.
Source: https://twitter.com/drbrain/status/1104152696339087361
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:91725] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name
[not found] <redmine.issue-15647.20190308230637@ruby-lang.org>
2019-03-08 23:06 ` [ruby-core:91723] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name localhostdotdev
2019-03-08 23:14 ` [ruby-core:91724] " drbrain
@ 2019-03-08 23:36 ` nobu
2 siblings, 0 replies; 3+ messages in thread
From: nobu @ 2019-03-08 23:36 UTC (permalink / raw)
To: ruby-core
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-08 23:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-15647.20190308230637@ruby-lang.org>
2019-03-08 23:06 ` [ruby-core:91723] [Ruby trunk Bug#15647] Disallow "in" as a keyword argument name localhostdotdev
2019-03-08 23:14 ` [ruby-core:91724] " drbrain
2019-03-08 23:36 ` [ruby-core:91725] " nobu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).