Kent Sibilev wrote:

> Hm, strange
> 
> irb(main):001:0> l = {|x| puts x*2}
> => #<Proc:0x00338710@(irb):1>
> irb(main):002:0> l(2)
> 4
> => nil
> irb(main):003:0> {|x| puts x*2}(2)
> SyntaxError: compile error
> (irb):3: parse error
> {|x| puts x*2}(2)
>                ^
>         from (irb):3

By design, it's only intended to work for local variables for now AFAIK.