From: Brian Candler Date: 2011-05-08T23:45:45+09:00 Subject: Re: Help with while condition OR condition 7stud -- wrote in post #997311: > In ruby, everyone should use 'and' and 'or' by default instead of && and > ||. I would advise exactly the opposite: there are many traps for the unwary if you use 'and' and 'or'. Two prime examples: >> val = 10 => 10 >> ok = val < 3 or val > 5 => true >> ok => false >> a = true => true >> b = not a SyntaxError: compile error (irb):7: syntax error, unexpected kNOT Use '||' and '!' respectively and you won't have a problem. -- Posted via http://www.ruby-forum.com/.