Skip to content

Commit 6ec0748

Browse files
committed
rb - remove unused method parameters
1 parent 8c001ee commit 6ec0748

File tree

19 files changed

+29
-35
lines changed

19 files changed

+29
-35
lines changed

rb/.rubocop_todo.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2016-06-09 13:11:15 -0700 using RuboCop version 0.37.2.
3+
# on 2016-06-09 16:27:16 -0700 using RuboCop version 0.37.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -18,12 +18,6 @@ Lint/HandleExceptions:
1818
- 'lib/selenium/webdriver/remote/w3c_bridge.rb'
1919
- 'spec/integration/selenium/webdriver/spec_support/test_environment.rb'
2020

21-
# Offense count: 27
22-
# Cop supports --auto-correct.
23-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
24-
Lint/UnusedMethodArgument:
25-
Enabled: false
26-
2721
# Offense count: 1
2822
Lint/UselessAccessModifier:
2923
Exclude:
@@ -54,7 +48,7 @@ Metrics/ClassLength:
5448
Metrics/CyclomaticComplexity:
5549
Max: 16
5650

57-
# Offense count: 711
51+
# Offense count: 706
5852
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
5953
# URISchemes: http, https
6054
Metrics/LineLength:
@@ -283,7 +277,7 @@ Style/SingleLineMethods:
283277
Style/SpecialGlobalVars:
284278
EnforcedStyle: use_perl_names
285279

286-
# Offense count: 1410
280+
# Offense count: 1406
287281
# Cop supports --auto-correct.
288282
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
289283
# SupportedStyles: single_quotes, double_quotes

rb/lib/selenium/webdriver/common/element.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def ref
280280
# @api private
281281
#
282282

283-
def to_json(*args)
283+
def to_json(*)
284284
JSON.generate as_json
285285
end
286286

@@ -290,7 +290,7 @@ def to_json(*args)
290290
# @api private
291291
#
292292

293-
def as_json(opts = nil)
293+
def as_json(*)
294294
{
295295
:ELEMENT => @id,
296296
"element-6066-11e4-a52e-4f735466cecf" => @id

rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def key?(key)
2929
alias_method :member?, :key?
3030
alias_method :has_key?, :key?
3131

32-
def fetch(key, &blk)
32+
def fetch(key)
3333
return self[key] if self.key? key
3434
return yield(key) if block_given?
3535
raise KeyError, "missing key #{key.inspect}"
@@ -39,7 +39,7 @@ def empty?
3939
size == 0
4040
end
4141

42-
def each(&blk)
42+
def each
4343
return enum_for(:each) unless block_given?
4444

4545
keys.each do |k|

rb/lib/selenium/webdriver/common/log_entry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def initialize(level, timestamp, message)
2828
@message = message
2929
end
3030

31-
def as_json(opts = nil)
31+
def as_json(*)
3232
{
3333
'level' => level,
3434
'timestamp' => timestamp,

rb/lib/selenium/webdriver/common/platform.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def assert_executable(path)
147147
raise Error::WebDriverError, "not executable: #{path.inspect}"
148148
end
149149

150-
def exit_hook(&blk)
150+
def exit_hook
151151
pid = Process.pid
152152

153153
at_exit do

rb/lib/selenium/webdriver/common/profile_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def self.included(base)
3131
base.extend ClassMethods
3232
end
3333

34-
def as_json(opts = nil)
34+
def as_json(*)
3535
{'zip' => Zipper.zip(layout_on_disk)}
3636
end
3737

38-
def to_json(*args)
38+
def to_json(*)
3939
JSON.generate as_json
4040
end
4141

rb/lib/selenium/webdriver/common/proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def type=(type)
119119
@type = type
120120
end
121121

122-
def as_json(opts = nil)
122+
def as_json(*)
123123
json_result = {
124124
"proxyType" => TYPES[type]
125125
}
@@ -137,7 +137,7 @@ def as_json(opts = nil)
137137
json_result if json_result.length > 1
138138
end
139139

140-
def to_json(*args)
140+
def to_json(*)
141141
JSON.generate as_json
142142
end
143143

rb/lib/selenium/webdriver/common/socket_lock.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def initialize(port, timeout)
3434
# execution block if the lock could be successfully obtained.
3535
#
3636

37-
def locked(&blk)
37+
def locked
3838
lock
3939

4040
begin

rb/lib/selenium/webdriver/common/socket_poller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def listening?
9595
end
9696
end
9797

98-
def with_timeout(&blk)
98+
def with_timeout
9999
max_time = time_now + @timeout
100100

101101
(

rb/lib/selenium/webdriver/common/wait.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def initialize(opts = {})
4747
# @return [Object] the result of the block
4848
#
4949

50-
def until(&blk)
50+
def until
5151
end_time = Time.now + @timeout
5252
last_error = nil
5353

0 commit comments

Comments
 (0)