From: "nobu (Nobuyoshi Nakada)" Date: 2013-02-22T11:47:49+09:00 Subject: [ruby-core:52673] [ruby-trunk - Feature #7906] Giving meaning to ->foo Issue #7906 has been updated by nobu (Nobuyoshi Nakada). Description updated It doesn't seem a good idea to me, because "foo" has different meanings, parameter and method name. ---------------------------------------- Feature #7906: Giving meaning to ->foo https://bugs.ruby-lang.org/issues/7906#change-36760 Author: trans (Thomas Sawyer) Status: Open Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: 2.1.0 =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 -- http://bugs.ruby-lang.org/