User:Bhanutpt/scratchpad/ruby

Enumerators, Ranges, Arrays and Hashes
Each of these can use the each method for iteration, though they seems to be synonyms, there is lot of difference in computing, The Enumerators and Ranges are almost of fixed memory length and so are memory efficient and fast, whereas Arrays and Hashes involves complex data structures for to be dynamic

Arrays
An array is a collection of elements, by default an array of n elements has its index enumerated from 0 to n-1, i.e, the index to the first element of an array is 0 array of ranges are allowed to declare, Object Oriented!

Hashes
Hash is an associative array which is a collections of Keys and it's associated Values

Ruby 1.9.2 Version is used for the examples on Win Intel x86 / Linux AMD64 Platforms