From: "J. Cooper" Date: 2008-02-15T17:07:27+09:00 Subject: Re: Problem usning 'OR' operator in 'IF' condition? dare ruby wrote: > Thank you paul and mark your informations have been very useful to me. > > but it works fine when the condition changes like, > if @character == 'R' || @character == 'r' > > raise " Expected 'R' after 'E' in version Declaration" > > end > > Regards, > Martin Yep. When you change == to !=, you have to flip your ||s to &&s to get the same effect. "If the light is green OR the light is blue, the world is in danger" becomes "If the light is NOT green AND the light is NOT blue, the world is NOT in danger" P.S. Just use what Robert said unless regular expressions scare you. Or do the whole raise "Expected 'R' after 'E' in version declaration" unless @character.downcase == 'r' -- Posted via http://www.ruby-forum.com/.