summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-25 12:32:19 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-25 12:32:19 +0000
commit0f377c1c1038d3a56f1fa5508127b96fd1f43c6d (patch)
treeb69b749678f98d8040368f86f1b6f24accc678ed /io.c
parent5e808b6ba38dbd974b617e80e2cf054eaaca604f (diff)
merge revision(s) 34786,34787,34788,34789:
* dir.c, file.c, io.c: use rb_sys_fail_path. * error.c: new functions to deal exceptions with string instances. * dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str. * test/ruby/test_literal.rb (TestRubyLiteral#test_special_const): test for https://bugs.php.net/bug.php?id=61095 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io.c b/io.c
index 0cda6f20ae..2945764d64 100644
--- a/io.c
+++ b/io.c
@@ -219,7 +219,7 @@ rb_update_max_fd(int fd)
# endif
#endif
-#define rb_sys_fail_path(path) rb_sys_fail(NIL_P(path) ? 0 : RSTRING_PTR(path))
+#define rb_sys_fail_path(path) rb_sys_fail_str(path)
static int io_fflush(rb_io_t *);
@@ -4795,7 +4795,7 @@ rb_sysopen(VALUE fname, int oflags, mode_t perm)
fd = rb_sysopen_internal(&data);
}
if (fd < 0) {
- rb_sys_fail(RSTRING_PTR(fname));
+ rb_sys_fail_path(fname);
}
}
rb_update_max_fd(fd);
@@ -5407,7 +5407,7 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
fp = popen(cmd, modestr);
if (eargp)
rb_run_exec_options(&sarg, NULL);
- if (!fp) rb_sys_fail(RSTRING_PTR(prog));
+ if (!fp) rb_sys_fail_path(prog);
fd = fileno(fp);
#endif