From: Josh Cheek Date: 2011-09-26T05:05:10+09:00 Subject: Re: Conditional statements with multiple arguments --f46d043c7fde27471d04adc98f40 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Sep 25, 2011 at 2:51 PM, Intransition wrote: > > > On Sep 24, 7:25 pm, Chris Hulan wrote: > > On Sat, Sep 24, 2011 at 7:10 PM, Intransition > wrote: > > > > > if x.either == [1, 2] > > > You could do it with inlcude: > > [1,2].include? x > > It's more limited though. Consider: > > if a.either.include? [1, 2] > > if a.either.is_a? [String, Symbol] > > etc. > > I like it, but either implies 2 options. Seems weird to say if a.either == [1, 2, 99, 501] --f46d043c7fde27471d04adc98f40--