diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-15 02:09:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-15 02:09:27 +0000 |
commit | 0472578b26793e45434769200a806cb6190e5700 (patch) | |
tree | 46dbee7a4fdfe609699e9b24f733b3041c8330c4 /parse.y | |
parent | 6f1fbfd6187db01e3c3967468cc8b182fc8ca847 (diff) | |
download | bundler-0472578b26793e45434769200a806cb6190e5700.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.y | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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, |