Hi,
I need a universal cloning solution to deep clone module with all it's instance variables in ruby. I can't really use .clone method, since it doesn't work on activerecord objects (doesn't copy the id field). I also saw a workaroung by using marshal dump + marshal load, but it doesn't work on module and singleton objects. Does anyone know any solution to module? Or maybe you have another solution for my real problem: I have a module with instance variables set and I need to clone it to another module, modify objects in cloned object, then clone first module again without having changes made by second module.