diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-20 06:29:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-20 06:29:06 +0000 |
commit | c6b9f2913a66e9c9d1746b3ba3564858dd5eb5b3 (patch) | |
tree | 73551d7e30ef6670105c8617ad1c58ad26ee92d1 /error.c | |
parent | 52231de9130b9ab8329870b6c6030349977e841d (diff) |
internal.h: rb_syserr_fail_path
* error.c (rb_syserr_fail_path_in): new function split from
rb_sys_fail_path_in to raise SystemCallError without errno.
* internal.h (rb_syserr_fail_path): like rb_sys_fail_path but without
errno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) : ""; |