From: Sebastian Hungerecker Date: 2008-07-25T19:09:34+09:00 Subject: Re: optional parameter in functions Junkone wrote: > how do i make a parameter optional. if it is possible. > for eg. i want to do as follows > > function myCall(a,b,c=somedefault) > .. > end > myCall(a,b,c) or myCall(a,b) Except for the fact that in ruby you define methods with "def" and not "function", what you wrote above is perfectly valid ruby code and works as intended. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826