Skip to content

Commit 9a38dfb

Browse files
committed
Rubocop - Lint/AmbiguousOperator
1 parent ab06fa4 commit 9a38dfb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/appium_lib/android/client_xpath.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _nodeset_to_uiselector(opts = {})
2020
def _client_xpath(opts = {})
2121
root_node = Nokogiri::XML(get_source).children.first
2222

23-
instance = Hash.new -1
23+
instance = Hash.new(-1)
2424

2525
root_node.traverse do |node|
2626
number = instance[node.name] += 1

lib/appium_lib/android/helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ def filter=(value)
1919
def initialize
2020
reset
2121
@filter = false
22-
@instance = Hash.new -1
22+
@instance = Hash.new(-1)
2323
end
2424

2525
def reset
2626
@result = ''
2727
@keys = %w[text resource-id content-desc]
28-
@instance = Hash.new -1
28+
@instance = Hash.new(-1)
2929
end
3030

3131
# http://nokogiri.org/Nokogiri/XML/SAX/Document.html

lib/appium_lib/device/device.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def create_bridge_command(method, verb, path)
329329
Selenium::WebDriver::Remote::Bridge.class_eval do
330330
command method, verb, path
331331
if block_given?
332-
class_eval &Proc.new
332+
class_eval(&Proc.new)
333333
else
334334
define_method(method) { execute method }
335335
end

lib/appium_lib/driver.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -578,15 +578,15 @@ def execute_script(script, *args)
578578
# @param args [*args] the args to use
579579
# @return [Array<Element>] Array is empty when no elements are found.
580580
def find_elements(*args)
581-
@driver.find_elements *args
581+
@driver.find_elements(*args)
582582
end
583583

584584
# Calls @driver.find_elements
585585
#
586586
# @param args [*args] the args to use
587587
# @return [Element]
588588
def find_element(*args)
589-
@driver.find_element *args
589+
@driver.find_element(*args)
590590
end
591591

592592
# Quit the driver and Pry.

0 commit comments

Comments
 (0)