From b69c50ccd3a491b6c4a8d456af2fe6f9cac45eae Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 29 Aug 2008 01:25:17 -0700 Subject: Removing insanely stupid default property behaviour. Basically, I had the [] method on resources returning the 'should' value if one was available, but if one wasn't available, it would retrieve the current value from the resource. This resulted in all kinds of completely ridiculous behaviours. Signed-off-by: Luke Kanies --- lib/puppet/parameter.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'lib/puppet') diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb index 31e009af5..e8e962931 100644 --- a/lib/puppet/parameter.rb +++ b/lib/puppet/parameter.rb @@ -417,17 +417,7 @@ class Puppet::Parameter # it possible to call for properties, too. def value if self.is_a?(Puppet::Property) - # We should return the 'is' value if there's not 'should' - # value. This might be bad, though, because the 'should' - # method knows whether to return an array or not and that info - # is not exposed, and the 'is' value could be a symbol. I - # can't seem to create a test in which this is a problem, but - # that doesn't mean it's not one. - if self.should - return self.should - else - return self.retrieve - end + self.should else if defined? @value return @value -- cgit