Skip to content

Comments

Bugfix parse body#359

Merged
choran merged 2 commits intointercom:masterfrom
ipc103:bugfix-parse-body
Oct 16, 2017
Merged

Bugfix parse body#359
choran merged 2 commits intointercom:masterfrom
ipc103:bugfix-parse-body

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