Fix fetching rows with tinytds adapter when identifier_output_method is nil #25

Merged
1 commit merged into from Mar 7, 2011

Projects

None yet

2 participants

@matsadler

In the tinytds adaptor the fetch_rows method is attempting to pass a non-existant 'block' variable to results.each when identifier_output_method is nil.

I've fixed this by replacing the reference to block with a call to Proc.new without any arguments, this should magically pick up the block passed to the fetch_rows method, create a proc, and pass it on.

I know it looks a little unusual, but I'm guessing it's better that appending &block to fetch_rows arguments, and needlessly creating an expensive proc in the case where identifier_output_method is set

@jeremyevans
Owner

Good catch, I'll apply this later today. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment