From: Alex Gutteridge Date: 2008-07-28T20:04:25+09:00 Subject: Re: "or" and "and" On 28 Jul 2008, at 11:39, es_ wrote: > class Array > > def n ; self.size ; end > > def stem_and_leaf(st = 1) > # if st != (2 or 5 or 10) then ; st = 1 ; end This won't fly (as you've noticed). you'll need to do either if st != 2 or st != 5 or st != 10 then st = 1 end or more consisely if not [2,5,10].include? st then st = 1 end or even [2,5,10].include? st or st = 1 Alex Gutteridge Department of Biochemistry University of Cambridge