From: Stefan Salewski Date: 2011-02-24T07:24:14+09:00 Subject: Re: a, b = Array.new(2).map!{|x| data.dup} On Thu, 2011-02-24 at 07:00 +0900, niklas | brueckenschlaeger wrote: > Are you sure you can't rework your code to *not* copy data 5x? The code is related to handling configuration files, I have a basic configuration set, a hash called @output. And variants for on screen, pdf, png export. I can avoid duplicates, of course, if I look at the basic hash and at the special variants each time. But that is a little bit more complicated and consumes more time, which is not really good. All that is related to a graphical editor -- I have to clean up the code a bit, it will become available on my page some time, then we can discuss improvements. A tiny part related to cairo drawing is already there: http://www.ssalewski.de/PetEd-Demo.html.en