Kevin Mahler wrote in post #992907:
>
>   def extend_accessor(obj, name)
>     obj.singleton_class.module_eval { attr_accessor name }
>     obj
>   end
>

Hey, now.  obj.singleton_class is a class so how about using the synonym 
class_eval():

      obj.singleton_class.class_eval { attr_accessor name }

-- 
Posted via http://www.ruby-forum.com/.