diff --git a/ChangeLog b/ChangeLog index 154dd56c34..2c523b69fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Apr 2 15:24:18 2016 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_check_arity): returns argc. + Fri Apr 1 20:58:33 2016 Martin Duerst * enc/unicode/case-folding.rb, casefold.h: Data generation to implement diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 816bc7e140..e6f893ecdd 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -294,11 +294,12 @@ VALUE rb_check_funcall(VALUE, ID, int, const VALUE*); NORETURN(void rb_error_arity(int, int, int)); #define rb_check_arity rb_check_arity /* for ifdef */ -static inline void +static inline int rb_check_arity(int argc, int min, int max) { if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max)) rb_error_arity(argc, min, max); + return argc; } #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)