Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #340 from grosser/grosser/dup

If we cannot stringify then at least rescue the dup exceptions ...
  • Loading branch information...
commit b192f3dcff54f135c3702b8b10ad7384844139e9 2 parents cef9a3c + ebd8ced
@dvdplm dvdplm authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/airbrake/rails/controller_methods.rb
View
6 lib/airbrake/rails/controller_methods.rb
@@ -63,7 +63,11 @@ def filter_rails3_parameters(hash)
def recursive_stringify_keys(hash)
hash = hash.stringify_keys
- hash.each {|k,v| hash[k] = recursive_stringify_keys(v) if v.is_a?(Hash) && v.respond_to?(:stringify_keys) } # Rack::Session::Abstract::SessionHash has a stringify_keys method we should not call
+ hash.each do |k, v|
+ if v.is_a?(Hash)
+ hash[k] = v.respond_to?(:stringify_keys) ? recursive_stringify_keys(v) : nil # Rack::Session::Abstract::SessionHash has a stringify_keys method we should not call
+ end
+ end
hash
end
Please sign in to comment.
Something went wrong with that request. Please try again.