From: "Iñaki Baz Castillo" Date: 2010-02-04T03:45:08+09:00 Subject: Re: Hashes versus Arrays El Miércoles, 3 de Febrero de 2010, Jerome David Sallinger escribió: > Hello, > > Can someone please explain how you would go about deciding whether to > use a Hash or and Array for a given requirement. Can someone give an > idiot proof simple explanation including any pros versus cons. An array is indexed by an integer (myarray[0]) while a hash is indexed by any Ruby object (myhash["drinks"]). In Ruby 1.9 Hashes are also ordered (an important difference between a typical hash and an array present in Ruby 1.8). If you need to access the entries based on a numeric index Arrays are valid for you. If not, Hashes are great. -- Iñaki Baz Castillo