diff options
author | Luke Kanies <luke@madstop.com> | 2008-06-19 21:44:34 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-06-19 21:44:34 -0500 |
commit | 40a9c1d8d0579f7657ec7fa2d1bf1e9e7b4e5e88 (patch) | |
tree | 99495c255cde114268e4ac57d81e2f2f7dcab267 | |
parent | cc9ba52e1e12a8b543e4474640c42c419c48e50a (diff) | |
download | facter-40a9c1d8d0579f7657ec7fa2d1bf1e9e7b4e5e88.tar.gz facter-40a9c1d8d0579f7657ec7fa2d1bf1e9e7b4e5e88.tar.xz facter-40a9c1d8d0579f7657ec7fa2d1bf1e9e7b4e5e88.zip |
Fixing some warnings in various classes.
-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 |