diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Mar 18 01:14:56 2013 NARUSE, Yui <naruse@ruby-lang.org> + + * io.c (io_fillbuf): show fd number on failure to debug. + http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20130316T050302Z.diff.html.gz + Sun Mar 17 02:38:21 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com> * ext/date/date_core.c: include sys/time.h for avoiding implicit @@ -1657,7 +1657,13 @@ io_fillbuf(rb_io_t *fptr) if (r < 0) { if (rb_io_wait_readable(fptr->fd)) goto retry; - rb_sys_fail_path(fptr->pathv); + { + VALUE path = rb_sprintf("fd:%d ", fptr->fd); + if (!NIL_P(fptr->pathv)) { + rb_str_append(path, fptr->pathv); + } + rb_sys_fail_path(path); + } } fptr->rbuf.off = 0; fptr->rbuf.len = (int)r; /* r should be <= rbuf_capa */ |