aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-02 06:24:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-02 06:24:19 +0000
commitc24aefb3524be00d5626e2b27b9087867feadaf5 (patch)
tree5df0e375b0836379200688bdf776ec2d7e9d87c6 /include
parent9f89d415aae31f30ad510eb5a7d5da797db005ae (diff)
downloadruby-c24aefb3524be00d5626e2b27b9087867feadaf5.tar.gz
rb_check_arity returns argc now
* include/ruby/intern.h (rb_check_arity): returns argc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h3
1 files changed, 2 insertions, 1 deletions
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)