From: Phrogz Date: 2007-07-27T07:34:59+09:00 Subject: Re: n00b if condition quest On Jul 26, 4:22 pm, Brett Boge wrote: > I'm sure theres a way, so how does one do: > > if (a = b or a = c or a = d or a = f) > > in a shorter, easier to view > > if (a = (b c d or f)) kind of way? case n when 1,2,3: puts '1-3' when 4..6: puts '4-6' else puts 'other' end You can, of course, use variables instead of literals, ala case a when b, c, d, f ... end