mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
io.c: use RB_INTEGER_TYPE_P
* io.c (fptr_finalize): use dedicated macro RB_INTEGER_TYPE_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0aaf5f5ca
commit
941621946f
2 changed files with 7 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Oct 6 09:19:21 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (fptr_finalize): use dedicated macro RB_INTEGER_TYPE_P.
|
||||||
|
|
||||||
Wed Oct 5 18:02:44 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
Wed Oct 5 18:02:44 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/http/response.rb: Improve document readability.
|
* lib/net/http/response.rb: Improve document readability.
|
||||||
|
|
10
io.c
10
io.c
|
@ -4292,14 +4292,10 @@ fptr_finalize(rb_io_t *fptr, int noraise)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NIL_P(err) && !noraise) {
|
if (!NIL_P(err) && !noraise) {
|
||||||
switch (TYPE(err)) {
|
if (RB_INTEGER_TYPE_P(err))
|
||||||
case T_FIXNUM:
|
|
||||||
case T_BIGNUM:
|
|
||||||
rb_syserr_fail_path(NUM2INT(err), fptr->pathv);
|
rb_syserr_fail_path(NUM2INT(err), fptr->pathv);
|
||||||
|
else
|
||||||
default:
|
rb_exc_raise(err);
|
||||||
rb_exc_raise(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
free_io_buffer(&fptr->rbuf);
|
free_io_buffer(&fptr->rbuf);
|
||||||
free_io_buffer(&fptr->wbuf);
|
free_io_buffer(&fptr->wbuf);
|
||||||
|
|
Loading…
Add table
Reference in a new issue