From: "Joec_49@..." Date: 2011-11-09T23:05:00+09:00 Subject: Re: Can't get "or" or "||" to work. Use regular expressions instead Joe Sent from my iPad On Nov 9, 2011, at 9:02 AM, james gallagher wrote: > Hi. I have a stupid question. > > I'm stuck on the bit of ruby that follows: > > name = gets.chop.downcase > if name != "bob" || "fred" > puts "That wasn\'t one of the choices." > else > code > > If I put "bob" in it says: > > That wasn't one of the choices. > > It does the same for anything I put in. > > Thank you. > > -- > Posted via http://www.ruby-forum.com/. > >