summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/validate_bool.rb
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppet.com>2016-09-26 17:12:35 +0100
committerGitHub <noreply@github.com>2016-09-26 17:12:35 +0100
commit96af506f244f37626dc314907817665bfa6b4320 (patch)
tree80f0f362c9c3ec12d0951de47227a7641da3f8bc /lib/puppet/parser/functions/validate_bool.rb
parent80daf167239d00fdbce38c6f0c86bf8958134368 (diff)
parent02fc7f8e4912e0def8e6717c4de38a951bf4b741 (diff)
Merge pull request #657 from HelenCampbell/dupRemoval
Remove duplicate deprecation warnings
Diffstat (limited to 'lib/puppet/parser/functions/validate_bool.rb')
-rw-r--r--lib/puppet/parser/functions/validate_bool.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/validate_bool.rb b/lib/puppet/parser/functions/validate_bool.rb
index 4e52ffd..e4345eb 100644
--- a/lib/puppet/parser/functions/validate_bool.rb
+++ b/lib/puppet/parser/functions/validate_bool.rb
@@ -19,7 +19,8 @@ module Puppet::Parser::Functions
ENDHEREDOC
- function_deprecation([:puppet_3_type_check, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.'])
+ # The deprecation function was being called twice, as validate_bool calls is_bool. I have removed it from here so it only calls deprecation once within is_bool.
+ # function_deprecation([:puppet_3_type_check, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.'])
unless args.length > 0 then
raise Puppet::ParseError, ("validate_bool(): wrong number of arguments (#{args.length}; must be > 0)")