aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-17 01:35:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-17 01:35:54 +0000
commit51ba1ad56bcf492d197f98fcee70235efe77bbde (patch)
treebf99e9d777b5b6483e4f8f6b57db85aed897160c /parse.y
parent0702b5797e9b4f724b3c4f16330f62fbc9f41b8b (diff)
downloadruby-51ba1ad56bcf492d197f98fcee70235efe77bbde.tar.gz
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 6f91edfab3..a55d27982d 100644
--- a/parse.y
+++ b/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