summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/function.rb
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-06-14 18:22:40 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit4627b8fe11dc14bf42e98b84121b885df73c709e (patch)
treee9eb82faeac31255d9c00f057d7dd4c9e4126e89 /lib/puppet/parser/ast/function.rb
parentccc869ea48397235d7ba2a5695424eee4923cb9d (diff)
downloadpuppet-4627b8fe11dc14bf42e98b84121b885df73c709e.tar.gz
puppet-4627b8fe11dc14bf42e98b84121b885df73c709e.tar.xz
puppet-4627b8fe11dc14bf42e98b84121b885df73c709e.zip
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.
Diffstat (limited to 'lib/puppet/parser/ast/function.rb')
-rw-r--r--lib/puppet/parser/ast/function.rb4
1 files changed, 1 insertions, 3 deletions
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)