Hi --

On Mon, 31 Dec 2001, Michael Lucas-Smith wrote:

> def someThing (&a, &b)
>
> this gives me a parse error:
>
> ../tst.rb:3: parse error
> def blah (&a, &b)

The & variable has a special status: there can only be one, it has to
be last in the list, and it grabs the block (which otherwise can be
"yield"ed to but can't be referenced).

So typically you'd see:

  def my_method(arg1, arg2, &block)
    ...
  end

I'm not sure what you want to do in your example....  What are you
expecting &a and &b to be?


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav