summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-02 00:31:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-02 00:31:17 +0000
commit120a473f4f1a5146e4e49db1a61f2854d609df03 (patch)
tree35ffa1fb7bc0fd6ba9fc19021d6fd7e2405d5a23
parente521f9d6d68d26642fb75bc41a2b6f2f191c0d6d (diff)
downloadruby-120a473f4f1a5146e4e49db1a61f2854d609df03.tar.gz
ruby-120a473f4f1a5146e4e49db1a61f2854d609df03.tar.xz
ruby-120a473f4f1a5146e4e49db1a61f2854d609df03.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/trunk@7436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--eval.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ad144ef7..62622dea0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Dec 2 09:30:58 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (thread_mark): mark thread group. [ruby-dev:25020]
+
+ * eval.c (thgroup_add): check whether the argument is really a Thread.
+
Thu Dec 2 07:57:16 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (rb_io_ctl): [ruby-dev:25019]
diff --git a/eval.c b/eval.c
index 0462a1e7e..7c1e62802 100644
--- a/eval.c
+++ b/eval.c
@@ -9786,6 +9786,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;
@@ -12480,6 +12481,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");