diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-02 00:31:17 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-02 00:31:17 +0000 |
| commit | 8aac2ad181f97c0722c40beb11bb84c6fae86e37 (patch) | |
| tree | 7c67144a4110035fdd921f3f47e049c01a59e138 /eval.c | |
| parent | f54f1442fea8afd7f0f22f6ad6cb4c7bd43482a2 (diff) | |
| download | ruby-8aac2ad181f97c0722c40beb11bb84c6fae86e37.tar.gz ruby-8aac2ad181f97c0722c40beb11bb84c6fae86e37.tar.xz ruby-8aac2ad181f97c0722c40beb11bb84c6fae86e37.zip | |
* eval.c (thread_mark): mark thread group. [ruby-dev:25020]
* eval.c (thgroup_add): check whether the argument is really a Thread.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -9696,6 +9696,7 @@ thread_mark(th) rb_gc_mark(th->last_line); rb_gc_mark(th->last_match); rb_mark_tbl(th->locals); + rb_gc_mark(th->thgroup); /* mark data in copied stack */ if (th == curr_thread) return; @@ -12375,6 +12376,10 @@ thgroup_add(group, thread) rb_secure(4); th = rb_thread_check(thread); + if (!th->next || !th->prev) { + rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)", + rb_obj_classname(thread)); + } if (OBJ_FROZEN(group)) { rb_raise(rb_eThreadError, "can't move to the frozen thread group"); |
