summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index b1b4ae5b1a..e7f87051a0 100644
--- a/eval.c
+++ b/eval.c
@@ -3427,7 +3427,7 @@ rb_yield_0(val, self, klass, acheck)
if (nd_type(block->var) == NODE_MASGN)
massign(self, block->var, val, acheck);
else {
- if (val != Qundef &&
+ if (acheck && val != Qundef &&
TYPE(val) == T_ARRAY && RARRAY(val)->len == 1) {
val = RARRAY(val)->ptr[0];
}