From: Rick DeNatale Date: 2006-08-16T03:34:18+09:00 Subject: Re: problems with dup and clone... On 8/14/06, Russell Fulton wrote: > > I have printed out host and hosts[ "default-#{type}"]: > > > #<#:0xb73e5a00> > #<#:0xb73e599c> But those ARE two different instances. The interesting thing is that the class in both cases seems to be anonymous. How did you build hosts? You say that it contains different "class instances" One way to get such anonymous classes would be something like this: irb(main):040:0> fd = Foo.dup => # irb(main):041:0> fd.new => #<#:0xb7d11310> irb(main):042:0> fd.new => #<#:0xb7d0f074> irb(main):043:0> fd.new.equal?(fd.new) => false Note that the two instances have the same oid for their class, (which is the copy of the Foo class), but different oids of their own. -- Rick DeNatale IPMS/USA Region 12 Coordinator http://ipmsr12.denhaven2.com/ Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/