Project

General

Profile

Actions

Feature #7906

closed

Giving meaning to ->foo

Added by trans (Thomas Sawyer) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Target version:
[ruby-core:52629]

Description

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

->foo
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.

->foo

would be the same as writing

method(:foo).to_proc

=end


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Feature #7907: Give meaning to staby wordRejectedmatz (Yukihiro Matsumoto)02/22/2013Actions

Updated by trans (Thomas Sawyer) almost 12 years ago

Please fix. Sigh.

Updated by ko1 (Koichi Sasada) almost 12 years ago

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

Updated by nobu (Nobuyoshi Nakada) almost 12 years ago

  • Description updated (diff)

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

Updated by matz (Yukihiro Matsumoto) almost 12 years ago

  • Status changed from Open to Rejected

See #7907

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0