We use the fetch_hash method to retrieve single items but ran into a case where nothing was returned when fetch_row was called and subsequently the to_hash call on the nil row raised a NoMethodError. It feels like the more appropriate result would be to return nil from fetch_hash.
I don't know if that violates any design principle for fetch_hash interface that you envision, but this is the workaround we use.
fixed condition where to_hash called on nil.
This newline at end-of-file change was unintentional -- my editor was overzealous apparently.
demonstrate the nil behavior for fetch_hash.