Subject: "num in [1,2,3,4]" in a cool way?
From: Iaki Baz Castillo <ibc aliax.net>
Date: Thu, 21 Aug 2008 06:32:50 +0900
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.
--
IƱaki Baz Castillo