aboutsummaryrefslogtreecommitdiffstats
path: root/vm_eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_eval.c b/vm_eval.c
index c1b79f5061..8ea149c459 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1660,9 +1660,7 @@ rb_f_block_given_p(void)
rb_control_frame_t *cfp = th->cfp;
cfp = vm_get_ruby_level_caller_cfp(th, RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp));
- if (cfp != 0 &&
- (cfp->lfp[0] & 0x02) == 0 &&
- GC_GUARDED_PTR_REF(cfp->lfp[0])) {
+ if (cfp != 0 && RUBY_VM_GET_BLOCK_PTR(cfp)) {
return Qtrue;
}
else {