From: Logan Capaldo Date: 2006-05-12T08:44:40+09:00 Subject: Re: Newb question - object type tests? On May 11, 2006, at 7:32 PM, Adam Bloom wrote: > Hello all, > > I feel like I definitely should know this, but how do you test the > type > of an object? For example: > > item = ["hello"] > item.array? >> true > item = "hello" > item.array? >> false > > extending that, how do I test the type of a class that I made? > > -- > Posted via http://www.ruby-forum.com/. > item.is_a? Array or item.kind_of? Array