summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-28 14:33:45 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-28 14:33:45 +0000
commitbaaa30ec03195e4d6fc6c2d144f8224f250d58f2 (patch)
tree57908b712578ea69b31491e57e4b32e5a89fc889 /parse.y
parentdea470cca449120adc70592d2e934afd79c89c06 (diff)
* parse.y (assoc_list): odd number check only for NODE_ARRAY.
[ruby-dev:31082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index b3050d25cb..b6a3fc3388 100644
--- a/parse.y
+++ b/parse.y
@@ -4328,7 +4328,7 @@ assoc_list : none
| args trailer
{
/*%%%*/
- if ($1->nd_alen%2 != 0) {
+ if (nd_type($1) == NODE_ARRAY && $1->nd_alen%2 != 0) {
yyerror("odd number list for Hash");
}
$$ = $1;