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

ruby-changes:72760

From: Nobuyoshi <ko1@a...>
Date: Sat, 30 Jul 2022 17:30:12 +0900 (JST)
Subject: [ruby-changes:72760] 4ba2c66761 (master): Revert "* expand tabs. [ci skip]"

https://git.ruby-lang.org/ruby.git/commit/?id=4ba2c66761

From 4ba2c66761d6a293abdfba409241d31063cefd62 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 30 Jul 2022 17:29:56 +0900
Subject: Revert "* expand tabs. [ci skip]"

This reverts commit 0d842fecb4f75ab3b1d4097ebdb8e88f51558041.
---
 ext/io/nonblock/nonblock.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/ext/io/nonblock/nonblock.c b/ext/io/nonblock/nonblock.c
index cbd43d993a..b8a40ff38e 100644
--- a/ext/io/nonblock/nonblock.c
+++ b/ext/io/nonblock/nonblock.c
@@ -42,7 +42,7 @@ rb_io_nonblock_p(VALUE io) https://github.com/ruby/ruby/blob/trunk/ext/io/nonblock/nonblock.c#L42
     rb_io_t *fptr;
     GetOpenFile(io, fptr);
     if (get_fcntl_flags(fptr->fd) & O_NONBLOCK)
-        return Qtrue;
+	return Qtrue;
     return Qfalse;
 }
 #else
@@ -54,21 +54,21 @@ static void https://github.com/ruby/ruby/blob/trunk/ext/io/nonblock/nonblock.c#L54
 set_fcntl_flags(int fd, int f)
 {
     if (fcntl(fd, F_SETFL, f) == -1)
-        rb_sys_fail(0);
+	rb_sys_fail(0);
 }
 
 static int
 io_nonblock_set(int fd, int f, int nb)
 {
     if (nb) {
-        if ((f & O_NONBLOCK) != 0)
-            return 0;
-        f |= O_NONBLOCK;
+	if ((f & O_NONBLOCK) != 0)
+	    return 0;
+	f |= O_NONBLOCK;
     }
     else {
-        if ((f & O_NONBLOCK) == 0)
-            return 0;
-        f &= ~O_NONBLOCK;
+	if ((f & O_NONBLOCK) == 0)
+	    return 0;
+	f &= ~O_NONBLOCK;
     }
     set_fcntl_flags(fd, f);
     return 1;
@@ -127,9 +127,9 @@ rb_io_nonblock_set(VALUE io, VALUE nb) https://github.com/ruby/ruby/blob/trunk/ext/io/nonblock/nonblock.c#L127
     rb_io_t *fptr;
     GetOpenFile(io, fptr);
     if (RTEST(nb))
-        rb_io_set_nonblock(fptr);
+	rb_io_set_nonblock(fptr);
     else
-        io_nonblock_set(fptr->fd, get_fcntl_flags(fptr->fd), RTEST(nb));
+	io_nonblock_set(fptr->fd, get_fcntl_flags(fptr->fd), RTEST(nb));
     return io;
 }
 
@@ -160,15 +160,15 @@ rb_io_nonblock_block(int argc, VALUE *argv, VALUE io) https://github.com/ruby/ruby/blob/trunk/ext/io/nonblock/nonblock.c#L160
 
     GetOpenFile(io, fptr);
     if (argc > 0) {
-        VALUE v;
-        rb_scan_args(argc, argv, "01", &v);
-        nb = RTEST(v);
+	VALUE v;
+	rb_scan_args(argc, argv, "01", &v);
+	nb = RTEST(v);
     }
     f = get_fcntl_flags(fptr->fd);
     restore[0] = fptr->fd;
     restore[1] = f;
     if (!io_nonblock_set(fptr->fd, f, nb))
-        return rb_yield(io);
+	return rb_yield(io);
     return rb_ensure(rb_yield, io, io_nonblock_restore, (VALUE)restore);
 }
 #else
-- 
cgit v1.2.1


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

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