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

support Ruby 2.4's frozen string literals (1.4.x branch) #80

Open
wants to merge 2 commits into
base: 1-4-stable
from

Conversation

Projects
None yet
3 participants
@flavorjones
Collaborator

flavorjones commented Feb 16, 2017

Note this change is made relative to the 1-4-stable branch.

It would be great to cut an updated 1.4.x release after merging this in.

support Ruby 2.4's frozen string literals
Note this change is made relative to the 1-4-stable branch.
@flavorjones

This comment has been minimized.

Show comment
Hide comment
@flavorjones

flavorjones Feb 16, 2017

Collaborator

Note that you can test before/after by setting RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"

Collaborator

flavorjones commented Feb 16, 2017

Note that you can test before/after by setting RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"

@drbrain

This comment has been minimized.

Show comment
Hide comment
@drbrain

drbrain Feb 16, 2017

Collaborator

Will an eval test work?

Collaborator

drbrain commented Feb 16, 2017

Will an eval test work?

@flavorjones

This comment has been minimized.

Show comment
Hide comment
@flavorjones

flavorjones Feb 16, 2017

Collaborator

@drbrain Not sure what you mean?

Collaborator

flavorjones commented Feb 16, 2017

@drbrain Not sure what you mean?

@drbrain

This comment has been minimized.

Show comment
Hide comment
@drbrain

drbrain Feb 16, 2017

Collaborator

A test like:

parser_output = Racc.generate_a_parser "grammar"

eval "# frozen_string_literal: true\n#{parser_output}"

Parser.parse "something"

assert true, "Parser didn't raise a frozen string exception, 🎊"
Collaborator

drbrain commented Feb 16, 2017

A test like:

parser_output = Racc.generate_a_parser "grammar"

eval "# frozen_string_literal: true\n#{parser_output}"

Parser.parse "something"

assert true, "Parser didn't raise a frozen string exception, 🎊"

@flavorjones flavorjones changed the title from support Ruby 2.4's frozen string literals to support Ruby 2.4's frozen string literals (1.4.x branch) Feb 16, 2017

@flavorjones

This comment has been minimized.

Show comment
Hide comment
@flavorjones

flavorjones Feb 16, 2017

Collaborator

Ah, I see what you're getting at.

For the 1.4 branch, this changeset was small, but check out what had to be done for master: #81

So I'd personally prefer to see the entire test suite run with the frozen strings option; unfortunately the travis setup is outdated and has been failing for some time. I'll add a commit fixing it up, and you can be the judge.

Collaborator

flavorjones commented Feb 16, 2017

Ah, I see what you're getting at.

For the 1.4 branch, this changeset was small, but check out what had to be done for master: #81

So I'd personally prefer to see the entire test suite run with the frozen strings option; unfortunately the travis setup is outdated and has been failing for some time. I'll add a commit fixing it up, and you can be the judge.

@drbrain

This comment has been minimized.

Show comment
Hide comment
@drbrain

drbrain Feb 17, 2017

Collaborator

👍🏻

Collaborator

drbrain commented Feb 17, 2017

👍🏻

@pat

This comment has been minimized.

Show comment
Hide comment
@pat

pat Jun 23, 2017

I realise this PR has been dormant for quite some time. Would love to get frozen string literal support in though!

With regards to getting things on Travis green: I've just done some poking around, and added the following to try to get the tests running. They're actually running on 1.9 (albeit with some failures), but no luck elsewhere (due to minitest/autorun not being available for some reason): flavorjones/racc@flavorjones-1.4-frozen-string-literal...pat:flavorjones-1.4-frozen-string-literal - the results can be found at https://travis-ci.org/pat/racc - any thoughts on next steps are very welcome :)

pat commented Jun 23, 2017

I realise this PR has been dormant for quite some time. Would love to get frozen string literal support in though!

With regards to getting things on Travis green: I've just done some poking around, and added the following to try to get the tests running. They're actually running on 1.9 (albeit with some failures), but no luck elsewhere (due to minitest/autorun not being available for some reason): flavorjones/racc@flavorjones-1.4-frozen-string-literal...pat:flavorjones-1.4-frozen-string-literal - the results can be found at https://travis-ci.org/pat/racc - any thoughts on next steps are very welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment