aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-15 02:09:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-15 02:09:27 +0000
commitba3908ee33b30d63b5e80a800363bdbd1e02bfa1 (patch)
tree46dbee7a4fdfe609699e9b24f733b3041c8330c4 /parse.y
parent02ec298ad01e65fcc0d6d8fa15e1bbb0e946b6b5 (diff)
downloadruby-ba3908ee33b30d63b5e80a800363bdbd1e02bfa1.tar.gz
ruby.h: check argc to rb_funcall
* include/ruby/ruby.h (rb_funcall): check if argc matches the number of variadic arguments, and replace with rb_funcallv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 44d96c35d0..6f91edfab3 100644
--- a/parse.y
+++ b/parse.y
@@ -831,10 +831,18 @@ static ID id_warn, id_warning, id_gets;
# define PRIsWARN "s"
# 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__)
+# 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__)
+# else
# define WARNING_CALL rb_funcall
+# endif
static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
# define compile_error ripper_compile_error
# define PARSER_ARG parser,