Skip to content

Commit 611e2d6

Browse files
committed
Style/CollectionCompact
1 parent 92793c6 commit 611e2d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/puppet/metatype/manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def allclear
2828
#
2929
def clear_misses
3030
unless @types.nil?
31-
@types.delete_if { |_, v| v.nil? }
31+
@types.compact
3232
end
3333
end
3434

lib/puppet/util/docs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def dochook(name, &block)
2222
def doc
2323
extra = methods.find_all { |m| m.to_s =~ /^dochook_.+/ }.sort.collect { |m|
2424
self.send(m)
25-
}.delete_if { |r| r.nil? }.collect { |r| "* #{r}" }.join("\n")
25+
}.compact.collect { |r| "* #{r}" }.join("\n")
2626

2727
if @doc
2828
scrub(@doc) + (extra.empty? ? '' : "\n\n#{extra}")

0 commit comments

Comments
 (0)