summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser_support.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-12 17:37:51 -0600
committerLuke Kanies <luke@madstop.com>2008-02-12 17:37:51 -0600
commitda78d96cb139db0775e634b2fa4bd9c173752127 (patch)
tree4139d3a2011baedb171a8307c4830c5ac3fe3625 /lib/puppet/parser/parser_support.rb
parentbee9aba2da453151a80c6e1f25f16bec3bfde8d2 (diff)
parent3af6827875f4e02b47fe2293280ff9afe811485f (diff)
downloadpuppet-da78d96cb139db0775e634b2fa4bd9c173752127.tar.gz
puppet-da78d96cb139db0775e634b2fa4bd9c173752127.tar.xz
puppet-da78d96cb139db0775e634b2fa4bd9c173752127.zip
Merge branch '0.24.x'
Conflicts: CHANGELOG
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
-rw-r--r--lib/puppet/parser/parser_support.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index b7c68e630..ccfc4d48a 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -47,11 +47,8 @@ class Puppet::Parser::Parser
# Create an AST object, and automatically add the file and line information if
# available.
- def ast(klass, hash = nil)
- hash ||= {}
- unless hash.include?(:line)
- hash[:line] = @lexer.line
- end
+ def ast(klass, hash = {})
+ hash[:line] = @lexer.line unless hash.include?(:line)
unless hash.include?(:file)
if file = @lexer.file