[前][次][番号順一覧][スレッド一覧]

ruby-changes:42398

From: nobu <ko1@a...>
Date: Sat, 2 Apr 2016 14:27:47 +0900 (JST)
Subject: [ruby-changes:42398] nobu:r54472 (trunk): rb_check_arity returns argc now

nobu	2016-04-02 15:24:19 +0900 (Sat, 02 Apr 2016)

  New Revision: 54472

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54472

  Log:
    rb_check_arity returns argc now
    
    * include/ruby/intern.h (rb_check_arity): returns argc.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/intern.h
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 54471)
+++ include/ruby/intern.h	(revision 54472)
@@ -294,11 +294,12 @@ VALUE rb_check_funcall(VALUE, ID, int, c https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L294
 
 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)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54471)
+++ ChangeLog	(revision 54472)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Apr  2 15:24:18 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/intern.h (rb_check_arity): returns argc.
+
 Fri Apr  1 20:58:33 2016  Martin Duerst  <duerst@i...>
 
 	* enc/unicode/case-folding.rb, casefold.h: Data generation to implement

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]