ResultSet#to_a is not idempotent

I asked this on the rubyforge sqlite list, but it’s very quiet there, so
I’ll risk asking it here…

Calling #to_a on a ResultSet seems to clear the result, so that the next
time #to_a returns an empty array. Is this intended?

$ cat test.rb
require ‘sqlite3’

db = SQLite3::Database.new( “./test.sqlite” )
db.type_translation = true

db.execute <<END
create table if not exists t (
x real
)
END

db.execute “insert into t values (1)”

qry = db.prepare “select * from t”

res = qry.execute

p res.to_a
p res.to_a

$ ruby test.rb
[[1.0]]
[]