From: Austin Ziegler Date: 2005-05-23T23:39:29+09:00 Subject: Re: Determining what file contains a module/class On 5/21/05, Nicholas Wieland wrote: > Hi *, > I need to find the file that contains a known module or class, to > "inspect" the source code and extract what I need from the file. > Something like: > > >> require 'digest' > >> Digest::base_file > '/usr/local/lib/ruby/1.8/digest.rb' The problem in this case is that digest is specifically in digest.so, not digest.rb. It also doesn't help if a module or class is defined across multiple files, which is certainly permitted in Ruby. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca