From: Anubis Date: 2003-06-06T10:42:23+09:00 Subject: Array = Hash.sort ... but sometimes not (sorry for my poor English : I'm French) I created a little program in Ruby as an exercice to learn more about this fascinating language. The problem is that I can change the type of one of my variables without any problem for Ruby. A few lines from my program : mots_tries = Array.new mots_occur = Hash.new # I fill my Hash with some data and after that I sort it by values : mots_tries = mots_occur.sort {|a,b| a[1]<=>b[1]} My program works perfectly, ... even when I declare mots_tries as an Hash : mots_tries = Hash.new But I know that the result of an Hash sorting is a nested Array. For information I work with Ruby 1.6.8-8 and my program has nor Class nor Def (I used Ruby as a procedural programming language). Thanks for your answer if someone has ever heard of this problem with Ruby. - Teknophil -