From: Eric Hodel Date: 2007-08-05T16:36:21+09:00 Subject: Re: [ANN] SuperCaller 1.0.0 Released On Aug 4, 2007, at 23:03, Daniel DeLorme wrote: > Eric Hodel wrote: >> SuperCaller version 1.0.0 has been released! >> SuperCaller adds a beefed-up version of Kernel#caller and a beefed up >> version of Exception#backtrace. >> require 'super_caller' >> def something() super_caller end >> stack = something >> p stack.first.file # => "-" >> p stack.first.line # => 4 >> p stack.first.method_name # => nil >> p stack.first.self # => main >> p stack.first.sexp # => [:vcall, :super_caller] >> p stack.first.source # => "def something\n super_caller\nend" > > That is really awesome. > The only thing missing is stack.first.binding ;-) Impossible, rb_f_binding() is static. (Well, you could reimplement rb_f_binding(), but I don't like to do that kind of stuff.) -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars