summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--process.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 79f597142..c0aad4c91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Dec 5 18:55:25 2008 Tanaka Akira <akr@fsij.org>
+
+ * process.c (run_exec_dup2): !save is false if Qnil.
+
Fri Dec 5 18:07:32 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_read, rb_w32_write, rb_w32_isatty): check
diff --git a/process.c b/process.c
index 2342c4b83..d95c5896d 100644
--- a/process.c
+++ b/process.c
@@ -1910,7 +1910,7 @@ run_exec_dup2(VALUE ary, VALUE save)
}
/* sort the table by oldfd: O(n log n) */
- if (!save)
+ if (!RTEST(save))
qsort(pairs, n, sizeof(struct fd_pair), intcmp);
else
qsort(pairs, n, sizeof(struct fd_pair), intrcmp);