On Thu, 19 Oct 2006 22:03:07 +0900 "Parv G." <ghotrapa / yahoo.com> wrote: > hello all, > i'm new to ruby and need some help on what seems like a simple issue. > > How do i find out if the argument passed to a method is a string or > an integer? > > Here's what i'm trying to do: > > def method_test(some_arg) > if some_arg is string > #callmethod A > else > #callmethod B > end > end irb(main):002:0> 'a'.is_a?(String) => true etc. -- Thomas Adam