[ANN] call_stack 0.1.0: ruby-breakpoint/breakpointer working in 1.8.5, backtraces

  • Thread starter Mauricio Fernandez
  • Start date
M

Mauricio Fernandez

Source code and additional information at
http://eigenclass.org/hiki.rb?call_stack
Release information:
http://eigenclass.org/hiki.rb?call_stack+0.1.0

This release includes two RubyGems packages: a binary one for Win32 and a
platform-independent one for all those with a compiler, so
gem install call_stack

Overview
========

Binding.of_caller depended on a bug that was fixed in 1.8.5. Therefore,
neither Binding.of_caller nor ruby-breakpoint/Rails' breakpointer work
anymore with Ruby 1.8.5.

call_stack contains a new Binding.of_caller implementation that works with
Ruby 1.8.5, allowing you to use ruby-breakpoint and Rails' breakpointer.

call_stack can be also be used to obtain backtrace information in a running
program.


Binding.of_caller compatibility
===============================

call_stack provides an alternative implementation of Binding.of_caller that
works on Ruby > 1.8.4. You can use it by loading breakpoint185.rb before
running your program.

If you're using Rails and want to debug your applications using breakpoints,
you can proceed as usual, with the exception that breakpoint185.rb must be
loaded when your application is running. For instance, you can execute your
app with
ruby -rbreakpoint185 script/server
instead of just ruby script/server.

NOTE: RubyGems is unable to handle -rlib options passed to Ruby.
If you installed call_stack via RubyGems, you'll have to do
ruby -e "require 'breakpoint185'; load 'script/server'"
(assuming you've set RUBYOPT=-rubygems, otherwise prepend it to the above line
or add require 'rubygems') or something to the same effect.

Call stack information
======================
call_stack provides Kernel#call_stack, which will return an array with
information (class, method, file, line, binding, language (C or Ruby))
about the current stack frame and its callers. Please refer to the Rdoc
documentation.

Thanks
======
Kent Sibilev
* create_binding() was stolen from his excellent ruby-debug, replacing
rb_funcall()


License
=======
Use and redistribution of call_stack subject to the same terms as Ruby.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top