Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't force Hash::update to call to_hash unconditionally (fixes break…
…age with Devise 1.1.5) Devise has a MonitoredHash class which implements #update and #to_hash entirely reasonably as follows: def update(other_hash) other_hash.each_pair { |key, value| regular_writer(convert_key(key), value) } self end def to_hash; Hash.new.update(self) end This causes an infinite recursion and subsequent stack overflow in the presence of slim_scrooge's override of Hash#update. We fix this by modifying slim_scrooge's override of that method to only force #to_hash on instances of MonitoredHash (See https://github.com/plataformatec/devise/blob/master/lib/devise/rails/warden_compat.rb#L60)
- Loading branch information