From: Gregory Brown Date: 2008-08-22T01:06:28+09:00 Subject: Re: "num in [1,2,3,4]" in a cool way? On Wed, Aug 20, 2008 at 5:32 PM, Iņaki Baz Castillo wrote: > Hi, AFAIK in Ruby the only (or the "coolest") way to do something as: > > if num in [1,2,3,4] > > is by doing: > > if [1,2,3,4].index(num) > > Is it? any other "cooler" way? Thanks. num.between?(1,4) -- Technical Blaag at: http://blog.majesticseacreature.com | Non-tech stuff at: http://metametta.blogspot.com