> Hi, I am having a problem in my code. I want to know the type of a
> variable. It can be of two types, a string or an array. Is there
> something like
>
> native_ruby_method_that_returns_var_type (var)
>
> that returns a string like for instance ''String'' or
''Array'' ?
>> "string".class
=> String>> [1,2,3].class
=> Array
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---