On Thu, Jul 18, 2002 at 07:13:49AM +0900, Harry Ohlsen wrote:
> Is there already a way to do this?  If not, is there a method somewhere that 
> returns the path to the file that 'load' or 'require' would process?  Ie, 
> something that scans the library path to find the right one?

This does:
  http://rm-f.net/~cout/ruby/treasures/RubyTreasures-0.4/lib/hacks/path_operations.rb.html

You can get the pathname using find_file_in_path(file, $:).  You can
then canonicalize it using realpath() -- so you don't require the same
file twice under two different names.

Paul