here’s what I was trying to do !!!
I think Object#class is something to be avoided in most cases. Frankly
it’s none of your business what class was used to create an object. It
doesn’t matter how an object sprang into existence, what matters is
how it quacks.
I want to replace an object with a delegate with no ill effects. Or
with a mock object, or with whatever. But uses of Object#class defeat
I would be inclined to make shared data explicit either with a constant
or a with a passed-in reference to the shared data, rather than implicit
SHARED = Struct.new(:ctest).new(2)
Test.new.itest #=> 2