Skip to content

Commit 70a53be

Browse files
(PUP-11767) Fix auto-correctable Style/CaseEquality offenses
1 parent 51271ee commit 70a53be

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,6 @@ Style/CaseEquality:
346346
- 'lib/puppet/interface/face_collection.rb'
347347
- 'lib/puppet/module_tool/installed_modules.rb'
348348
- 'lib/puppet/module_tool/shared_behaviors.rb'
349-
- 'lib/puppet/provider/package/pip.rb'
350-
- 'lib/puppet/provider/package/pkgin.rb'
351-
- 'lib/puppet/settings/integer_setting.rb'
352349
- 'lib/puppet/util/command_line/puppet_option_parser.rb'
353350
- 'lib/puppet/util/log/destination.rb'
354351
- 'lib/puppet/util/multi_match.rb'

lib/puppet/provider/package/pip.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def get_install_command_options
220220
command_options += install_options if @resource[:install_options]
221221

222222
if @resource[:source]
223-
if String === should
223+
if should.is_a?(String)
224224
command_options << "#{@resource[:source]}@#{should}#egg=#{@resource[:name]}"
225225
else
226226
command_options << "#{@resource[:source]}#egg=#{@resource[:name]}"
@@ -235,7 +235,7 @@ def get_install_command_options
235235
return command_options
236236
end
237237

238-
unless String === should
238+
unless should.is_a?(String)
239239
command_options << @resource[:name]
240240

241241
return command_options

lib/puppet/provider/package/pkgin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def parse_pkgsearch_line
6464
end
6565

6666
def install
67-
if String === @resource[:ensure]
67+
if @resource[:ensure].is_a?(String)
6868
pkgin("-y", :install, "#{resource[:name]}-#{resource[:ensure]}")
6969
else
7070
pkgin("-y", :install, resource[:name])

lib/puppet/settings/integer_setting.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class Puppet::Settings::IntegerSetting < Puppet::Settings::BaseSetting
44
def munge(value)
5-
return value if Integer === value
5+
return value if value.is_a?(Integer)
66

77
begin
88
value = Integer(value)

lib/puppet/util/command_line/puppet_option_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def on(*args, &block)
7070
end
7171

7272
def parse(*args)
73-
args = args[0] if args.size == 1 and Array === args[0]
73+
args = args[0] if args.size == 1 and args[0].is_a?(Array)
7474
args_copy = args.dup
7575
begin
7676
@parser.parse args_copy

0 commit comments

Comments
 (0)