Feature #7907

Give meaning to staby word

Added by trans (Thomas Sawyer) over 5 years ago. Updated over 5 years ago.

Target version:


I noticed that ->word doesn't mean anything. i.e.

SyntaxError: (irb):4: syntax error, unexpected '\n', expecting keyword_do_LAMBDA or tLAMBEG
from /opt/Ruby/1.9.3-p327/bin/irb:12:in `'

If that is always so, then could it be given a meaning as a shorthand for method()? i.e.


would be the same as writing



Related issues

Is duplicate of Ruby trunk - Feature #7906: Giving meaning to ->foo Rejected2013-02-22


#1 [ruby-core:52646] Updated by ko1 (Koichi Sasada) over 5 years ago

  • Description updated (diff)
  • Assignee set to matz (Yukihiro Matsumoto)

#2 [ruby-core:52675] Updated by matz (Yukihiro Matsumoto) over 5 years ago

  • Status changed from Open to Rejected

I think filling the syntax hole eagerly is a bad idea.

Besides that, I don't think making ((%->foo%)) as method(:foo).to_proc seems a good idea,
since foo in ((%->foo{}%)) is a argument name, not a method name.


#3 [ruby-core:52681] Updated by trans (Thomas Sawyer) over 5 years ago

Ah, ->foo{} did not know that the parenthesis could be left out.

Ok, I'll suggest slight modification then, b/c it still would be nice to have a shorter notation (not just to fill a syntax hole). Could it be a symbol, i.e. ->:foo.

#4 [ruby-core:52699] Updated by trans (Thomas Sawyer) over 5 years ago

Once a issue has been rejected, is it necessary to open a new case for a modified form of the proposal? In other words is any one going to see the change if it has already been rejected? As with this case?

#5 [ruby-core:52709] Updated by rosenfeld (Rodrigo Rosenfeld Rosas) over 5 years ago

People will see the changes but when they're looking for open issues to decide what to do about them they won't touch closed issues :)

Also available in: Atom PDF