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

JSON::Pure fix strict mode #585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casperisfine
Copy link

Followup: #519
Fix: #584

lib/json/pure/generator.rb Outdated Show resolved Hide resolved
@eregon
Copy link
Contributor

eregon commented May 9, 2024

I also noticed the docs in

# Returns true, if forward slashes are escaped. Otherwise returns false.
are wrong, could you fix that too?

And the alignment in

@script_safe = false
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
Copy link
Author

I also noticed

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

@eregon
Copy link
Contributor

eregon commented May 9, 2024

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).

@casperisfine casperisfine force-pushed the fix-strict-pure branch 2 times, most recently from db37392 to 937900c Compare May 9, 2024 13:04
Copy link
Contributor

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

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.

strict option is broken for pure-Ruby implementation
3 participants