sdsykes / slim_scrooge

SlimScrooge heavily optimises your database interactions
313 stars 25 forks source link

Fixed stack overflow error with latest Devise #15

Closed purcell closed 13 years ago

purcell commented 13 years ago

Hi Stephen,

I found that slim_scrooge's override of Hash#update causes critical breakage with the latest devise; the devise guys had implemented #to_hash on a Hash subclass in such a way that it used Hash#update, so stack overflows ensued.

Here's a patch that makes slim_scrooge's version of Hash#update more careful about forcing to_hash on the other_hash arg.

Thanks so much for a wonderful gem.

-Steve

sdsykes commented 13 years ago

Thanks, I'll get to this over the weekend

purcell commented 13 years ago

Maybe this weekend? ;-)

If it's easier for you, I'm happy to commit this fix & bump the version on your behalf, given the appropriate permissions.

-Steve

sdsykes commented 13 years ago

Sorry not been able to make time for it, please go ahead, I have added you.

purcell commented 13 years ago

I merged both this and the other pull request you'd tacitly approved, and bumped the version. Not sure what's involved in order to push a new gem, so I'll leave that to you! :-)

Cheers,

-Steve

sdsykes commented 13 years ago

Steve, I updated the gem, also added a fix due to a bug in the nil object warnings changeset. Let me know if this works ok for you.

purcell commented 13 years ago

Good catch -- sorry, I should have double-checked those changes myself.

But yes, the new gem works beautifully; thanks!