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

ruby-changes:40775

From: nobu <ko1@a...>
Date: Wed, 2 Dec 2015 15:49:03 +0900 (JST)
Subject: [ruby-changes:40775] nobu:r52854 (trunk): encoding.c: use rb_check_arity

nobu	2015-12-02 15:48:51 +0900 (Wed, 02 Dec 2015)

  New Revision: 52854

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

  Log:
    encoding.c: use rb_check_arity
    
    * encoding.c (enc_dump): use rb_check_arity to just check number
      of arguments.

  Modified files:
    trunk/encoding.c
Index: encoding.c
===================================================================
--- encoding.c	(revision 52853)
+++ encoding.c	(revision 52854)
@@ -1268,7 +1268,7 @@ enc_compatible_p(VALUE klass, VALUE str1 https://github.com/ruby/ruby/blob/trunk/encoding.c#L1268
 static VALUE
 enc_dump(int argc, VALUE *argv, VALUE self)
 {
-    rb_scan_args(argc, argv, "01", 0);
+    rb_check_arity(argc, 0, 1);
     return enc_name(self);
 }
 

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

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