diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-07 05:59:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-07 05:59:42 +0000 |
commit | 9d77639f30172b0e3b88ea22df0724df61240161 (patch) | |
tree | 842fe16738ccff2dee8b962b1ed71ddc0eda62c5 /eval.c | |
parent | 5208fec1cfd93841e0b1a89c42cc2e8692e1aa9c (diff) |
* parse.y (dsym): :"symbol string" style should not contain `\0'.
* process.c (proc_detach): new method Proc#detach(pid) which
create background watcher thread to issue waitpid. [new]
* process.c (rb_detach_process): utility function to detach
process from C code.
* ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread,
and detach child process (by creating new idle waitpid watcher
thread).
* ext/pty/pty.c (pty_syswait): may lost signal stopped child.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -4024,17 +4024,19 @@ massign(self, node, val, pcall) int pcall; { NODE *list; + VALUE tmp; long i = 0, len; len = RARRAY(val)->len; list = node->nd_head; - if (len == 1 && list) { + if (len == 1 && list && (list->nd_next || node->nd_args)) { VALUE v = RARRAY(val)->ptr[0]; - VALUE tmp = rb_check_array_type(v); + tmp = rb_check_array_type(v); if (NIL_P(tmp)) { assign(self, list->nd_head, v, pcall); list = list->nd_next; + i = 1; } else { len = RARRAY(tmp)->len; @@ -4043,13 +4045,13 @@ massign(self, node, val, pcall) list = list->nd_next; } } - i = 1; } else { for (; list && i<len; i++) { assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall); list = list->nd_next; } + tmp = val; } if (pcall && list) goto arg_error; if (node->nd_args) { @@ -4057,7 +4059,7 @@ massign(self, node, val, pcall) /* no check for mere `*' */ } else if (!list && i<len) { - assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall); + assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(tmp)->ptr+i), pcall); } else { assign(self, node->nd_args, rb_ary_new2(0), pcall); @@ -8640,7 +8642,7 @@ rb_thread_run(thread) return thread; } -static VALUE +VALUE rb_thread_kill(thread) VALUE thread; { |