From: Simon Strandgaard Date: 2004-01-29T05:59:53+09:00 Subject: Re: Type On Wed, 28 Jan 2004 12:35:45 -0800, Noixe wrote: > I'm italian, then sorry in advance for my bad english: Welcome to Ruby. You don't have to excuse.. your English is ok. > Is there a method to know a type of object? [snip] IIRC (If I Remember Correct) Object#type is deprecated.. Instead you may use #class. Like this: server> irb irb(main):001:0> x = 1 => 1 irb(main):002:0> x.class => Fixnum irb(main):003:0> y = [1, 2, 3] => [1, 2, 3] irb(main):004:0> y.class => Array irb(main):005:0> z = {1 => "one", 2 => "two"} => {1=>"one", 2=>"two"} irb(main):006:0> z.class => Hash irb(main):007:0> -- Simon Strandgaard