From: Robert Klemme Date: 2012-09-03T21:18:35+09:00 Subject: Re: hwo to compare a number use in[a..b] On Mon, Sep 3, 2012 at 1:47 PM, Jan E. wrote: > You can either use the logical "or": > > if A == 13 or A == 14 > ... > > Or you can use Array#include: > > if [13, 14].include? A > ... > > The latter doesn't really make sense here, but it's useful when you have > a lot of values. And for integers we can also facilitate ranges irb(main):001:0> (13..17).include? 15 => true Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/