ext/thread_frame.c in rb-threadframe-0.38 vs ext/thread_frame.c in rb-threadframe-0.39

- old
+ new

@@ -4,11 +4,11 @@ * Access to Ruby's rb_control_frame_t and methods for working with that. * Things like getting a binding for a control frame. */ /* What release we got? */ -#define THREADFRAME_VERSION "0.38" +#define THREADFRAME_VERSION "0.39" #include <string.h> #include "../include/vm_core_mini.h" /* Pulls in ruby.h and node.h */ #include "proc_extra.h" #include "iseq_extra.h" @@ -337,13 +337,11 @@ long int ret_val; prev_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(tf->cfp); if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(tf->th, prev_cfp)) return Qnil; ret_val = tf->cfp->sp - prev_cfp->sp - 1; - /* FIXME: Why For C Functions we tack on 3? Possibly we're doing - the previous frame and possibly that's where the action is that - we should be looking at.? */ - if (RUBYVM_CFUNC_FRAME_P(tf->cfp)) ret_val += 3; + /* FIXME: Why For C Functions we tack on 2 for this RubyVM::ENV? */ + if (RUBYVM_CFUNC_FRAME_P(tf->cfp)) ret_val += 2; return ret_val; } /* * call-seq: