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

ruby-changes:27751

From: naruse <ko1@a...>
Date: Mon, 18 Mar 2013 01:25:34 +0900 (JST)
Subject: [ruby-changes:27751] naruse:r39803 (trunk): * io.c (io_fillbuf): show fd number on failure to debug.

naruse	2013-03-18 01:25:21 +0900 (Mon, 18 Mar 2013)

  New Revision: 39803

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39803

  Log:
    * io.c (io_fillbuf): show fd number on failure to debug.
      http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20130316T050302Z.diff.html.gz

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39802)
+++ ChangeLog	(revision 39803)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Mar 18 01:14:56 2013  NARUSE, Yui  <naruse@r...>
+
+	* 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@g...>
 
 	* ext/date/date_core.c: include sys/time.h for avoiding implicit
Index: io.c
===================================================================
--- io.c	(revision 39802)
+++ io.c	(revision 39803)
@@ -1657,7 +1657,13 @@ io_fillbuf(rb_io_t *fptr) https://github.com/ruby/ruby/blob/trunk/io.c#L1657
         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 */

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

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