Feature #7906

Giving meaning to ->foo

Added by Thomas Sawyer about 1 year ago. Updated about 1 year ago.

[ruby-core:52629]
Status:Rejected
Priority:Normal
Assignee:Yukihiro Matsumoto
Category:core
Target version:2.1.0

Description

=begin
I noticed that "(({->word}))" doesn't mean anything. i.e.

->foo
SyntaxError: (irb):4: syntax error, unexpected '\n', expecting keyworddoLAMBDA 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.

->foo

would be the same as writing

method(:foo).to_proc

=end


Related issues

Duplicated by ruby-trunk - Feature #7907: Give meaning to staby word Rejected 02/22/2013

History

#1 Updated by Thomas Sawyer about 1 year ago

Please fix. Sigh.

#2 Updated by Koichi Sasada about 1 year ago

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

#3 Updated by Nobuyoshi Nakada about 1 year ago

  • Description updated (diff)

It doesn't seem a good idea to me, because "foo" has different meanings, parameter and method name.

#4 Updated by Yukihiro Matsumoto about 1 year ago

  • Status changed from Open to Rejected

See #7907

Also available in: Atom PDF