datamapper / do

DataObjects
147 stars 74 forks source link

do_postgres segfault (1.9.x) #19

Closed Ptico closed 12 years ago

Ptico commented 12 years ago

Info - https://gist.github.com/1530631

Environment: OSX 10.7.2 PostgreSQL 9.0.4

ruby-1.9.2-p290 ruby-1.9.3-p0

Not tested on 1.8.x

dbussink commented 12 years ago

Fixed this issue and it should be in the next release that I'm working on atm. Please realize that doing .to_a on a Reader only gives back a result set once, since a result is then read and there are no pending elements after it. If you need to keep it around, you should store the array that to_a returns and work with it from there.