From: "alexeymuranov (Alexey Muranov)" Date: 2013-05-02T19:46:59+09:00 Subject: [ruby-core:54739] [ruby-trunk - Bug #8359][Open] If p is a proc, p.call(x) can take a block, but p[x] cannot Issue #8359 has been reported by alexeymuranov (Alexey Muranov). ---------------------------------------- Bug #8359: If p is a proc, p.call(x) can take a block, but p[x] cannot https://bugs.ruby-lang.org/issues/8359 Author: alexeymuranov (Alexey Muranov) Status: Open Priority: Normal Assignee: Category: core Target version: ruby -v: 2.0.0 Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN =begin format = lambda { |l, s = '', &w| l.map {|e| w ? w[e] : e}.join(s) } format.call([1, 2], "\n") {|c| "[ #{ c } ]"} # => "[ 1 ]\n[ 2 ]" format[[1, 2], "\n"] {|c| "[ #{ c } ]"} # => SyntaxError: unexpected { arg, expecting end-of-input =end -- http://bugs.ruby-lang.org/