Skip to content

Commit 40d9bd8

Browse files
authored
Merge pull request #9413 from joshcooper/rubocop_1_65_0
Add missing return
2 parents 7739378 + 214206f commit 40d9bd8

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

lib/puppet/pops/evaluator/runtime3_resource_support.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def self.find_resource_type_or_class(scope, name)
7676
end
7777

7878
def self.resource_to_ptype(resource)
79-
nil if resource.nil?
79+
return nil if resource.nil?
80+
8081
# inference returns the meta type since the 3x Resource is an alternate way to describe a type
8182
Puppet::Pops::Types::TypeCalculator.singleton().infer(resource).type
8283
end

lib/puppet/pops/evaluator/runtime3_support.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,6 @@ def is_parameter_of_resource?(scope, resource, name)
443443
resource.valid_parameter?(name)
444444
end
445445

446-
def resource_to_ptype(resource)
447-
nil if resource.nil?
448-
# inference returns the meta type since the 3x Resource is an alternate way to describe a type
449-
type_calculator.infer(resource).type
450-
end
451-
452446
# This is the same type of "truth" as used in the current Puppet DSL.
453447
#
454448
def is_true?(value, o)

lib/puppet/provider/package/pkgutil.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@ def self.parse_pkglist(output, hash = {})
115115

116116
# Identify common types of pkgutil noise as it downloads catalogs etc
117117
def self.noise?(line)
118-
true if line =~ /^#/
119-
true if line =~ /^Checking integrity / # use_gpg
120-
true if line =~ /^gpg: / # gpg verification
121-
true if line =~ /^=+> / # catalog fetch
122-
true if line =~ /\d+:\d+:\d+ URL:/ # wget without -q
118+
return true if line =~ /^#/
119+
return true if line =~ /^Checking integrity / # use_gpg
120+
return true if line =~ /^gpg: / # gpg verification
121+
return true if line =~ /^=+> / # catalog fetch
122+
return true if line =~ /\d+:\d+:\d+ URL:/ # wget without -q
123+
123124
false
124125
end
125126

0 commit comments

Comments
 (0)