aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/error.c b/error.c
index ec2ad350f1..c8d51c101d 100644
--- a/error.c
+++ b/error.c
@@ -1967,9 +1967,16 @@ void
rb_sys_fail_path_in(const char *func_name, VALUE path)
{
int n = errno;
- VALUE args[2];
errno = 0;
+ rb_syserr_fail_path_in(func_name, n, path);
+}
+
+void
+rb_syserr_fail_path_in(const char *func_name, int n, VALUE path)
+{
+ VALUE args[2];
+
if (!path) path = Qnil;
if (n == 0) {
const char *s = !NIL_P(path) ? RSTRING_PTR(path) : "";