lib/elasticsearch/api/actions/ping.rb in elasticsearch-api-7.17.11 vs lib/elasticsearch/api/actions/ping.rb in elasticsearch-api-8.0.0.pre1

- old
+ new

@@ -20,21 +20,22 @@ module Actions # Returns whether the cluster is running. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def ping(arguments = {}) headers = arguments.delete(:headers) || {} + body = nil + arguments = arguments.clone method = Elasticsearch::API::HTTP_HEAD path = "" params = {} - body = nil begin perform_request(method, path, params, body, headers).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i false