From: Phrogz Date: 2007-11-08T02:50:07+09:00 Subject: Re: Is there a "||" that treats "" also as false? On Nov 7, 10:36 am, Joshua Muheim wrote: > class String > def |(alternative) > (self.nil? or self == "") ? alternative : self > end > end An instance of a String class will never be an instance of NilClass instead. You can remove "self.nil? or" from the above.