aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-20 06:29:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-20 06:29:06 +0000
commitc6b9f2913a66e9c9d1746b3ba3564858dd5eb5b3 (patch)
tree73551d7e30ef6670105c8617ad1c58ad26ee92d1 /error.c
parent52231de9130b9ab8329870b6c6030349977e841d (diff)
downloadruby-c6b9f2913a66e9c9d1746b3ba3564858dd5eb5b3.tar.gz
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.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) : "";