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

parser_json: Add EncodingError to rescue list for oj 3.x. fix #1866 #1875

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

repeatedly
Copy link
Member

oj 3.x sometimes raises an EncodingError for input string and it beaks parser_json behaviour.
This patch fixes it.

Here is test code:

Oj.load('+ cat /etc/resolv.conf')
  • oj 3.4.0
test_oj.rb:6:in `load': Empty input at line 1, column 1 [parse.c:926] in '+ cat /etc/resolv.conf (EncodingError)
  • oj 2.18.5
test_oj.rb:6:in `load': unexpected character at line 1, column 3 [parse.c:671] (Oj::ParseError)

@repeatedly repeatedly self-assigned this Mar 2, 2018
@repeatedly repeatedly added the bug Something isn't working label Mar 2, 2018
@repeatedly repeatedly merged commit 20bfab1 into master Mar 2, 2018
@repeatedly repeatedly deleted the fix-parser-json-for-oj-3 branch March 2, 2018 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant