summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--parse.y16
2 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 865f074bde..c39c726b1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 26 18:03:30 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * parse.y: comma at the end of line is no longer allowed.
+ A patch from Yukihiro Matsumoto <matz AT ruby-lang.org>.
+ (fixed #3456).
+
Sun Jun 26 13:35:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* vm_dump.c (rb_vm_bugreport): change CrashReporter suggestion messages
diff --git a/parse.y b/parse.y
index 57ccfc02d6..b1ba220ccb 100644
--- a/parse.y
+++ b/parse.y
@@ -2414,6 +2414,18 @@ opt_paren_args : none
opt_call_args : none
| call_args
+ | args ','
+ {
+ $$ = $1;
+ }
+ | args ',' assocs ','
+ {
+ /*%%%*/
+ $$ = arg_append($1, NEW_HASH($3));
+ /*%
+ $$ = arg_add_assocs($1, $3);
+ %*/
+ }
;
call_args : command
@@ -2487,10 +2499,6 @@ opt_block_arg : ',' block_arg
{
$$ = $2;
}
- | ','
- {
- $$ = 0;
- }
| none
{
$$ = 0;