Skip to content

Commit

Permalink
close statment only if its not closed
Browse files Browse the repository at this point in the history
  • Loading branch information
gnufied committed May 27, 2011
1 parent 985ace4 commit d48add7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def disconnect!


# Clears the prepared statements cache. # Clears the prepared statements cache.
def clear_cache! def clear_cache!
@statements.values.each { |hash| hash[:stmt].close } @statements.values.each { |hash| !hash[:stmt].closed? && hash[:stmt].close }
@statements.clear @statements.clear
end end


Expand Down

0 comments on commit d48add7

Please sign in to comment.