Skip to content

Commit e91d5a2

Browse files
committed
Lint/InterpolationCheck (bug)
We were accidentally trying to interpolate a value in a single quoted string.
1 parent 4a566f3 commit e91d5a2

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,6 @@ Lint/InheritException:
628628
- 'lib/puppet/util/logging.rb'
629629
- 'lib/puppet/util/retry_action.rb'
630630

631-
# This cop supports unsafe auto-correction (--auto-correct-all).
632-
Lint/InterpolationCheck:
633-
Exclude:
634-
- 'lib/puppet/util/package/version/pip.rb'
635-
636631
# This cop supports safe auto-correction (--auto-correct).
637632
Lint/LiteralInInterpolation:
638633
Exclude:

lib/puppet/util/package/version/pip.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ def compare(this, other)
150150
return compare(element, other.at(index)) if element != other.at(index)
151151
end
152152
elsif (this.is_a? Array) && !(other.is_a? Array)
153-
raise Puppet::Error, 'Cannot compare #{this} (Array) with #{other} (#{other.class}). Only ±Float::INFINITY accepted.' unless other.abs == Float::INFINITY
153+
raise Puppet::Error, "Cannot compare #{this} (Array) with #{other} (#{other.class}). Only ±Float::INFINITY accepted." unless other.abs == Float::INFINITY
154154
return other == -Float::INFINITY ? 1 : -1
155155
elsif !(this.is_a? Array) && (other.is_a? Array)
156-
raise Puppet::Error, 'Cannot compare #{this} (#{this.class}) with #{other} (Array). Only ±Float::INFINITY accepted.' unless this.abs == Float::INFINITY
156+
raise Puppet::Error, "Cannot compare #{this} (#{this.class}) with #{other} (Array). Only ±Float::INFINITY accepted." unless this.abs == Float::INFINITY
157157
return this == -Float::INFINITY ? -1 : 1
158158
end
159159
this <=> other

0 commit comments

Comments
 (0)