Hi --

On Sun, 20 Mar 2005, Christian Neukirchen wrote:

> Navindra Umanee <navindra / cs.mcgill.ca> writes:
>
>> Christian Neukirchen <chneukirchen / gmail.com> wrote:
>>>> I'm not sure how that could be improved, since it's already doing what
>>>> it was designed to do.
>>>
>>> I think you can write  foo {|x|...}, {|y|...}  with recent CVS.
>>
>> What does the syntax for yield look like then?
>
> No yield:
>
> def foo(x, y)
>  x.call
>  y.call
> end
>
> foo {|x|...}, {|y|...}

I don't think you can do that, without parentheses:

irb(main):008:0> def foo(x, y)
irb(main):009:1>   x.call
irb(main):010:1>   y.call
irb(main):011:1> end
=> nil
irb(main):012:0> foo {|| }, {|| }
SyntaxError: compile error
(irb):12: syntax error
foo {|| }, {|| }
           ^
(That's CVS from about 10 minutes ago :-)


David

-- 
David A. Black
dblack / wobblini.net