aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-27 01:03:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-27 01:03:55 +0000
commit6fdb6e7129aaeb1dabefcdd0618a9d3ae24f3601 (patch)
tree48882b5b698815b74d9838aed1b6b5f08c3409dc /file.c
parentb2ffcde6d61d1ee513b8ce29d7f4e2ed79f3d954 (diff)
downloadruby-6fdb6e7129aaeb1dabefcdd0618a9d3ae24f3601.tar.gz
file.c: fix messages
* file.c (sys_fail2): show method function names but not "sys_fail2". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/file.c b/file.c
index 80b31ccd5a..e6edbba44c 100644
--- a/file.c
+++ b/file.c
@@ -2687,9 +2687,14 @@ rb_file_s_utime(int argc, VALUE *argv)
return LONG2FIX(n);
}
-NORETURN(static void sys_fail2(VALUE,VALUE));
+#ifdef RUBY_FUNCTION_NAME_STRING
+# define sys_fail2(s1, s2) sys_fail2_in(RUBY_FUNCTION_NAME_STRING, s1, s2)
+#else
+# define sys_fail2_in(func, s1, s2) sys_fail2(s1, s2)
+#endif
+NORETURN(static void sys_fail2_in(const char *,VALUE,VALUE));
static void
-sys_fail2(VALUE s1, VALUE s2)
+sys_fail2_in(const char *func, VALUE s1, VALUE s2)
{
VALUE str;
#ifdef MAX_PATH
@@ -2706,7 +2711,11 @@ sys_fail2(VALUE s1, VALUE s2)
rb_str_cat2(str, ", ");
rb_str_append(str, rb_str_ellipsize(s2, max_pathlen));
rb_str_cat2(str, ")");
+#ifdef RUBY_FUNCTION_NAME_STRING
+ rb_sys_fail_path_in(func, str);
+#else
rb_sys_fail_path(str);
+#endif
}
#ifdef HAVE_LINK