なかだです。
END{}の中ではThread#groupがnilになるのはそういうもんでしょうか。
$ ruby -v -e 'p Thread.main.group' -e 'END{p Thread.main.group}'
ruby 1.8.0 (2003-10-20) [i686-linux]
#<ThreadGroup:0x402f1824>
nil
Index: eval.c
===================================================================
RCS file: /src/ruby/eval.c,v
retrieving revision 1.566
diff -u -2 -p -r1.566 eval.c
--- eval.c 15 Oct 2003 06:00:57 -0000 1.566
+++ eval.c 15 Oct 2003 06:50:19 -0000
@@ -9675,7 +9675,7 @@ rb_thread_cleanup()
if (th->status != THREAD_KILLED) {
rb_thread_ready(th);
- th->thgroup = 0;
- th->priority = 0;
if (th != main_thread) {
+ th->thgroup = 0;
+ th->priority = 0;
th->status = THREAD_TO_KILL;
RDATA(th->thread)->dfree = NULL;
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦