From 158c742b51556ff416d2934fcb215ef77e7d0c7e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 17 Apr 2017 01:35:54 +0000 Subject: [PATCH] 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 --- parse.y | 4 ++-- 1 file 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