From: Hugh Sasse Date: 2007-05-04T00:59:22+09:00 Subject: Understanding code: Kernel#require and blocks. I'm trying to debug a Rails application which complains about an undefined constant when `rake db:migrate` is invoked. The rakefile that comes with rails modifies $:, then does several more requires. Given the length of $: it is tedious to find which files are require`d. Clearly this is not a rails specific difficulty: it is common to understanding anyone's code making sufficiently extensive use of require. So my question is this: Would it be practical to modify require so that it accepts a block, to which it would pass the path of the object it successfully require`d? Then, to find the files I must read to understand what is happening I could change - require 'tasks/rails' + require 'tasks/rails' {|path| $stderr.puts "require`d #{path]"} Hugh