From: Logan Capaldo Date: 2006-05-18T05:03:24+09:00 Subject: Re: Dynamically modifying modules to avoid namespace collisi On May 17, 2006, at 10:11 AM, Gregory Seidman wrote: > def find_require_file(filename) > # NEED IMPLEMENTATION HERE > end def find_require_file(filename) $LOAD_PATH.each do |directory| [ ".rb", ".so", ".dll" ].each do |ext| if File.exists?(f = File.join(directory, filename + ext)) return f end end end # otherwise we didn't find it raise 'Could not find #{filename} in $LOAD_PATH.' end