Skip to content

Commit 4518615

Browse files
committed
[CLIENT] Converts all argument keys to symbol in Client initializer
1 parent 080375d commit 4518615

File tree

1 file changed

+3
-3
lines changed
  • elasticsearch-transport/lib/elasticsearch/transport

1 file changed

+3
-3
lines changed

elasticsearch-transport/lib/elasticsearch/transport/client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ class Client
9696
#
9797
# @yield [faraday] Access and configure the `Faraday::Connection` instance directly with a block
9898
#
99-
def initialize(arguments={}, &block)
100-
@options = arguments
101-
@arguments = arguments
99+
def initialize(arguments = {}, &block)
100+
@options = arguments.each_with_object({}){ |(k,v), args| args[k.to_sym] = v }
101+
@arguments = @options
102102
@arguments[:logger] ||= @arguments[:log] ? DEFAULT_LOGGER.call() : nil
103103
@arguments[:tracer] ||= @arguments[:trace] ? DEFAULT_TRACER.call() : nil
104104
@arguments[:reload_connections] ||= false

0 commit comments

Comments
 (0)