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

Freeze Ruby string literals with the pragma #509

Merged
merged 2 commits into from
Oct 10, 2019

Conversation

ashmaroli
Copy link
Member

# frozen_string_literal: true pragma at the top of a Ruby file instructs the interpreter to consider all string literals in that file as immutable or frozen.

Additionally adds a requirement for at least Ruby 2.3.0 to allow using the String#+@ method to obtain an unfrozen copy of a string.

Copy link
Member

@mertkahyaoglu mertkahyaoglu left a comment

Choose a reason for hiding this comment

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

LGTM if that's the only place we are mutating 😬

@ashmaroli
Copy link
Member Author

if that's the only place we are mutating

Tested various namespaces manually via the admin interface to be sure.. Didn't encounter any errors.. 😁

@ashmaroli ashmaroli merged commit dc01f86 into jekyll:master Oct 10, 2019
@ashmaroli ashmaroli deleted the frozen-string-literals branch October 10, 2019 03:40
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