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

ruby-changes:44039

From: nobu <ko1@a...>
Date: Thu, 8 Sep 2016 17:59:04 +0900 (JST)
Subject: [ruby-changes:44039] nobu:r56112 (trunk): io.c: check if Integer

nobu	2016-09-08 17:59:00 +0900 (Thu, 08 Sep 2016)

  New Revision: 56112

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

  Log:
    io.c: check if Integer
    
    * io.c (rb_file_initialize): check if fd is an Integer but not a
      Fixnum.

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 56111)
+++ io.c	(revision 56112)
@@ -7716,7 +7716,7 @@ rb_file_initialize(int argc, VALUE *argv https://github.com/ruby/ruby/blob/trunk/io.c#L7716
 	rb_raise(rb_eRuntimeError, "reinitializing File");
     }
     if (0 < argc && argc < 3) {
-	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
+	VALUE fd = rb_check_to_int(argv[0]);
 
 	if (!NIL_P(fd)) {
 	    argv[0] = fd;

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

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