Hi,

In message "[ruby-talk:10336] ObjectSpace.each_object & terminated objects"
    on 01/02/04, Dave Thomas <Dave / PragmaticProgrammer.com> writes:

|Sometime in the last week there's been a change that means that:
|
|  ObjectSpace.each_object {|o| o.id}
|
|generates the error:
|
|   -:1: method call on terminated obejct (NotImplementedError)
|	from -:1:in `each_object'
|	from -:1
|
|Is this something I need to document, or a bug?

It's a bug caused by incomplete back port from 1.7, here's the patch.

--- ../ruby1.6/gc.c	Sun Feb  4 02:58:31 2001
+++ gc.c	Fri Feb  2 20:38:10 2001
@@ -1052,2 +1052,3 @@
 		  default:
+		    if (!p->as.basic.klass) continue;
 		    rb_yield((VALUE)p);
@@ -1084,2 +1085,3 @@
 		  default:
+		    if (!p->as.basic.klass) continue;
 		    if (rb_obj_is_kind_of((VALUE)p, of)) {


							matz.