have an array that contains objects from different classes, not all just one type.
# here's an array that contains four elements, each a different kind of object
hodge_podge = ["January", 1, :year, [2006,01,01]]
# Use each to iterate over the array, and class to find what kind of object each element is:
hodge_podge.each {|e| print e.class, " " } # => String Fixnum Symbol Array
Related examples in the same category