Skip to content

Commit

Permalink
current thread is invariant.
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 14, 2011
1 parent 8eb8bdc commit 4cbe9a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/ruby_debug/ruby_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,17 +879,21 @@ static void
save_frames(debug_context_t *debug_context)
{
int size;
VALUE thread;
rb_thread_t *th;

if (debug_context->cfp_count == 0)
return;

/* save the entire call frame state */
thread = rb_thread_current();
GetThreadPtr(thread, th);
for (size = 0; size < debug_context->cfp_count; size++)
{
rb_binding_t *bind;
VALUE bindval = binding_alloc(rb_cBinding);
GetBindingPtr(bindval, bind);
bind->env = rb_vm_make_env_object(GET_THREAD(), debug_context->cfp[size]);
bind->env = rb_vm_make_env_object(th, debug_context->cfp[size]);
}

debug_context->catch_table.mod_name = rb_obj_class(rb_errinfo());
Expand Down

0 comments on commit 4cbe9a2

Please sign in to comment.