summaryrefslogtreecommitdiffstats
path: root/lib/puppet/external
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-07-09 18:07:15 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-09 18:07:15 -0700
commit543225970225de5697734bfaf0a6eee996802c04 (patch)
treeecc6f639c43cf1812e64f9c6ce7eacc0922b57ff /lib/puppet/external
parent8f15707251cdb58d53e82c4bbd332a38c2d31b4c (diff)
downloadpuppet-543225970225de5697734bfaf0a6eee996802c04.tar.gz
puppet-543225970225de5697734bfaf0a6eee996802c04.tar.xz
puppet-543225970225de5697734bfaf0a6eee996802c04.zip
Code smell: Avoid needless decorations
* Replaced 704 occurances of (.*)\b([a-z_]+)\(\) with \1\2 3 Examples: The code: ctx = OpenSSL::SSL::SSLContext.new() becomes: ctx = OpenSSL::SSL::SSLContext.new The code: skip() becomes: skip The code: path = tempfile() becomes: path = tempfile * Replaced 31 occurances of ^( *)end *#.* with \1end 3 Examples: The code: becomes: The code: end # Dir.foreach becomes: end The code: end # def becomes: end
Diffstat (limited to 'lib/puppet/external')
-rw-r--r--lib/puppet/external/dot.rb12
-rw-r--r--lib/puppet/external/nagios/parser.rb10
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/puppet/external/dot.rb b/lib/puppet/external/dot.rb
index 77d66e92e..5d89ddbc9 100644
--- a/lib/puppet/external/dot.rb
+++ b/lib/puppet/external/dot.rb
@@ -229,7 +229,7 @@ module DOT
t + "]\n"
end
- end # class DOTNode
+ end
# A subgraph element is the same to graph, but has another header in dot
# notation.
@@ -276,7 +276,7 @@ module DOT
hdr + options + nodes + t + "}\n"
end
- end # class DOTSubgraph
+ end
# This is a graph.
@@ -287,7 +287,7 @@ module DOT
@dot_string = 'digraph'
end
- end # class DOTDigraph
+ end
# This is an edge.
@@ -314,7 +314,7 @@ module DOT
}.compact.join( "\n" ) + "\n#{t}]\n"
end
- end # class DOTEdge
+ end
class DOTDirectedEdge < DOTEdge
@@ -322,5 +322,5 @@ module DOT
'->'
end
- end # class DOTDirectedEdge
-end # module DOT
+ end
+end
diff --git a/lib/puppet/external/nagios/parser.rb b/lib/puppet/external/nagios/parser.rb
index 934af146e..43444cccb 100644
--- a/lib/puppet/external/nagios/parser.rb
+++ b/lib/puppet/external/nagios/parser.rb
@@ -99,7 +99,7 @@ module Racc
###
def do_parse
- __send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
+ __send__(Racc_Main_Parsing_Routine, _racc_setup, false)
end
def next_token
@@ -121,7 +121,7 @@ module Racc
if i = action_pointer[@racc_state[-1]]
if @racc_read_next
if @racc_t != 0 # not EOF
- tok, @racc_val = next_token()
+ tok, @racc_val = next_token
unless tok # EOF
@racc_t = 0
else
@@ -152,7 +152,7 @@ module Racc
###
def yyparse(recv, mid)
- __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
+ __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup, true)
end
def _racc_yyparse_rb(recv, mid, arg, c_debug)
@@ -770,6 +770,6 @@ def _reduce_none( val, _values, result )
result
end
- end # class Parser
+ end
-end # module Nagios
+end