+1

On May 20, 2009, at 11:18 AM, Thomas Bellman wrote:

>
> Signed-off-by: Thomas Bellman <[email protected]>
> ---
>  lib/puppet/parser/functions/split.rb |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/lib/puppet/parser/functions/split.rb b/lib/puppet/ 
> parser/functions/split.rb
> index cfb3ab5..afd81f4 100644
> --- a/lib/puppet/parser/functions/split.rb
> +++ b/lib/puppet/parser/functions/split.rb
> @@ -1,5 +1,5 @@
>  module Puppet::Parser::Functions
> -  newfunction(:split, :type => :rvalue,
> +  newfunction(:split, :type => :rvalue,
>        :doc => "Split a string variable into an array using the  
> specified split character.
>
>  Usage::
> @@ -8,6 +8,12 @@ Usage::
>      $array_var = split($string, ',')
>
>  $array_var holds the result ['value1', 'value2']") do |args|
> +
> +    if args.length != 2
> +        raise Puppet::ParseError, ("split(): wrong number of  
> arguments" +
> +                                   " (#{args.length}; must be 2)")
> +    end
> +
>      return args[0].split(args[1])
>    end
>  end
> -- 
> 1.6.0.6
>
>
> >


-- 
Commit suicide. A hundred thousand lemmings can't be wrong.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.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