ext/ruby_prof.c in ruby-prof-0.7.9 vs ext/ruby_prof.c in ruby-prof-0.7.10
- old
+ new
@@ -147,12 +147,11 @@
result = rb_String(ID2SYM(mid));
if (depth > 0)
{
char buffer[65];
- sprintf(buffer, "d%i", depth);
- rb_str_cat2(result, "-");
+ sprintf(buffer, "(d%i)", depth);
rb_str_cat2(result, buffer);
}
return result;
}
@@ -1206,10 +1205,10 @@
#ifdef RUBY_VM
// we need to walk up the stack to find the right one [http://redmine.ruby-lang.org/issues/show/2610] (for now)
// sometimes frames don't have line and source somehow [like blank]
// if we hit one there's not much we can do...I guess...
// or maybe we don't have one because we're at the top or something.
- while( frame->call_info->target->key->mid && frame->call_info->target->key->klass && ((frame->call_info->target->key->mid != mid) || (frame->call_info->target->key->klass != klass))){
+ while( frame && frame->call_info->target->key->mid && frame->call_info->target->key->klass && ((frame->call_info->target->key->mid != mid) || (frame->call_info->target->key->klass != klass))){
frame = pop_frame(thread_data, now);
}
#endif
break;
}