end
begin
- self.lookupvar("#{args[0]}")
+ result = nil
+ catch(:undefined_variable) do
+ result = self.lookupvar("#{args[0]}")
+ end
+
+ # avoid relying on incosistent behaviour around ruby return values from catch
+ result
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
end