summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-28 04:51:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-28 04:51:27 +0000
commitab15a714f875b44f95d18a5e7cc0f67b1c518276 (patch)
treeed72b6199f2d32a57511f729ee6d861d8e622634 /eval.c
parentb6630a375d9c79de6b7ec0d684f7053292be0df5 (diff)
* eval.c (when_check): arbitrary values are allowed after splats.
fixed: [ruby-dev:28879] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}