summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2009-11-04 17:36:43 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-11-05 13:49:25 +1100
commitb1c57e9c15b1b7f079dc99dfc79e57fe3e5682e0 (patch)
treec6155fd40c1194ae5cced58f1a2448799fcb1d77 /lib
parent50e9c98c3f7a54be48cc363696c2361a53e9e750 (diff)
downloadpuppet-b1c57e9c15b1b7f079dc99dfc79e57fe3e5682e0.tar.gz
puppet-b1c57e9c15b1b7f079dc99dfc79e57fe3e5682e0.tar.xz
puppet-b1c57e9c15b1b7f079dc99dfc79e57fe3e5682e0.zip
Al Hoang's patch for #2781, removing obsolete when/: syntax
This is just Al's patch with removal of trailing ";"s. Signed-off-by: Markus Roberts <Markus@reality.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/ast/boolean_operator.rb4
-rw-r--r--lib/puppet/type/file.rb14
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/puppet/parser/ast/boolean_operator.rb b/lib/puppet/parser/ast/boolean_operator.rb
index 160e0e69e..89725d73b 100644
--- a/lib/puppet/parser/ast/boolean_operator.rb
+++ b/lib/puppet/parser/ast/boolean_operator.rb
@@ -20,14 +20,14 @@ class Puppet::Parser::AST
# return result
# lazy evaluate right operand
case @operator
- when "and";
+ when "and"
if Puppet::Parser::Scope.true?(lval)
rval = @rval.safeevaluate(scope)
Puppet::Parser::Scope.true?(rval)
else # false and false == false
false
end
- when "or";
+ when "or"
if Puppet::Parser::Scope.true?(lval)
true
else
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index 34dc4454e..48fe3ea38 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -120,10 +120,10 @@ module Puppet
munge do |value|
newval = super(value)
case newval
- when :true, :inf: true
- when :false: false
- when :remote: :remote
- when Integer, Fixnum, Bignum:
+ when :true, :inf; true
+ when :false; false
+ when :remote; :remote
+ when Integer, Fixnum, Bignum
self.warning "Setting recursion depth with the recurse parameter is now deprecated, please use recurselimit"
# recurse == 0 means no recursion
@@ -131,7 +131,7 @@ module Puppet
resource[:recurselimit] = value
true
- when /^\d+$/:
+ when /^\d+$/
self.warning "Setting recursion depth with the recurse parameter is now deprecated, please use recurselimit"
value = Integer(value)
@@ -154,8 +154,8 @@ module Puppet
munge do |value|
newval = super(value)
case newval
- when Integer, Fixnum, Bignum: value
- when /^\d+$/: Integer(value)
+ when Integer, Fixnum, Bignum; value
+ when /^\d+$/; Integer(value)
else
raise ArgumentError, "Invalid recurselimit value %s" % value.inspect
end