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
Prism rejects these codes. Ruby and YARP 0.12.0 accepts it.
a[&b]=ca[&b] += ca[&b] ||= ca[&b] &&= c
I'm not sure if it's related to this issue or not, Prism::CallNode have method block but Prism::CallOperatorNodePrism::CallAndWriteNodePrism::CallOrWriteNode does not have it.
Activity
eregon commentedon Oct 10, 2023
Maybe it's a case that CRuby should forbid?
I think this syntax might not be intentionally supported.
Could you open an issue at https://bugs.ruby-lang.org/ to find out?
It does seem to "work" in CRuby to be fair:
tompng commentedon Oct 11, 2023
Opened https://bugs.ruby-lang.org/issues/19918
kddnewton commentedon Oct 12, 2023
Thanks @tompng - regardless of whether it's good or not, we need to support it to be compatible. Fortunately I don't think this will be too bad.