ruby / json

JSON implementation for Ruby
https://ruby.github.io/json
Other
673 stars 326 forks source link

JSON::Pure fix strict mode #585

Closed casperisfine closed 1 day ago

casperisfine commented 5 months ago

Followup: https://github.com/flori/json/pull/519 Fix: https://github.com/flori/json/issues/584

eregon commented 5 months ago

I also noticed the docs in https://github.com/flori/json/blob/4f876a8bf7c45972800bae5bdbaf892aa2f714a5/lib/json/pure/generator.rb#L222 are wrong, could you fix that too?

And the alignment in https://github.com/flori/json/blob/4f876a8bf7c45972800bae5bdbaf892aa2f714a5/lib/json/pure/generator.rb#L143 is inconsistent (I dislike this kind of alignment, too high maintenance and diff noise, but might as well be consistent in one way, i.e. all or none aligned)

casperisfine commented 5 months ago

I also noticed

I'd rather not bundle multiple unrelated fixes in the same PR. Makes merging more complicated.

eregon commented 5 months ago

Ah sorry, it's @script_safe misaligned, and that's unrelated indeed.

OTOH I think fixing the description of def strict? is very related (but not necessary in this PR, fair enough).