On Jul 27, 12:23 am, Shawn <[email protected]> wrote: > sequel-3.2.0/lib/sequel/adapters/mysql.rb line 151: > > 148: yield r if r > 149: if conn.respond_to?(:next_result) && > conn.next_result > 150: loop do > =>151: r.free > 152: r = nil > 153: begin > > Sometimes fails with message "undefined method `free' for nil:NilClass > (NoMethodError)" > > It's checking r's value at 148, so there is the possibility that r is > nil. But that conditional does not extend to line 151, so if r is nil, > the method call to free will fail. > > Please fix.
This should only fail if conn.query(sql) returns nil or if conn.use_result returns nil and conn.next_result is true. That seems unlikely, but I guess it can still happen. Can you try the patch at http://pastie.org/560310.txt? Also, if you wouldn't mind sharing the code that causes the error, I'd appreciate it. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
