summaryrefslogtreecommitdiffstats
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
commit9f8ab2d816d0a32e6248052c1e4425c34c0cf48d (patch)
tree57908b712578ea69b31491e57e4b32e5a89fc889 /parse.y
parent189e99afa9777b785bb5e5932020498fdb5ea94e (diff)
downloadruby-9f8ab2d816d0a32e6248052c1e4425c34c0cf48d.tar.gz
ruby-9f8ab2d816d0a32e6248052c1e4425c34c0cf48d.tar.xz
ruby-9f8ab2d816d0a32e6248052c1e4425c34c0cf48d.zip
* parse.y (assoc_list): odd number check only for NODE_ARRAY.
[ruby-dev:31082] git-svn-id: http://svn.ruby-lang.org/repos/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 b3050d25c..b6a3fc338 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;