Lähettäjä: "Mystifier" <rohitlodha@hotwireindia.com>
Aihe: Re: Variable ArgumentsHi Robert,
How can you say caller know about the number of arguments. It might be
possible that it call the function with all what he has and caller
responds with "I am being called with too few or too many arguments".
This can be shown as the error you have indicated.
As Mr. Gross pointed out, you can use #arity to find out the number
of arguments for the method from within Ruby.
I'm not quite sure what you're asking, though. Can you try to rephrase
that? Perhaps more importantly, why does the caller need to know the
amount of arguments? I mean the programmer obviously needs to know
how to use a given method, but are you saying the /code/ needs to
know it also? If so, why?
Third question: are you talking program-level or VM-level?
About VM, it is open source and will be uploaded in a week or so.
Regards,
mystifier
E