summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--file.c11
2 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 70d4613b8c..520476a1d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Mar 14 12:59:59 2013 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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@gmail.com>
* win32/file.c (get_user_from_path): add internal function that retrieves
diff --git a/file.c b/file.c
index d5abe304cf..3ee68f561f 100644
--- a/file.c
+++ b/file.c
@@ -102,7 +102,16 @@ int flock(int, int);
#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