Skip to content

Commit 933608e

Browse files
committed
Lint/InterpolationCheck (bug)
We were accidentally trying to interpolate a value in a single quoted string. (cherry picked from commit e91d5a2)
1 parent 7e0a01a commit 933608e

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
@@ -652,11 +652,6 @@ Lint/InheritException:
652652
- 'lib/puppet/util/logging.rb'
653653
- 'lib/puppet/util/retry_action.rb'
654654

655-
# This cop supports unsafe auto-correction (--auto-correct-all).
656-
Lint/InterpolationCheck:
657-
Exclude:
658-
- 'lib/puppet/util/package/version/pip.rb'
659-
660655
# This cop supports safe auto-correction (--auto-correct).
661656
Lint/LiteralInInterpolation:
662657
Exclude:

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

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

0 commit comments

Comments
 (0)