Not all the way there, but a step in the right direction

+1

On Wed, Oct 14, 2009 at 2:46 PM, Markus Roberts <[email protected]> wrote:
>
>
> Signed-off-by: Markus Roberts <[email protected]>
> ---
>  lib/puppet/parser/ast/definition.rb |    2 +-
>  lib/puppet/util/settings/setting.rb |    2 +-
>  lib/puppet/util/storage.rb          |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/puppet/parser/ast/definition.rb 
> b/lib/puppet/parser/ast/definition.rb
> index 5d6f078..4112e5c 100644
> --- a/lib/puppet/parser/ast/definition.rb
> +++ b/lib/puppet/parser/ast/definition.rb
> @@ -176,7 +176,7 @@ class Puppet::Parser::AST::Definition < 
> Puppet::Parser::AST::Branch
>             self.arguments.each { |arg, default|
>                 arg = arg.to_sym
>                 unless args.include?(arg)
> -                    if defined? default and ! default.nil?
> +                    if ! default.nil?
>                         default = default.safeevaluate scope
>                         args[arg] = default
>                         #Puppet.debug "Got default %s for %s in %s" %
> diff --git a/lib/puppet/util/settings/setting.rb 
> b/lib/puppet/util/settings/setting.rb
> index 5e529c0..292ea28 100644
> --- a/lib/puppet/util/settings/setting.rb
> +++ b/lib/puppet/util/settings/setting.rb
> @@ -62,7 +62,7 @@ class Puppet::Util::Settings::Setting
>     end
>
>     def set?
> -        if defined? @value and ! @value.nil?
> +        if ! @value.nil?
>             return true
>         else
>             return false
> diff --git a/lib/puppet/util/storage.rb b/lib/puppet/util/storage.rb
> index 01c4111..f1528d9 100644
> --- a/lib/puppet/util/storage.rb
> +++ b/lib/puppet/util/storage.rb
> @@ -55,7 +55,7 @@ class Puppet::Util::Storage
>         Puppet.settings.use(:main) unless 
> FileTest.directory?(Puppet[:statedir])
>
>         unless File.exists?(Puppet[:statefile])
> -            unless defined? @@state and ! @@state.nil?
> +            unless ! @@state.nil?
>                 self.init
>             end
>             return
> --
> 1.6.4
>
>
> >
>



-- 
Rein Henrichs
http://reductivelabs.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to