Why "Dir[*.rb]" doesn't get files ordered by name? [SOLVED]

It was easy, I just must use "sort" method:

  Dir["hdr_*.rb"].sort.each do |file|
      require "#{file}"
  end

···

El Martes, 17 de Junio de 2008, Iñaki Baz Castillo escribió:

Hi, I load various rb files by doing:

  Dir["hdr_*.rb"].each do |file|
      require "#{file}"
  end

How could I use
"Dir" to get the files ordered alphabetically?

--
Iñaki Baz Castillo