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

if fixes for no match and nil value #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jqr
Copy link

@jqr jqr commented Oct 2, 2024

Updates the if statement to fix:

Also a minor fix to the open-uri use for the latest(?) API.

This change causes 4 failing tests from the test suite cases provided by http://jsonlogic.com/tests.json to all pass:

  1) Failure:
JSONLogicTest#test_170 [test/json_logic_test.rb:20]:
{"if":[false,"apple",false,"banana"]} (data: null).
Expected [false, "apple", false, "banana"] to be nil.

  2) Failure:
JSONLogicTest#test_125 [test/json_logic_test.rb:20]:
{"if":[]} (data: null).
Expected [] to be nil.

  3) Failure:
JSONLogicTest#test_175 [test/json_logic_test.rb:20]:
{"if":[false,"apple",false,"banana",false,"carrot"]} (data: null).
Expected [false, "apple", false, "banana", false, "carrot"] to be nil.

  4) Failure:
JSONLogicTest#test_130 [test/json_logic_test.rb:20]:
{"if":[false,"apple"]} (data: null).
Expected [false, "apple"] to be nil.

@scalp42
Copy link

scalp42 commented Oct 9, 2024

@bhgames any chance to see this merged?

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