On Wed, 10 Aug 2005, basi wrote:

> Hello,
> I'm a bit tired typing:
>
> if a == "" or a == nil
> if a != "" and a !== nil
>
> I'm sure there is a Ruby way to do this.


class NilClass
   def empty?
     true
   end
end

if a.empty?




John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter / tait.co.nz
New Zealand

Carter's Clarification of Murphy's Law.

"Things only ever go right so that they may go more spectacularly wrong later."

From this principle, all of life and physics may be deduced.