Subject: Is there a "||" that treats "" also as false?
From: Joshua Muheim <forum josh.ch>
Date: Wed, 7 Nov 2007 09:41:42 +0900
Hi all
irb(main):001:0> "" || "asdf"
=> ""
irb(main):002:0> nil || "asdf"
=> "asdf"
irb(main):003:0>
I'd like the first one to also return "asdf". So is there an operator
that fits my needs? :-)
Thanks
Josh
--
Posted via http://www.ruby-forum.com/.