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

ruby-changes:34354

From: nobu <ko1@a...>
Date: Sun, 15 Jun 2014 10:09:21 +0900 (JST)
Subject: [ruby-changes:34354] nobu:r46435 (trunk): process.c: use RB_TYPE_P

nobu	2014-06-15 10:09:17 +0900 (Sun, 15 Jun 2014)

  New Revision: 46435

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

  Log:
    process.c: use RB_TYPE_P
    
    * process.c (check_exec_redirect): use RB_TYPE_P instead of single
      comparison of TYPE().

  Modified files:
    trunk/process.c
Index: process.c
===================================================================
--- process.c	(revision 46434)
+++ process.c	(revision 46435)
@@ -1595,7 +1595,7 @@ check_exec_redirect(VALUE key, VALUE val https://github.com/ruby/ruby/blob/trunk/process.c#L1595
             key = check_exec_redirect_fd(key, 1);
         if (FIXNUM_P(key) && (FIX2INT(key) == 1 || FIX2INT(key) == 2))
             flags = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC);
-        else if (TYPE(key) == T_ARRAY) {
+        else if (RB_TYPE_P(key, T_ARRAY)) {
 	    int i;
 	    for (i = 0; i < RARRAY_LEN(key); i++) {
 		VALUE v = RARRAY_PTR(key)[i];

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

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