From: Ned Konz Date: 2002-07-25T04:18:21+09:00 Subject: Re: Dynamically determining a class or module's file name On Wednesday 24 July 2002 12:05 pm, Daniel Berger wrote: > Hi all, > > This may seem an odd question but, is there a way to dynamically > determine the filename that a class and/or module is written in? But a class or module can be written in multiple files. I believe that the methods themselves are marked with file and line information; this is available to the debugger. I recall that someone came up with a way to access these from Ruby. Of course, for your example you could just use __FILE__ and __LINE__: class SomeClass puts "file #{__FILE__} line #{__LINE__}" end -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE