On Nov 6, 6:41 pm, Joshua Muheim <fo... / josh.ch> wrote: > 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? :-) "" isn't false so || and or won't work. You'll have to code it differently. E.g.: a = "a string" a || (a.empty? ? "asdf" : a)