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.
The text was updated successfully, but these errors were encountered:
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:
$ ruby -e 'a=Object.new; c=42; b=->{}; def a.[]=(*a,&b); p [a,b]; end; a[&b] = c'
[[42], #<Proc:0x00007fc5e22bd1a8 -e:1 (lambda)>]
Prism rejects these codes. Ruby and YARP 0.12.0 accepts it.
I'm not sure if it's related to this issue or not,
Prism::CallNode
have methodblock
butPrism::CallOperatorNode
Prism::CallAndWriteNode
Prism::CallOrWriteNode
does not have it.The text was updated successfully, but these errors were encountered: