Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to convert strings and fixnums to arrays #367

Merged
merged 1 commit into from Nov 17, 2014

Conversation

underscorgan
Copy link
Contributor

No description provided.

@@ -39,7 +39,7 @@ module Puppet::Parser::Functions
raise(Puppet::ParseError, 'member(): Requires array to work with')
end

if arguments[1].is_a? String
if arguments[1].is_a? String or arguments[1].is_a? Fixnum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line of documentation is now out of date:
The variable can either be a string or an array.

Also, it might be useful to raise when a string, number or array isn't passed as the second argument (what happens when a hash is passed, or undef (is it represented as a symbol)?

@@ -8,7 +8,7 @@
module Puppet::Parser::Functions
newfunction(:member, :type => :rvalue, :doc => <<-EOS
This function determines if a variable is a member of an array.
The variable can either be a string or an array.
The variable can either be a string, fixnum, or array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"either" implies one of two, should just be "The variable can be a string, fixnum, or array.")

cmurphy added a commit that referenced this pull request Nov 17, 2014
Need to convert strings and fixnums to arrays
@cmurphy cmurphy merged commit 72ee9b5 into puppetlabs:master Nov 17, 2014
@underscorgan underscorgan deleted the future_parser_fix branch November 17, 2014 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants