summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 3a68e48a369..1fe013ffe74 100644
--- a/eval.c
+++ b/eval.c
@@ -4708,6 +4708,9 @@ block_pass(self, node)
volatile int orphan;
volatile int safe = safe_level;
+ if (NIL_P(block)) {
+ return rb_eval(self, node->nd_iter);
+ }
if (obj_is_kind_of(block, cMethod)) {
block = method_proc(block);
}