I have a statement like this in Ruby:
@mastertest = connection.execute("select code_ver from mastertest")
So now I want to make a copy of this 2-D array, because if I do something like @temp = @mastertest, it makes changes to @mastertest when I make any changes to @temp.
I tried using the following:
@temp = Marshal.load(Marshal.dump(@mastertest))
But this gives me an error saying "no marshal_dump is defined for class Mysql2::Result". So I am assuming that the @mastertest is of some other type than a 2-D array.
Can someone help me how to make a copy of this array?