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

ruby-changes:27700

From: naruse <ko1@a...>
Date: Thu, 14 Mar 2013 13:01:50 +0900 (JST)
Subject: [ruby-changes:27700] naruse:r39752 (trunk): * file.c (rb_sys_fail_path0): add to append the name of called function

naruse	2013-03-14 13:01:39 +0900 (Thu, 14 Mar 2013)

  New Revision: 39752

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

  Log:
    * file.c (rb_sys_fail_path0): add to append the name of called function
      to ease debugging for example blow umask_spec failure.
      http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130309T010202Z.diff.html.gz
    
    * file.c (rb_sys_fail_path): use rb_sys_fail_path0.

  Modified files:
    trunk/ChangeLog
    trunk/file.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39751)
+++ ChangeLog	(revision 39752)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Mar 14 12:59:59 2013  NARUSE, Yui  <naruse@r...>
+
+	* file.c (rb_sys_fail_path0): add to append the name of called function
+	  to ease debugging for example blow umask_spec failure.
+	  http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130309T010202Z.diff.html.gz
+
+	* file.c (rb_sys_fail_path): use rb_sys_fail_path0.
+
 Thu Mar 14 12:53:15 2013  Luis Lavena  <luislavena@g...>
 
 	* win32/file.c (get_user_from_path):  add internal function that retrieves
Index: file.c
===================================================================
--- file.c	(revision 39751)
+++ file.c	(revision 39752)
@@ -102,7 +102,16 @@ int flock(int, int); https://github.com/ruby/ruby/blob/trunk/file.c#L102
 #define STAT(p, s)	stat((p), (s))
 #endif
 
-#define rb_sys_fail_path(path) rb_sys_fail_str(path)
+#define rb_sys_fail_path(path) rb_sys_fail_path0(__func__, path)
+
+NORETURN(static void rb_sys_fail_path0(const char *,VALUE));
+static void
+rb_sys_fail_path0(const char *func_name, VALUE path)
+{
+    VALUE mesg = rb_str_new_cstr(func_name);
+    rb_str_buf_append(mesg, path);
+    rb_sys_fail_str(mesg);
+}
 
 #if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
 static int

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

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