From: "Iñaki Baz Castillo" Date: 2009-04-05T04:04:23+09:00 Subject: Re: Loading classes in order El Sábado 04 Abril 2009, Tony Arcieri escribió: > Merb's loader works somewhat similarly to what Inaki pasted, except it > loops, retrying the failed files. If it loops through the failed files and > no new ones are loaded it gives up. Imagining a very complex case it could occur that class_A defined in file_A depends on class_C defined in file_C, and class_C depends on class_B defined in file_B. So the correct loading order would be: require "file_B" require "file_C" require "file_A" Loading in alphabetic order (A, B, C) would load just file_B. So file_A and file_C would require a new try. Trying again in alphabetic order (A, C) would load just file_C, and file_A would fail. So a third attemp would load just file_A (succesfully now). I wonder if could be a case in which this approach wouldn't work. -- Iñaki Baz Castillo