From: Thomas Wieczorek Date: 2008-01-05T00:44:06+09:00 Subject: Re: Checking an array for an item On Jan 4, 2008 4:05 PM, Sam Phoneix wrote: > How come this code doesn't return "true" for the following? > > x = [1,2,3] > > puts(x.include?(Fixnum)) > > You could try something like: class Array def include_class?(klass) if self.detect { |x| x.class == klass } return true else return false end end end