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

Kent.

"Florian Frank" <flori / nixe.ping.de> writes:

> Martin DeMello wrote:
>
>>a[1] works nicely for lambdas too, btw (not that I wouldn't like to see
>>a(1), of course).
>>  
>>
> Try the 1.9 cvs version:
>
> irb(main):001:0> a = lambda { |x| x * 2 }
> => #<Proc:0xb7c6118c@(irb):1>
> irb(main):002:0> a(1)
> => 2
> irb(main):003:0> a 1
> => 2
>
> -- 
> Florian Frank