File tree Expand file tree Collapse file tree 4 files changed +3
-10
lines changed Expand file tree Collapse file tree 4 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -617,13 +617,6 @@ Lint/HashCompareByIdentity:
617
617
- ' lib/puppet/pops/serialization/serializer.rb'
618
618
- ' lib/puppet/pops/types/recursion_guard.rb'
619
619
620
- # This cop supports safe auto-correction (--auto-correct).
621
- Lint/IdentityComparison :
622
- Exclude :
623
- - ' lib/puppet/parser/resource.rb'
624
- - ' lib/puppet/ssl/verifier.rb'
625
- - ' lib/puppet/type.rb'
626
-
627
620
# This cop supports safe auto-correction (--auto-correct).
628
621
# Configuration parameters: EnforcedStyle.
629
622
# SupportedStyles: standard_error, runtime_error
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ def isomorphic?
156
156
def merge ( resource )
157
157
# Test the resource scope, to make sure the resource is even allowed
158
158
# to override.
159
- unless self . source . object_id == resource . source . object_id || resource . source . child_of? ( self . source )
159
+ unless self . source . equal? ( resource . source ) || resource . source . child_of? ( self . source )
160
160
raise Puppet ::ParseError . new ( _ ( "Only subclasses can override parameters" ) , resource . file , resource . line )
161
161
end
162
162
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def initialize(hostname, ssl_context)
30
30
# @api private
31
31
def reusable? ( verifier )
32
32
verifier . instance_of? ( self . class ) &&
33
- verifier . ssl_context . object_id == @ssl_context . object_id
33
+ verifier . ssl_context . equal? ( @ssl_context ) # same object?
34
34
end
35
35
36
36
# Configure the `http` connection based on the current `ssl_context`.
Original file line number Diff line number Diff line change @@ -1417,7 +1417,7 @@ def properties_to_audit(list)
1417
1417
aliases . each do |other |
1418
1418
obj = @resource . catalog . resource ( @resource . class . name , other )
1419
1419
if obj
1420
- unless obj . object_id == @resource . object_id
1420
+ unless obj . equal? ( @resource ) # same object?
1421
1421
self . fail ( "#{ @resource . title } can not create alias #{ other } : object already exists" )
1422
1422
end
1423
1423
next
You can’t perform that action at this time.
0 commit comments