diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-10-04 20:11:56 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2010-10-04 21:46:59 -0700 |
| commit | 7bdbd132634f61d91aeee401de15248d936ce71e (patch) | |
| tree | 146bb43d90478d373f9bb1c5ed3e04bd9d04dbbc /lib/puppet/parser | |
| parent | 163ec172e06a2b8aab9f9c9247dd45bc0dea3f72 (diff) | |
| parent | 917c520f1abc0c72d7065531cffcef88259e32e0 (diff) | |
| download | puppet-7bdbd132634f61d91aeee401de15248d936ce71e.tar.gz puppet-7bdbd132634f61d91aeee401de15248d936ce71e.tar.xz puppet-7bdbd132634f61d91aeee401de15248d936ce71e.zip | |
Merge commit '2.6.2rc1' into next
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/functions/extlookup.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/parser/lexer.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/parser/resource.rb | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/extlookup.rb b/lib/puppet/parser/functions/extlookup.rb index 63d49e563..bc55410b9 100644 --- a/lib/puppet/parser/functions/extlookup.rb +++ b/lib/puppet/parser/functions/extlookup.rb @@ -52,7 +52,7 @@ the exact same outcome: $snmp_contact = extlookup(\"snmp_contact\") -The obove code shows some other features, you can use any fact or variable that +The above code shows some other features, you can use any fact or variable that is in scope by simply using %{varname} in your data files, you can return arrays by just having multiple values in the csv after the initial variable name. diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb index a25a17e3f..9036d652e 100644 --- a/lib/puppet/parser/lexer.rb +++ b/lib/puppet/parser/lexer.rb @@ -520,7 +520,7 @@ class Puppet::Parser::Lexer def slurpstring(terminators,escapes=%w{ \\ $ ' " n t s }+["\n"],ignore_invalid_escapes=false) # we search for the next quote that isn't preceded by a # backslash; the caret is there to match empty strings - str = @scanner.scan_until(/([^\\]|^)[#{terminators}]/) or lex_error "Unclosed quote after '#{last}' in '#{rest}'" + str = @scanner.scan_until(/([^\\]|^|[^\\])([\\]{2})*[#{terminators}]/) or lex_error "Unclosed quote after '#{last}' in '#{rest}'" @line += str.count("\n") # literal carriage returns add to the line count. str.gsub!(/\\(.)/) { ch = $1 diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index e34f284fc..c007d4dbe 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -64,6 +64,7 @@ class Puppet::Parser::Resource < Puppet::Resource # Retrieve the associated definition and evaluate it. def evaluate + return if evaluated? @evaluated = true if klass = resource_type and ! builtin_type? finish |
