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

Magic comment "immutable: string" makes "literal".freeze the default for that file #487

wants to merge 4 commits into
base: trunk
Commits on Dec 19, 2013
  1. Add magic comment for immutable strings

    jroesch committed Dec 19, 2013
    Add a magic comment to Ruby that will implicitly call .freeze on every string in the file. If the string can be statically allocated it will, otherwise it will make the string immutable at runtime. If one does need a mutable string, they can be obtained in two ways. Either by calling or invoking String#dup on a String which will reset its frozen status.
Commits on Dec 26, 2013
Commits on Dec 27, 2013
Commits on Dec 29, 2013
  1. Move and add a test

    ColinDKelley committed Dec 29, 2013