def foo(*)
end
What does the "*" mean?
def foo(*)
end
What does the "*" mean?
"David Corbin" <dcorbin@machturtle.com> schrieb im Newsbeitrag news:200502131241.13403.dcorbin@machturtle.com...
def foo(*)
endWhat does the "*" mean?
Any number of arguments
def foo(*) end
nil
foo 1
nil
foo
nil
foo 1,2,3
nil
Kind regards
robert
And the foo method just can't refer to them?
On Sunday 13 February 2005 12:54 pm, Robert Klemme wrote:
"David Corbin" <dcorbin@machturtle.com> schrieb im Newsbeitrag
news:200502131241.13403.dcorbin@machturtle.com...> def foo(*)
> end
>
> What does the "*" mean?Any number of arguments
David Corbin wrote:
On Sunday 13 February 2005 12:54 pm, Robert Klemme wrote:
"David Corbin" <dcorbin@machturtle.com> schrieb im Newsbeitrag
news:200502131241.13403.dcorbin@machturtle.com...def foo(*)
endWhat does the "*" mean?
Any number of arguments
And the foo method just can't refer to them?
Right... I'd assume it's for some kind of case where you're
stubbing something and you want to prevent an undefined
method but you don't really care about the parameters.
Hal