summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog5
-rw-r--r--parse.y2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3020ccc1f..d11144434 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 28 23:29:30 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (assoc_list): odd number check only for NODE_ARRAY.
+ [ruby-dev:31082]
+
Thu Jun 28 22:24:33 2007 Koichi Sasada <ko1@atdot.net>
* win32/Makefile.sub: define FUNC_FASTCALL macro.
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;