[#76442] [Ruby trunk Feature#11741] Migrate Ruby to Git from Subversion — naruse@...
Issue #11741 has been updated by Yui NARUSE.
3 messages
2016/07/19
[#76515] [Ruby trunk Bug#12610] webrick: protect from httpoxy — nagachika00@...
Issue #12610 has been updated by Tomoyuki Chikanaga.
3 messages
2016/07/22
[ruby-core:76416] [Ruby trunk Feature#11813][Rejected] Extend safe navigation operator for [] and []= with syntax sugar
From:
matz@...
Date:
2016-07-19 06:32:31 UTC
List:
ruby-core #76416
Issue #11813 has been updated by Yukihiro Matsumoto.
Status changed from Open to Rejected
Use #dig for referencing the value.
For updating, show us use cases.
Matz.
----------------------------------------
Feature #11813: Extend safe navigation operator for [] and []= with syntax sugar
https://bugs.ruby-lang.org/issues/11813#change-59656
* Author: Tsuyoshi Sawada
* Status: Rejected
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
Now we have the safe navigation operator `&.`. But this cannot be used with syntax sugar form of the methods `[]` and `[]=`, which are more frequent than their ordinary forms of method call. For example, when `a` can be either an array or `nil`, we can do:
a &.[](3)
a &.[]= 2, :foo
but we cannot do:
a &.[3]
a &.[2] = :foo
It would be nice if we can extend the use of `&.` to cover syntactic sugar as above.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>