Skip to content

Conversation

DavidS
Copy link
Contributor

@DavidS DavidS commented May 27, 2015

Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be
treated as "12" when validating values.

Copy link
Contributor

Choose a reason for hiding this comment

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

The .new shouldn't be necessary.

Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be
treated as "12" when validating values.
@DavidS DavidS force-pushed the validate-hashes branch from 872a1b7 to cf9f7a6 Compare May 27, 2015 19:05
@DavidS
Copy link
Contributor Author

DavidS commented May 27, 2015

Indeed, thanks for the hint. Also, rebased.

@nibalizer
Copy link
Contributor

This gave me a big belly laugh. Also +1.

tphoney added a commit that referenced this pull request May 28, 2015
validate_integer, validate_numeric: explicitely reject hashes in arrays
@tphoney tphoney merged commit c9b810c into puppetlabs:master May 28, 2015
@DavidS DavidS deleted the validate-hashes branch September 14, 2015 09:09
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.

5 participants