зеркало из https://github.com/github/ruby.git
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:
Родитель
e0aaf5f5ca
Коммит
941621946f
|
@ -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>
|
||||
|
||||
* 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) {
|
||||
switch (TYPE(err)) {
|
||||
case T_FIXNUM:
|
||||
case T_BIGNUM:
|
||||
if (RB_INTEGER_TYPE_P(err))
|
||||
rb_syserr_fail_path(NUM2INT(err), fptr->pathv);
|
||||
|
||||
default:
|
||||
rb_exc_raise(err);
|
||||
}
|
||||
else
|
||||
rb_exc_raise(err);
|
||||
}
|
||||
free_io_buffer(&fptr->rbuf);
|
||||
free_io_buffer(&fptr->wbuf);
|
||||
|
|
Загрузка…
Ссылка в новой задаче