Skip to content
Prev Previous commit
Next Next commit
don't use slice on hash
  • Loading branch information
jwedoff committed Apr 16, 2019
commit 9c28773e7559090d28abb5bf61d5abaed968400f
2 changes: 1 addition & 1 deletion lib/net/ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ def connection=(connection)
# result from that, and :use_connection: will not yield at all. If not
# the return value is whatever is returned from the block.
def use_connection(args)
timeout_args = args.slice(:io_timeout).values
timeout_args = args.has_key?(:io_timeout) ? [args[:io_timeout]] : []
if @open_connection
@open_connection.with_timeout(*timeout_args) do
yield(@open_connection)
Expand Down