From 0e0483ae3f00d408766a850823e3120caedfb9fc Mon Sep 17 00:00:00 2001 From: Diego Algorta Date: Thu, 13 Aug 2009 14:49:12 -0300 Subject: Fix bug where you'd get an 'undefined method' error if trying to access a fact's value when collection has not being yet initialized. --- lib/facter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/facter.rb') diff --git a/lib/facter.rb b/lib/facter.rb index d75f275..6e05495 100644 --- a/lib/facter.rb +++ b/lib/facter.rb @@ -120,7 +120,7 @@ module Facter name = name.to_s.sub(/\?$/,'') end - if fact = @collection.fact(name) + if fact = collection.fact(name) if question value = fact.value.downcase args.each do |arg| -- cgit