diff options
author | Max Martin <max@puppetlabs.com> | 2011-04-27 13:14:26 -0700 |
---|---|---|
committer | Max Martin <max@puppetlabs.com> | 2011-04-27 13:14:26 -0700 |
commit | 32b13dad06195b37f0e10d13c6d2a9d958be00a7 (patch) | |
tree | 7324e202c6595750be76ce3f33ed04c945f3df7e | |
parent | 74498afecdc0a64f9435ef20065e08d549a510c9 (diff) | |
parent | ac0581f16ca17962a23c244424d83dbd6e721479 (diff) | |
download | puppet-32b13dad06195b37f0e10d13c6d2a9d958be00a7.tar.gz puppet-32b13dad06195b37f0e10d13c6d2a9d958be00a7.tar.xz puppet-32b13dad06195b37f0e10d13c6d2a9d958be00a7.zip |
Merge branch 'ticket/next/7101-template-compilation' into next
* ticket/next/7101-template-compilation:
(#7101) Fix template error messages in Ruby 1.8.5
-rw-r--r-- | lib/puppet/parser/templatewrapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb index 180a03dc9..27d75bf92 100644 --- a/lib/puppet/parser/templatewrapper.rb +++ b/lib/puppet/parser/templatewrapper.rb @@ -20,7 +20,7 @@ class Puppet::Parser::TemplateWrapper def script_line # find which line in the template (if any) we were called from - caller.find { |l| l =~ /#{file}:/ }.first[/:(\d+):/,1] + (caller.find { |l| l =~ /#{file}:/ }||"")[/:(\d+):/,1] end # Should return true if a variable is defined, false if it is not |