From: Detlef Reichl Date: 2005-11-02T04:10:07+09:00 Subject: Re: Finding File source On Mi, 2005-11-02 at 03:46 +0900, Dav Coleman wrote: > Hi, > > I've been trying to locate the source for File.open and I'm having no luck. > > I looked under /usr/local/lib/ruby/1.8/ and found no File.rb or even IO.rb. > I did a find /usr/local/lib/ruby -name "*.rb" -exec grep "class File" > {} \; -print and it only turns up in a pertty print and ftools source. > > Are the core classes only defined in compiled binary perhaps? > Mostly, yes. > If so, I have another question. Using RoR I'm running into a problem > due to too many open files. I want to find the File.open source (or > IO.open maybe) and add in some sort of debugging so I can log every > file being opened to help debug the issue. Is there a way I can do > this without going to the actual source? > On unixoid systems lsof will show you all open file descriptors. Cheers detlef > Thanks for any advice. >