Hi Johann. This might get you started: http://www.rubycentral.com/book/ospace.html Scroll down about halfway on that page and you'll find the "System Hooks" and "Tracing Your Program's Execution" sections. If you have ri installed: ri set_trace_func Have fun! ----------------------------------------------------------------------------- Brian Knox Just Another Perl Hacker perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print' On Thu, 28 Jun 2001, Johann Hibschman wrote: > Hi, > > Is there any way that you can find the source code of a ruby method > or class by introspecting it? In Python, I believe, functions carry > around information about the source file and line position at which > they were defined. Is there a similar feature in Ruby? > > I'm wondering, since Ruby inherits a bit from Smalltalk, and one of > the nicer features of smalltalk is the way in which you can just > browse through the source of everything while you're debugging. > (At least in Squeak, you can. I'm not all that experienced with > Smalltalk, either, but it's a neat feature.) > > If there are hooks of some kind, it would be easy to create a nifty > IDE-like environment, like some of the lisps and smalltalks have, > which would be a Good Thing. > > --Johann > > -- > Johann Hibschman johann / physics.berkeley.edu >