aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 298326a556..54884850e9 100644
--- a/eval.c
+++ b/eval.c
@@ -604,8 +604,7 @@ rb_block_given_p(void)
{
rb_thread_t *th = GET_THREAD();
- if ((th->cfp->lfp[0] & 0x02) == 0 &&
- GC_GUARDED_PTR_REF(th->cfp->lfp[0])) {
+ if (RUBY_VM_GET_BLOCK_PTR(th->cfp)) {
return TRUE;
}
else {