# Call\_stack 0.1.0: ruby-breakpoint/breakpointer working in 1

**URL:** <https://www.ruby-forum.com/t/call-stack-0-1-0-ruby-breakpoint-breakpointer-working-in-1/68000>\
**Category:** Ruby\
**Created:** [September 8, 2006, 12:23pm UTC](https://www.ruby-forum.com/t/call-stack-0-1-0-ruby-breakpoint-breakpointer-working-in-1/68000 "2006-09-08T12:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tulkas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5daacb/32.png) [@tulkas](https://www.ruby-forum.com/u/tulkas)\
**Post date:** [September 8, 2006, 12:23pm UTC](https://www.ruby-forum.com/t/call-stack-0-1-0-ruby-breakpoint-breakpointer-working-in-1/68000/1 "2006-09-08T12:23:52Z")

</div>

Source code and additional information at  
[eigenclass.org](http://eigenclass.org/hiki.rb?call_stack)  
Release information:  
[eigenclass.org](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 S.

- 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.
