From: Phrogz Date: 2009-12-23T14:15:06+09:00 Subject: Re: newbie: if is not null else... On Dec 22, 6:53 am, Alfonso Caponi wrote: > Thank you very much Rick. Using: > > x = '-' if x.nil? > > I've x = Null again.. :( > > It seems works with > > if (x.to_s =~ /Null/) >  x = '-' > end Null is not a special value in Ruby. I am guessing that perhaps you have a string with the value "Null" (four characters, starting with capital N; not a special value). Try: p x, x.class or puts x.inspect, x.class to gain insight about what value you actually have there.