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

Fix issue with 1.8.7 and upcase #418

Merged
merged 1 commit into from
Feb 26, 2015

Conversation

cyberious
Copy link
Contributor

No description provided.

underscorgan pushed a commit that referenced this pull request Feb 26, 2015
Fix issue with 1.8.7 and upcase
@underscorgan underscorgan merged commit cd65680 into puppetlabs:master Feb 26, 2015
result << value.each_pair do |k, v|
return {k.upcase => v.collect! { |p| p.upcase }}
value.each_pair do |k, v|
result.merge!({k.upcase => v.collect! { |p| p.upcase }})
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not instead do:

result[k.upcase] = v.collect { |p| p.upcase}

This results in significantly object creations.

Additionally, this will fail if v is a nested array or a hash.

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.

4 participants