summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--eval.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 51e686a280..dd84b9c129 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Dec 2 09:30:06 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.
+
Tue Nov 30 23:38:18 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (io_fread): need not to null terminate. [ruby-dev:24998]
diff --git a/eval.c b/eval.c
index 0e7059c39a..3bc3bd9359 100644
--- a/eval.c
+++ b/eval.c
@@ -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");