[Pkg-puppet-devel] [facter] 116/352: (refactor) Remove double negation from resolution confine check

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 84a981e0db5b61e786c5953ea68aaeb8da3009d3
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Thu Dec 12 17:20:21 2013 -0800

    (refactor) Remove double negation from resolution confine check
---
 lib/facter/util/resolution.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb
index 3003e66..91e9c36 100644
--- a/lib/facter/util/resolution.rb
+++ b/lib/facter/util/resolution.rb
@@ -391,8 +391,8 @@ class Facter::Util::Resolution
   #
   # @api private
   def suitable?
-    unless defined? @suitable
-      @suitable = ! @confines.detect { |confine| ! confine.true? }
+    if @suitable.nil?
+      @suitable = @confines.all? { |confine| confine.true? }
     end
 
     return @suitable

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list