Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

exclude ifunc frames

  • Loading branch information...
commit 86b89091cd2e32ddf14b96d13f9dc05fa778b7e2 1 parent 0a74a73
John Mair authored
6 ext/binding_of_caller/binding_of_caller.c
View
@@ -78,8 +78,12 @@ binding_alloc(VALUE klass)
return obj;
}
+static bool ifunc_p(rb_control_frame_t * cfp) {
+ return (cfp->flag & VM_FRAME_MAGIC_MASK) == VM_FRAME_MAGIC_IFUNC;
+}
+
static bool valid_frame_p(rb_control_frame_t * cfp, rb_control_frame_t * limit_cfp) {
- return cfp->iseq && !NIL_P(cfp->self);
+ return cfp->iseq && !ifunc_p(cfp) && !NIL_P(cfp->self);
}
static rb_control_frame_t * find_valid_frame(rb_control_frame_t * cfp, rb_control_frame_t * limit_cfp) {
2  lib/binding_of_caller/version.rb
View
@@ -1,3 +1,3 @@
module BindingOfCaller
- VERSION = "0.6.7"
+ VERSION = "0.6.8pre1"
end
Please sign in to comment.
Something went wrong with that request. Please try again.