diff --git a/lib/webmock/util/query_mapper.rb b/lib/webmock/util/query_mapper.rb
index <HASH>..<HASH> 100644
--- a/lib/webmock/util/query_mapper.rb
+++ b/lib/webmock/util/query_mapper.rb
@@ -198,7 +198,7 @@ module WebMock::Util
           # Only to be used for non-Array inputs. Arrays should preserve order.
           begin
             new_query_values.sort! # may raise for non-comparable values
-          rescue ArgumentError => e
+          rescue NoMethodError, ArgumentError
             # ignore
           end
         end
rescue and ignore NoMethodError for sort! in <I>

  calling sort! with an array of hashes raises an ArgumentError in most
  Ruby versions. However in Ruby <I> it raises a NoMethodError for <=> on Hash.

  So this change just rescues and Ignores NoMethodErrors when calling
  sort! as most cases the unsorted array is fine.