diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 12:52:25 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 12:52:25 +0000 |
commit | ec612f96546c7bd185ab95baf32850423f57cee5 (patch) | |
tree | c8b543090edb6016a11fda3b22c55b4eb5b01cea /process.c | |
parent | d97052c067fcf987a8f4d1cee1733fb0d7f2edab (diff) | |
download | ruby-ec612f96546c7bd185ab95baf32850423f57cee5.tar.gz ruby-ec612f96546c7bd185ab95baf32850423f57cee5.tar.xz ruby-ec612f96546c7bd185ab95baf32850423f57cee5.zip |
* include/ruby/intern.h (rb_hash_dup): declared.
* hash.c (rb_hash_dup): new function.
* process.c (rb_spawn_internal): don't modify option hash.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2560,6 +2560,10 @@ rb_spawn_internal(int argc, VALUE *argv, int default_close_others) opthash = rb_hash_new(); RBASIC(opthash)->klass = 0; } + if (RBASIC(opthash)->klass) { + opthash = rb_hash_dup(opthash); + RBASIC(opthash)->klass = 0; + } if (!st_lookup(RHASH_TBL(opthash), close_others, 0)) rb_hash_aset(opthash, close_others, Qtrue); } |