>>>>> "T" == Tom Clarke <tom / u2i.com> writes:

T> 	b) a similarly simple way to OldClass=NewClass that I can use in a 
T> dynamic context

 Adapt it if it's not a toplevel class

pigeon% cat b.rb
#!/usr/bin/ruby
class A
   def pose_as(b)
      Object.const_set(b, type)
   end
end

a = A.new
a.pose_as 'B'
p B.new
pigeon% 

pigeon% b.rb
#<A:0x401ad6a8>
pigeon% 


Guy Decoux