>>>>> "Aleksi" == Aleksi  <Niemel<aleksi.niemela / cinnober.com>> writes:

    Aleksi> Kjana:
    >> > Parameter passing all supported ways only plain (*) (snip) >
    >> *) no optional, grouped (*rest) or named parameters allowed, >
    >> nor block block association
    >> 
    >> Parameters for a block is bound as multiple
    >> assignment. Therefore you can:
    >> 
    >> <code> f = proc { |x, *y| p x, y }

    Aleksi> Yes, you're right. Thank you for the correction. parse.y's
    Aleksi> rules for mlhs (multiple (assigment) left hand side) shows
    Aleksi> all the available ways to "pass parameters" to a block.

And you can have multiple returns emulated via the nice catch/throw
mechanism ... in fact, this could make 'return' even unnecessary
(except performance perhaps) ... ;-)))

Prove:

   f = proc do |lang, who|
     catch(:result) do
       if lang == :jp
         throw :result, "Konnichi wa #{who}"
       end
       if lang == :de
         throw :result, "Hallo #{who}"
       end
       throw :result, "Hello #{who}"
     end
   end

I really LOVE Ruby ... :-)))

    Aleksi> 	- Aleksi

\cle