1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (opt_block_arg): Allow a trailing comma at the end of

an argument list.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@29440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2010-10-11 09:34:39 +00:00
parent 26ea706823
commit 329467bb40
3 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Mon Oct 11 18:06:57 2010 Akinori MUSHA <knu@iDaemons.org>
* parse.y (opt_block_arg): Allow a trailing comma at the end of
an argument list.
Fri Oct 8 10:51:56 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (RBCONFIG): depends on version.h due to

11
NEWS
View file

@ -28,6 +28,17 @@ with all sufficient information, see the ChangeLog file.
equivalent to f.call(x), is supported. This is mainly for use
in invoking a Proc.
* trailing comma in argument list
A trailing comma can be put at the end of an argument list.
e.g.
MyStruct = Struct.new(
:id,
:name,
:created_at,
:description,
)
=== Configuration changes
* version specific directories

View file

@ -1423,6 +1423,10 @@ opt_block_arg : ',' block_arg
{
$$ = $2;
}
| ','
{
$$ = 0;
}
| none
;