From: "ara.t.howard" Date: 2008-04-30T02:33:28+09:00 Subject: Re: "require" with many files On Apr 29, 2008, at 2:58 AM, Iņaki Baz Castillo wrote: > headers_path = File.dirname(__FILE__) + '/headers' > Dir.chdir(headers_path) > Dir["*.rb"].each do |file| > require "#{headers_path}/#{file}" > end > > Is it enought ok or can it receive some Ruby's magic? XD glob = File.join( File.dirname(__FILE__), 'headers', '*.rb' ) Dir.glob(glob){|lib| require lib} is a bit shorter... a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama