Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bugfix parse body #359

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

Merged
merged 2 commits into from
Oct 16, 2017
Merged

Bugfix parse body #359

merged 2 commits into from
Oct 16, 2017

Conversation

ipc103
Copy link
Contributor

@ipc103 ipc103 commented Oct 13, 2017

Fixes #358

CC: @choran - it seems that using the lonely operator (& ) breaks that method for anyone below Ruby 2.3 - sorry about that.

Also, it seems that prior to 2.3, JSON.parse raises an error when passed a null value, rather than just returning nil. To be consistent across Ruby versions, seems like it makes more sense to raise an application error if the decoded_body is 'null', no matter what

Let me know if this seems more sensible!

@choran
Copy link
Member

choran commented Oct 13, 2017

@ipc103 I initially thought it would not work with lower than 2.3 also.
I tested with as low as 2.0 and it worked and it passed all CI tests but I see an issue with 2.2.5 which seems strange give that I tested it with 2.0 and other versions.
I will look into it in more detail to see what version it works with

@thomasbalsloev
Copy link

Great to see this fixed soon. Thanks!

Please also remember to update the change log. Last entry is for version 3.5.17...

@choran
Copy link
Member

choran commented Oct 16, 2017

@ipc103 @P9GIT
Yeah, thanks for this, just reviewing now.
So will update and release shortly
Thanks again
Cathal

Copy link
Member

@choran choran left a comment

Choose a reason for hiding this comment

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

Yeah, looks good.
Thanks for submitting so quickly @ipc103

@choran choran merged commit 3cea877 into intercom:master Oct 16, 2017
@ipc103 ipc103 deleted the bugfix-parse-body branch October 16, 2017 15:57
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.

3 participants