On Sun, May 06, 2007 at 07:32:14AM +0900, Gpy Good wrote:
> I create a ruby program that need a menu from database:
> menu={
> "open file"=>"file.html",
> "save file"=>"save_file.html",
> "quit"=>"quit.rb"
> }
> 
> puts menu.inspect
> 
> =>
> {"open file"=>"file.html", "quit"=>"quit.rb", "save
> file"=>"save_file.html"}
> 
> BUT,i hope that as I create menu's ordered
> =>
> {"open file"=>"file.html", "save
> file"=>"save_file.html","quit"=>"quit.rb"}

If ordering is important, don't use a hash.

menu = [
  ['open file','file.html'],
  ['save file','save_file.html'],
  ['quit','quit.rb'],
]