summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/compiler.rb18
-rw-r--r--lib/puppet/parser/functions/shellquote.rb6
-rw-r--r--lib/puppet/parser/functions/sprintf.rb4
-rw-r--r--lib/puppet/parser/lexer.rb10
-rw-r--r--lib/puppet/parser/parser_support.rb4
-rw-r--r--lib/puppet/parser/resource.rb8
-rw-r--r--lib/puppet/parser/scope.rb2
-rw-r--r--lib/puppet/parser/yaml_trimmer.rb2
8 files changed, 27 insertions, 27 deletions
diff --git a/lib/puppet/parser/compiler.rb b/lib/puppet/parser/compiler.rb
index 01892ee44..17b05baab 100644
--- a/lib/puppet/parser/compiler.rb
+++ b/lib/puppet/parser/compiler.rb
@@ -94,20 +94,20 @@ class Puppet::Parser::Compiler
# This is the main entry into our catalog.
def compile
# Set the client's parameters into the top scope.
- set_node_parameters()
+ set_node_parameters
create_settings_scope
- evaluate_main()
+ evaluate_main
- evaluate_ast_node()
+ evaluate_ast_node
- evaluate_node_classes()
+ evaluate_node_classes
- evaluate_generators()
+ evaluate_generators
- finish()
+ finish
- fail_on_unevaluated()
+ fail_on_unevaluated
@catalog
end
@@ -177,7 +177,7 @@ class Puppet::Parser::Compiler
end
end
- initvars()
+ initvars
end
# Create a new scope, with either a specified parent scope or
@@ -352,7 +352,7 @@ class Puppet::Parser::Compiler
# Make sure all of our resources and such have done any last work
# necessary.
def finish
- evaluate_relationships()
+ evaluate_relationships
resources.each do |resource|
# Add in any resource overrides.
diff --git a/lib/puppet/parser/functions/shellquote.rb b/lib/puppet/parser/functions/shellquote.rb
index 96feaa1ee..888b9769d 100644
--- a/lib/puppet/parser/functions/shellquote.rb
+++ b/lib/puppet/parser/functions/shellquote.rb
@@ -10,7 +10,7 @@ module Puppet::Parser::Functions
with spaces. If an argument is an array, the elements of that
array is interpolated within the rest of the arguments; this makes
it possible to have an array of arguments and pass that array to
- shellquote() instead of having to specify each argument
+ shellquote instead of having to specify each argument
individually in the call.
") \
do |args|
@@ -25,9 +25,9 @@ module Puppet::Parser::Functions
result << ("'" + word + "'")
else
r = '"'
- word.each_byte() do |c|
+ word.each_byte do |c|
r += "\\" if Dangerous.include?(c)
- r += c.chr()
+ r += c.chr
end
r += '"'
result << r
diff --git a/lib/puppet/parser/functions/sprintf.rb b/lib/puppet/parser/functions/sprintf.rb
index 4a3916c89..af0a7213e 100644
--- a/lib/puppet/parser/functions/sprintf.rb
+++ b/lib/puppet/parser/functions/sprintf.rb
@@ -5,9 +5,9 @@ module Puppet::Parser::Functions
:doc => "Perform printf-style formatting of text.
- The first parameter is format string describing how the rest of the parameters should be formatted. See the documentation for the ``Kernel::sprintf()`` function in Ruby for all the details.") do |args|
+ The first parameter is format string describing how the rest of the parameters should be formatted. See the documentation for the ``Kernel::sprintf`` function in Ruby for all the details.") do |args|
raise Puppet::ParseError, 'sprintf() needs at least one argument' if args.length < 1
- fmt = args.shift()
+ fmt = args.shift
return sprintf(fmt, *args)
end
end
diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb
index 7668722d4..0c95142f9 100644
--- a/lib/puppet/parser/lexer.rb
+++ b/lib/puppet/parser/lexer.rb
@@ -368,7 +368,7 @@ class Puppet::Parser::Lexer
def initialize
@find = 0
@regex = 0
- initvars()
+ initvars
end
def initvars
@@ -396,7 +396,7 @@ class Puppet::Parser::Lexer
def munge_token(token, value)
@line += 1 if token.incr_line
- skip() if token.skip_text
+ skip if token.skip_text
return if token.skip and not token.accumulate?
@@ -442,7 +442,7 @@ class Puppet::Parser::Lexer
lex_error "Invalid or empty string" unless @scanner
# Skip any initial whitespace.
- skip()
+ skip
until token_queue.empty? and @scanner.eos? do
yielded = false
@@ -460,7 +460,7 @@ class Puppet::Parser::Lexer
final_token, token_value = munge_token(matched_token, value)
unless final_token
- skip()
+ skip
next
end
@@ -496,7 +496,7 @@ class Puppet::Parser::Lexer
end
end
@previous_token = final_token
- skip()
+ skip
end
@scanner = nil
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index 18d17252c..8dd986bd5 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -117,12 +117,12 @@ class Puppet::Parser::Parser
def initialize(env)
# The environment is needed to know how to find the resource type collection.
@environment = env.is_a?(String) ? Puppet::Node::Environment.new(env) : env
- initvars()
+ initvars
end
# Initialize or reset all of our variables.
def initvars
- @lexer = Puppet::Parser::Lexer.new()
+ @lexer = Puppet::Parser::Lexer.new
end
# Split an fq name into a namespace and name
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index ba2a5f3b0..2d31b40e7 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -68,7 +68,7 @@ class Puppet::Parser::Resource < Puppet::Resource
# Retrieve the associated definition and evaluate it.
def evaluate
if klass = resource_type and ! builtin_type?
- finish()
+ finish
return klass.evaluate_code(self)
elsif builtin?
devfail "Cannot evaluate a builtin type (#{type})"
@@ -95,9 +95,9 @@ class Puppet::Parser::Resource < Puppet::Resource
def finish
return if finished?
@finished = true
- add_defaults()
- add_metaparams()
- validate()
+ add_defaults
+ add_metaparams
+ validate
end
# Has this resource already been finished?
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 3bda512d7..9b49ab680 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -140,7 +140,7 @@ class Puppet::Parser::Scope
end
}
- extend_with_functions_module()
+ extend_with_functions_module
@tags = []
diff --git a/lib/puppet/parser/yaml_trimmer.rb b/lib/puppet/parser/yaml_trimmer.rb
index 09159e38f..131bafb8d 100644
--- a/lib/puppet/parser/yaml_trimmer.rb
+++ b/lib/puppet/parser/yaml_trimmer.rb
@@ -3,7 +3,7 @@ module Puppet::Parser::YamlTrimmer
def to_yaml_properties
r = instance_variables - REMOVE
- r -= skip_for_yaml() if respond_to?(:skip_for_yaml)
+ r -= skip_for_yaml if respond_to?(:skip_for_yaml)
r
end
end