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

Handle nested :undef in consul_sorted_json #263

Merged
merged 1 commit into from
Jun 13, 2016
Merged

Handle nested :undef in consul_sorted_json #263

merged 1 commit into from
Jun 13, 2016

Conversation

mcasper
Copy link
Contributor

@mcasper mcasper commented Jun 4, 2016

Currently consul_sorted_json only handles top level :undef values,
leaving nested :undef values to slip through and eventually raise an
exception. Instead of trying to handle all :undefs upfront in the
function, handle them in the recursion and treat them as what they
actually are, nulls.

I've also been encountering the Exception("") vs Exception.new("")
problem detailed in #245, as Exception("") is not valid syntax in
newer versions of Ruby. That fix is included here as well

Currently `consul_sorted_json` only handles top level `:undef` values,
leaving nested `:undef` values to slip through and eventually raise an
exception. Instead of trying to handle all `:undef`s upfront in the
function, handle them in the recursion and treat them as what they
actually are, `null`s.

I've also been encountering the `Exception("")` vs `Exception.new("")`
problem detailed in #245, as `Exception("")` is not valid syntax in
newer versions of Ruby. That fix is included here as well
@mcasper mcasper changed the title Handle :undef in consul_sorted_json Handle nested :undef in consul_sorted_json Jun 4, 2016
@solarkennedy
Copy link
Contributor

Nice. Thanks!

@solarkennedy solarkennedy merged commit fc94ebb into voxpupuli:master Jun 13, 2016
@mcasper mcasper deleted the account_for_puppet_undef branch June 13, 2016 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants