diff options
-rw-r--r-- | lib/facter.rb | 2 | ||||
-rw-r--r-- | lib/facter/util/fact.rb | 2 | ||||
-rw-r--r-- | lib/facter/util/resolution.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/facter.rb b/lib/facter.rb index b73d5ba..2348b02 100644 --- a/lib/facter.rb +++ b/lib/facter.rb @@ -80,7 +80,7 @@ module Facter end class << self - [:add, :fact, :flush, :list, :value].each do |method| + [:fact, :flush, :list, :value].each do |method| define_method(method) do |*args| collection.send(method, *args) end diff --git a/lib/facter/util/fact.rb b/lib/facter/util/fact.rb index 214814c..ca2ba03 100644 --- a/lib/facter/util/fact.rb +++ b/lib/facter/util/fact.rb @@ -4,7 +4,7 @@ require 'facter/util/resolution' class Facter::Util::Fact TIMEOUT = 5 - attr_accessor :name, :searching, :ldapname + attr_accessor :name, :ldapname # Create a new fact, with no resolution mechanisms. def initialize(name, options = {}) diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb index 1feda3f..e5936bd 100644 --- a/lib/facter/util/resolution.rb +++ b/lib/facter/util/resolution.rb @@ -11,7 +11,7 @@ class Facter::Util::Resolution attr_accessor :interpreter, :code, :name, :timeout def self.have_which - if @have_which.nil? + if ! defined?(@have_which) or @have_which.nil? %x{which which 2>/dev/null} @have_which = ($? == 0) end |