From: Zach Dennis Date: 2005-01-28T15:05:57+09:00 Subject: Re: Ten Things Every Java Programmer Should Know About Ruby Navindra Umanee wrote: > > Thanks for the tips and insightful commentary to you and Joao. I'd be > interested in seeing the Rails code for recursive require. > This isn't Rails code, but it's recursive loading code: def require( str ) if File.exist?( str ) Dir["#{str}/**/*.rb"].each do |file| require file[0..-4] end else super end end Make a test few subdirectories "mymodule", and a few directories beneath that, and a few test ".rb" scripts.... require "mymodule" will recursively load all the .rb files in the directory mymodule and subdirectories. Zach