Actions
Feature #18460
closedimplicit self for .() syntax without rvalue
Status:
Rejected
Assignee:
-
Target version:
-
Description
We have a nice .()
shorthand for calling Proc
m = 1.method(:+)
m.(2) # 3
But while we can use this shorthand in a Proc's context with the explicit self, we cannot use it with the implicit self:
m.instance_exec { self.(2) } # 3
m.instance_exec { .(2) } # syntax error, unexpected '.' (SyntaxError)
So I propose to make this syntax valid too.
Actions
Like0
Like0