From: Gene Tani Date: 2005-10-31T00:32:06+09:00 Subject: Re: determining whether an object is an immediate? you think #clone is slow, try (you could test for adding singleton methods, that would be even slower!): + x.report("objSpace ") do + ITERATIONS.times do + OBJECTS.each do |obj| + begin + if ObjectSpace.include?(obj) + # nothin + end + rescue TypeError + # noting + end + end + end + end Timothy Hunter wrote: > Eric Mahurin wrote: > > This is be best I could come up with for determining whether an > > object is an immediate (Fixnum, Symbol, false, true, nil, > > others?): > >