lib/ddtrace/quantization/http.rb in ddtrace-0.45.0 vs lib/ddtrace/quantization/http.rb in ddtrace-0.46.0
- old
+ new
@@ -59,9 +59,10 @@
# Iterate over each key value pair, yielding to the block given.
# Accepts :uniq option, which keeps uniq copies of keys without values.
# e.g. Reduces "foo&bar=bar&bar=bar&foo" to "foo&bar=bar&bar=bar"
def collect_query(query, options = {})
return query unless block_given?
+
uniq = options[:uniq].nil? ? false : options[:uniq]
keys = Set.new
delims = query.scan(/(^|&|;)/).flatten
query.split(/[&;]/).collect.with_index do |pairs, i|