aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--io.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dbfd37485f..cd3b0d523f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 9 12:31:53 2004 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * io.c (pipe_open): should set prog if argc != 0.
+
Thu Dec 9 10:54:36 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/dbm/dbm.c (fdbm_select): [ruby-dev:25132]
diff --git a/io.c b/io.c
index 8a6e1f40ef..8256b57782 100644
--- a/io.c
+++ b/io.c
@@ -2915,7 +2915,8 @@ pipe_open(argc, argv, mode)
}
}
#else
- prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
+ if (argc)
+ prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
fp = popen(StringValueCStr(prog), mode);
if (!fp) rb_sys_fail(RSTRING(prog)->ptr);
fd = fileno(fp);