SuperCaller 1.0.0 Released

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”

Changes:

1.0.0 / 2007-06-30

Eric H. wrote:

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 :wink:

Daniel

On Aug 4, 2007, at 23:03, Daniel DeLorme wrote:

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 :wink:

Impossible, rb_f_binding() is static. (Well, you could reimplement
rb_f_binding(), but I don’t like to do that kind of stuff.)