From 4627b8fe11dc14bf42e98b84121b885df73c709e Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Mon, 14 Jun 2010 18:22:40 -0700 Subject: Improving fix for #1175; tightening thread safety The previous code maintained thread safety up to work-duplication (so that a collision would, at worse, result in effective cache flushing and cause some additional work to be done). The preceding patch addressed the single thread issue of environment specific functions; this patch brings the thread safety up to the previous standard. --- lib/puppet/parser/ast/function.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/puppet/parser/ast') diff --git a/lib/puppet/parser/ast/function.rb b/lib/puppet/parser/ast/function.rb index ba4977935..0984ed8ce 100644 --- a/lib/puppet/parser/ast/function.rb +++ b/lib/puppet/parser/ast/function.rb @@ -13,7 +13,7 @@ class Puppet::Parser::AST def evaluate(scope) # Make sure it's a defined function - unless @fname = Puppet::Parser::Functions.function(@name) + unless Puppet::Parser::Functions.function(@name) raise Puppet::ParseError, "Unknown function %s" % @name end @@ -34,8 +34,6 @@ class Puppet::Parser::AST raise Puppet::DevError, "Invalid function type %s" % @ftype.inspect end - - # We don't need to evaluate the name, because it's plaintext args = @arguments.safeevaluate(scope) -- cgit