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 | 7590bd684f00ac8aad5e6f01728145f61ec1d0eb (patch) | |
tree | 842fe16738ccff2dee8b962b1ed71ddc0eda62c5 /eval.c | |
parent | e9adbe3fc0c9c78637d9be2d97ac7360b545a05f (diff) | |
download | ruby-7590bd684f00ac8aad5e6f01728145f61ec1d0eb.tar.gz ruby-7590bd684f00ac8aad5e6f01728145f61ec1d0eb.tar.xz ruby-7590bd684f00ac8aad5e6f01728145f61ec1d0eb.zip |
* 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: http://svn.ruby-lang.org/repos/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; { |