Permalink
Browse files

Fix "undefined symbol: ruby_current_thread" on 1.9.3

Cargo-culted from ruby-debug-base19 v0.11.26
  • Loading branch information...
1 parent f4139fc commit 59ed2562944ec1feba25e1f5519086d3586f5ab1 @vjt committed Jan 20, 2012
Showing with 7 additions and 0 deletions.
  1. +3 −0 ext/extconf.rb
  2. +4 −0 ext/perftools.c
View
@@ -90,7 +90,10 @@ def add_define(name)
end
if RUBY_VERSION >= "1.9"
+ major, minor, patch = RUBY_VERSION.split('.').map!(&:to_i)
+
add_define 'RUBY19'
+ add_define 'RUBY193' if patch >= 3
hdrs = proc {
have_header("method.h") # exists on 1.9.2
View
@@ -123,6 +123,10 @@ static VALUE Isend;
#include <vm_core.h>
#include <iseq.h>
+ #ifdef RUBY193
+ #define ruby_current_thread ((rb_thread_t *)RTYPEDDATA_DATA(rb_thread_current()))
+ #endif
+
int
rb_stack_trace(void** result, int max_depth)
{

0 comments on commit 59ed256

Please sign in to comment.