diff options
author | S-H-GAMELINKS <gamelinks007@gmail.com> | 2022-11-15 13:24:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-11-16 18:58:33 +0900 |
commit | 1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6 (patch) | |
tree | 823f1ca5409fdd930b05d974cdb70953b6e7e128 /io_buffer.c | |
parent | dc1c4e46758ace2c9e5e822df0d64b16bb564bb4 (diff) |
Using UNDEF_P macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6721
Diffstat (limited to 'io_buffer.c')
-rw-r--r-- | io_buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/io_buffer.c b/io_buffer.c index cbf51250c4..dc9d613524 100644 --- a/io_buffer.c +++ b/io_buffer.c @@ -2384,7 +2384,7 @@ rb_io_buffer_read(VALUE self, VALUE io, size_t length, size_t offset) if (scheduler != Qnil) { VALUE result = rb_fiber_scheduler_io_read(scheduler, io, self, SIZET2NUM(length), SIZET2NUM(offset)); - if (result != Qundef) { + if (!UNDEF_P(result)) { return result; } } @@ -2501,7 +2501,7 @@ rb_io_buffer_pread(VALUE self, VALUE io, rb_off_t from, size_t length, size_t of if (scheduler != Qnil) { VALUE result = rb_fiber_scheduler_io_pread(scheduler, io, OFFT2NUM(from), self, SIZET2NUM(length), SIZET2NUM(offset)); - if (result != Qundef) { + if (!UNDEF_P(result)) { return result; } } @@ -2574,7 +2574,7 @@ rb_io_buffer_write(VALUE self, VALUE io, size_t length, size_t offset) if (scheduler != Qnil) { VALUE result = rb_fiber_scheduler_io_write(scheduler, io, self, SIZET2NUM(length), SIZET2NUM(offset)); - if (result != Qundef) { + if (!UNDEF_P(result)) { return result; } } @@ -2668,7 +2668,7 @@ rb_io_buffer_pwrite(VALUE self, VALUE io, rb_off_t from, size_t length, size_t o if (scheduler != Qnil) { VALUE result = rb_fiber_scheduler_io_pwrite(scheduler, io, OFFT2NUM(from), self, SIZET2NUM(length), SIZET2NUM(offset)); - if (result != Qundef) { + if (!UNDEF_P(result)) { return result; } } |