vimal
6/28/2008 6:57:00 AM
name = "vimal"
if name.respond_to?("each")
print "Its a list\n"
else
print "Its a string\n"
output:
Its a list
=> nil
The Condition is True,but its a "string" right!!
My quetion is,
How can one determine whether a given object is a list or string or
number
thanks,
vimal