lib/elasticsearch/api/actions/count.rb in elasticsearch-api-8.0.0 vs lib/elasticsearch/api/actions/count.rb in elasticsearch-api-8.0.1

- old
+ new

@@ -39,14 +39,13 @@ # @option arguments [Hash] :body A query to restrict the results specified with the Query DSL (optional) # # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html # def count(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) method = if body Elasticsearch::API::HTTP_POST