From: Alexey Verkhovsky Date: 2007-03-12T13:17:06+09:00 Subject: Re: #define alternative for Ruby ------=_Part_32630_8384891.1173673022571 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/11/07, Alexey Verkhovsky wrote: > > On 3/11/07, Michael Strelnikov wrote: > > > > Let's we have following function: > > * set_default(var, val) > > -- if variable "var" is not defined (not existed) then assign value > > "val" > > else do nothing. > > > > The variable could be ANY type including "Fixnum". > > > > Try to implement it using standard techniques. > > > > var ||= val > Although this will only work with @var ------=_Part_32630_8384891.1173673022571--