2008/3/12, Adam Akhtar <adamtemporary / gmail.com>:
> Thank you both of you for you help. I was wondering how to create a
>  'copy' of the contents. looks like dup will work fine.

But keep in mind aliasing effects when using #dup.   The default
implementation does just a shallow copy.

irb(main):001:0> a1 = ["foo"]
=> ["foo"]
irb(main):002:0> a2 = a1.dup
=> ["foo"]
irb(main):003:0> a2.first.sub! /^f/, 'F'
=> "Foo"
irb(main):004:0> a2
=> ["Foo"]
irb(main):005:0> a1
=> ["Foo"]
irb(main):006:0>

Kind regards

robert

-- 
use.inject do |as, often| as.you_can - without end