summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 94f38ee99f..3b6833419a 100644
--- a/eval.c
+++ b/eval.c
@@ -2711,7 +2711,8 @@ when_check(NODE *tag, VALUE val, VALUE self)
if (when_check(tag->nd_head, val, self)) return Qtrue;
return when_check(tag->nd_body, val, self);
default:
- unknown_node(tag);
+ if (when_cond(val, rb_eval(self, tag))) return Qtrue;
+ break;
}
return Qfalse;
}