Enable Lint/DuplicateMethods rubocop rule
This commit is contained in:
parent
27f17b98d6
commit
2a00c89a7d
|
@ -208,6 +208,9 @@ Lint/AmbiguousRegexpLiteral:
|
|||
Lint/DuplicateRequire:
|
||||
Enabled: true
|
||||
|
||||
Lint/DuplicateMethods:
|
||||
Enabled: true
|
||||
|
||||
Lint/ErbNewArguments:
|
||||
Enabled: true
|
||||
|
||||
|
|
|
@ -1917,8 +1917,6 @@ class RouteSetTest < ActiveSupport::TestCase
|
|||
|
||||
include ActionDispatch::RoutingVerbs
|
||||
|
||||
alias :routes :set
|
||||
|
||||
def test_generate_with_optional_params_recalls_last_request
|
||||
@set = make_set false
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ class Time
|
|||
other.is_a?(DateTime) ? to_f - other.to_f : minus_without_coercion(other)
|
||||
end
|
||||
alias_method :minus_without_coercion, :-
|
||||
alias_method :-, :minus_with_coercion
|
||||
alias_method :-, :minus_with_coercion # rubocop:disable Lint/DuplicateMethods
|
||||
|
||||
# Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances
|
||||
# can be chronologically compared with a Time
|
||||
|
|
|
@ -153,7 +153,7 @@ module ActiveSupport
|
|||
Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID, :float_millisecond)
|
||||
end
|
||||
rescue
|
||||
def now_cpu
|
||||
def now_cpu # rubocop:disable Lint/DuplicateMethods
|
||||
0.0
|
||||
end
|
||||
end
|
||||
|
@ -165,7 +165,7 @@ module ActiveSupport
|
|||
0
|
||||
end
|
||||
else
|
||||
def now_allocations
|
||||
def now_allocations # rubocop:disable Lint/DuplicateMethods
|
||||
GC.stat(:total_allocated_objects)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -55,7 +55,7 @@ class ArrayInquirerTest < ActiveSupport::TestCase
|
|||
ensure
|
||||
Array.class_eval do
|
||||
undef_method :respond_to_missing?
|
||||
def respond_to_missing?(name, include_private = false)
|
||||
def respond_to_missing?(name, include_private = false) # rubocop:disable Lint/DuplicateMethods
|
||||
super
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ class StringInquirerTest < ActiveSupport::TestCase
|
|||
ensure
|
||||
String.class_eval do
|
||||
undef_method :respond_to_missing?
|
||||
def respond_to_missing?(name, include_private = false)
|
||||
def respond_to_missing?(name, include_private = false) # rubocop:disable Lint/DuplicateMethods
|
||||
super
|
||||
end
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ end
|
|||
# Monkey patch subscriber to test that only one subscriber per method is added.
|
||||
class TestSubscriber
|
||||
remove_method :open_party
|
||||
def open_party(event)
|
||||
def open_party(event) # rubocop:disable Lint/DuplicateMethods
|
||||
events << event
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue