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

fix: add blank lines to empty hashs - json 2.8.x regression #111

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Nov 28, 2024

json 2.8.0+ no longer prints empty hashs over new lines, so we now get this output

Diff
--------------------------------------
Key: - is expected 
     + is actual 
Matching keys and values are not shown

 {
-  "thing": {
-    "alligator": {
-      "name": "Mary"
-    }
-  }
+  "thing": {}
 }

Description of differences
--------------------------------------

compared to the expected

Diff
--------------------------------------
Key: - is expected 
     + is actual 
Matching keys and values are not shown

 {
   "thing": {
-    "alligator": {
-      "name": "Mary"
-    }
   }
 }

Description of differences
--------------------------------------

      generates the right number of lines, even with ActiveSupport loaded

Finished in 0.00154 seconds (files took 0.42989 seconds to load)
1 example, 0 failures

Interestingly it only fails on Ruby 3.x+ with json 2.8.x gem, which is pulled in by the faraday change when pinned here as part of 2.12.0 release

@YOU54F
Copy link
Member Author

YOU54F commented Nov 28, 2024

Raised issue over at ruby json repo

ruby/json#714

@YOU54F YOU54F merged commit 855d495 into master Nov 29, 2024
30 checks passed
@YOU54F YOU54F deleted the fix/diff_change_ruby_3_json_2_8_regression branch November 29, 2024 16:03
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.

1 participant