From: Anthony Simonelli Date: 2012-02-08T06:27:56+09:00 Subject: Appending to an Array --14dae93996cdac97c804b86673ac Content-Type: text/plain; charset=ISO-8859-1 I am querying a database using DBI and ODBC. After I run the execute, I want to grab each row as an array, and add it to another array, essentially creating an Array of Arrays. I've tried this two ways with the same result: sth = dbh.execute("SELECT * FROM SOMETABLE") rows = sth.fetch_all and rows = sth.fetch do |row| rows << row end The result for both is that the last row is repeated in the array however many times there are rows. Why isn't it appending correctly? Thanks, Anthony --14dae93996cdac97c804b86673ac--