From: Kirk Haines Date: 2009-05-13T08:53:54+09:00 Subject: Re: Whaaaaat? On Tue, May 12, 2009 at 5:39 PM, Tom Cloyd wrote: > p [0..5].include? 0 > false > p [0..5].member? 0 > false > > This is nuts. The world is flat, evidently. > > Can someone explain this nonsense? [0..5] is an array with a single element, a Range object representing the range from 0 to 5. (0..5).to_a gives you [0,1,2,3,4,5] which is probably what you assumed you got with [0..5] (0..5).include?(0) will work, as well, because ranges support the include? method. Kirk Haines