head	1.2;
access;
symbols
	RELEASE_8_0_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2010.01.06.06.31.21;	author stas;	state dead;
branches;
next	1.1;

1.1
date	2009.06.02.17.25.37;	author stas;	state Exp;
branches;
next	;


desc
@@


1.2
log
@- Update to patchlevel 248.
@
text
@--- lib/ostruct.rb	2009/05/26 11:54:29	23578
+++ lib/ostruct.rb	2009/05/26 12:00:44	23579
@@@@ -111,25 +111,23 @@@@
   def inspect
     str = "#<#{self.class}"
 
-    Thread.current[InspectKey] ||= []
-    if Thread.current[InspectKey].include?(self) then
-      str << " ..."
-    else
+    ids = (Thread.current[InspectKey] ||= [])
+    if ids.include?(object_id)
+      return str << ' ...>'
+    end
+
+    ids << object_id
+    begin
       first = true
       for k,v in @@table
         str << "," unless first
         first = false
-
-        Thread.current[InspectKey] << v
-        begin
-          str << " #{k}=#{v.inspect}"
-        ensure
-          Thread.current[InspectKey].pop
-        end
+        str << " #{k}=#{v.inspect}"
       end
+      return str << '>'
+    ensure
+      ids.pop
     end
-
-    str << ">"
   end
   alias :to_s :inspect
 
@


1.1
log
@- Update ruby 1.8.7 to the latest revision available from ruby-lang.org.
  This updates also borrows some important bugfixes from Ruby CVS that
  is not available in patchlevel 160 yet.
- Drop GC patch support. It is broken with the new ruby version and
  seem to require the complete rewriting.
@
text
@@

