Hi, At Sat, 30 Jan 2010 06:58:25 +0900, Marc-Andre Lafortune wrote in [ruby-core:27959]: > 1) The minimal test case > I wonder why I didn't copy-paste my actual original code. In any case, > the bug happens if the instance method #load is redefined in any way > (and not the module method, as in my posted example). Thus the file > 'load.rb' should read: > > module Kernel > def load > end > end > generate_any_exception It seems like same as [ruby-dev:40234]. I think it should use called_id instead of original_id to traverse the backtrace, but currently called_id is not set always properly. I loose a patch to fix it now.
Index: vm.c =================================================================== --- vm.c (revision 26470) +++ vm.c (working copy) @@ -734,5 +734,5 @@ vm_backtrace_each(rb_thread_t *th, int l else if (RUBYVM_CFUNC_FRAME_P(cfp)) { if (NIL_P(file)) file = rb_str_new_cstr("ruby"); - if ((*iter)(arg, file, line_no, rb_id2str(cfp->me->def->original_id))) break; + if ((*iter)(arg, file, line_no, rb_id2str(cfp->me->called_id))) break; } cfp = RUBY_VM_NEXT_CONTROL_FRAME(cfp);
-- Nobu Nakada