Skip to content

Commit

Permalink
Merge pull request airbrake#340 from grosser/grosser/dup
Browse files Browse the repository at this point in the history
If we cannot stringify then at least rescue the dup exceptions ...
  • Loading branch information
dvdplm committed Oct 13, 2014
2 parents cef9a3c + ebd8ced commit b192f3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/airbrake/rails/controller_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b192f3d

Please sign in to comment.