[OCLUG-devel] Ruby - Default Method Args

Michael Elkins michael.elkins at gmail.com
Mon Mar 5 10:50:34 PST 2007


On 3/5/07, Doug Jolley <ddjolley at gmail.com> wrote:
>
>
>
> def foo(a,b="four",c)
>
>

You either need to specify a default argument for 'c', or move b to the
end.  You can't have any arguments without defaults occurring after an
argument with a default value.

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20070305/ff7c99ac/attachment.html 


More information about the OCLUG-devel mailing list