From: Robert Dober Date: 2009-01-26T06:46:26+09:00 Subject: Re: How can I get the arguments passed to the caller. On Sun, Jan 25, 2009 at 9:30 PM, Stefan Kanev wrote: > So, suppose I want to get evil and go dig into frames and so on. I've seen > ruby-debug do something close. Is there a part of the standard library that > allows you to introspect that way (if so, I could not find it), or a gem > maybe? And if not and I'm bend on writing C code to achieve it, where should > I start looking? Depends, for methods with *args and optional arguments you have definitely some heavy lifting to do. For all other methods however it's easy: method( caller.first.sub(/.*in ./,"").sub(/.$/,"") ).arity Probably not good enough? cheers Robert