summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser_support.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-09-09 16:20:26 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-09-09 16:20:26 -0700
commit6860594c4d95855d5106fbf664a473e1ac4d3935 (patch)
tree89ccd167744440199647c924be6ffa28eb7fb41a /lib/puppet/parser/parser_support.rb
parentf62095749a14fd67987df5cf2e3e9138b71efd19 (diff)
parentdf088c9ba16dce50c17a79920c1ac186db67b9e9 (diff)
downloadpuppet-6860594c4d95855d5106fbf664a473e1ac4d3935.tar.gz
puppet-6860594c4d95855d5106fbf664a473e1ac4d3935.tar.xz
puppet-6860594c4d95855d5106fbf664a473e1ac4d3935.zip
Merge remote branch 'paul/ticket/next/4638' into next
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
-rw-r--r--lib/puppet/parser/parser_support.rb15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index 859897a16..1c4947891 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -29,18 +29,9 @@ class Puppet::Parser::Parser
message
end
- # Create an AST array out of all of the args
- def aryfy(*args)
- if args[0].instance_of?(AST::ASTArray)
- result = args.shift
- args.each { |arg|
- result.push arg
- }
- else
- result = ast AST::ASTArray, :children => args
- end
-
- result
+ # Create an AST array containing a single element
+ def aryfy(arg)
+ ast AST::ASTArray, :children => [arg]
end
# Create an AST object, and automatically add the file and line information if