On Wed, 12 Oct 2005, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: Default argument values for blocks"
>    on Wed, 12 Oct 2005 02:25:33 +0900, Yukihiro Matsumoto <matz / ruby-lang.org> writes:
>
> ||Is there a reason why I can't do this?
> ||
> ||   foo = lambda { |foo = bar| puts foo }
> ||   foo.call
> ||
> ||I can't think of any good reason why this isn't valid.
> |
> |Mostly because yacc does not allow it.  It confuses
> |
> |  lambda { |foo = bar| puts foo }
> |
> |as
> |
> |  lambda { |foo = (bar| puts foo) }
> |
> |and causes syntax error.
>
> For your information, you can do
>
>  foo = ->(foo="bar"){puts foo}
>  foo.call
>
> in 1.9.

-> means lambda?

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze.  --Nagarjuna
===============================================================================