|
9 | 9 | #include <insns_info.inc> |
10 | 10 | #include "ruby_debug.h" |
11 | 11 |
|
12 | | -#define DEBUG_VERSION "0.11.30.pre15" |
| 12 | +#define DEBUG_VERSION "0.11.31" |
13 | 13 |
|
14 | 14 | #define FRAME_N(n) (&debug_context->frames[debug_context->stack_size-(n)-1]) |
15 | 15 | #define GET_FRAME (FRAME_N(check_frame_number(debug_context, frame))) |
@@ -906,12 +906,12 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl |
906 | 906 | { |
907 | 907 | case RUBY_EVENT_LINE: |
908 | 908 | { |
909 | | - if(debug_context->stack_size == 0 || |
910 | | - get_top_frame(debug_context)->info.runtime.block_iseq != thread->cfp->block_iseq || |
911 | | - get_top_frame(debug_context)->info.runtime.cfp->iseq != thread->cfp->iseq) |
| 909 | + if(debug_context->stack_size == 0) { |
912 | 910 | save_call_frame(event, debug_context, self, file, line, mid); |
913 | | - else |
| 911 | + } |
| 912 | + else { |
914 | 913 | set_frame_source(event, debug_context, self, file, line, mid); |
| 914 | + } |
915 | 915 |
|
916 | 916 | if(RTEST(tracing) || CTX_FL_TEST(debug_context, CTX_FL_TRACING)) |
917 | 917 | rb_funcall(context, idAtTracing, 2, rb_str_new2(file), INT2FIX(line)); |
@@ -986,8 +986,9 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl |
986 | 986 | case RUBY_EVENT_C_RETURN: |
987 | 987 | { |
988 | 988 | /* note if a block is given we fall through! */ |
989 | | - if(!rb_method_boundp(klass, mid, 0) || !c_call_new_frame_p(klass, mid)) |
| 989 | + if(!rb_method_boundp(klass, mid, 0) || !c_call_new_frame_p(klass, mid)) { |
990 | 990 | break; |
| 991 | + } |
991 | 992 | } |
992 | 993 | case RUBY_EVENT_RETURN: |
993 | 994 | case RUBY_EVENT_END: |
|
0 commit comments