summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-05 09:58:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-05 09:58:23 +0000
commit3406ddcb335ad8ff6746b6af4d4dd7a3f8017aa9 (patch)
tree43f0f88cef3f9be7714e4eb43bb8fb76e6779def
parent5d65e0982d294e312602e3aef1f4b79c0f0cc0c1 (diff)
* process.c (run_exec_dup2): !save is false if Qnil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--process.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 79f5971..c0aad4c 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 2342c4b..d95c589 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);