From: ara.t.howard@... Date: 2007-03-12T14:07:01+09:00 Subject: Re: #define alternative for Ruby On Mon, 12 Mar 2007, Michael Strelnikov wrote: >> I would be interested in hearing what you want to do with text substitution >> that you cannot already do with standard Ruby metaprogramming techniques. >> >> > Easy. > 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. harp:~ > cat a.rb unless defined? var var = 42 end p var harp:~ > ruby a.rb 42 -a -- be kind whenever possible... it is always possible. - the dalai lama