mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: fix for empty __VA_ARGS__
* parse.y (WARN_CALL, WARNING_CALL): need `##` between a comman and `__VA_ARGS__` in the case it is empty, not to end arguments with a comma. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
269421084e
commit
158c742b51
1 changed files with 2 additions and 2 deletions
4
parse.y
4
parse.y
|
@ -832,14 +832,14 @@ static ID id_warn, id_warning, id_gets;
|
|||
# define WARN_ARGS(fmt,n) parser->value, id_warn, n, rb_usascii_str_new_lit(fmt)
|
||||
# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
|
||||
# ifdef HAVE_VA_ARGS_MACRO
|
||||
# define WARN_CALL(args,...) rb_funcall(args,__VA_ARGS__)
|
||||
# define WARN_CALL(args,...) rb_funcall(args,##__VA_ARGS__)
|
||||
# else
|
||||
# define WARN_CALL rb_funcall
|
||||
# endif
|
||||
# define WARNING_ARGS(fmt,n) parser->value, id_warning, n, rb_usascii_str_new_lit(fmt)
|
||||
# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
|
||||
# ifdef HAVE_VA_ARGS_MACRO
|
||||
# define WARNING_CALL(args,...) rb_funcall(args,__VA_ARGS__)
|
||||
# define WARNING_CALL(args,...) rb_funcall(args,##__VA_ARGS__)
|
||||
# else
|
||||
# define WARNING_CALL rb_funcall
|
||||
# endif
|
||||
|
|
Loading…
Add table
Reference in a new issue