From: Mark Wickens Date: 2008-02-14T16:21:58+09:00 Subject: Re: Problem usning 'OR' operator in 'IF' condition? ------=_Part_37_10941095.1202973722688 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 'R' != 'r', so the OR is true. If fact, it will always be true. You want an && operator. Mark On Thu, Feb 14, 2008 at 2:01 AM, dare ruby wrote: > Dear friends, > > I have got an error when i tried to check multiple condition using "OR" > operator inside "IF" loop. > > my code is > > if @character != 'R' || @character != 'r' > > raise " Expected 'R' after 'E' in version Declaration" > > end > > Even when i pass a value for @character as 'R' its showing error like > > Expected 'R' after 'E' for version Declaration (RuntimeError) > > Please could any one explain in detail about the problem and how to > solve it when i have to use multiple check in the same if loop. > > Thanks in advance > > Regards, > Martin > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_37_10941095.1202973722688--