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