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

Updates for frozen string literal compatibility. #6

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@pat

pat commented Jun 19, 2017

These changes allow the test suite to pass with RUBYOPT="--enable-frozen-string-literal".

If you wanted, you can update .travis.yml to include the following, which automatically enables that flag against MRI 2.4.1 (thus picking up regressions). It'd be nice if it worked reliably for future MRI releases and ruby-head though (I'll ponder a better way of doing this that covers those scenarios).

before_script:
- ((ruby --version | grep -q "2.4.1") && export RUBYOPT="--enable-frozen-string-literal") || true
@pat

This comment has been minimized.

Show comment
Hide comment
@pat

pat Jun 19, 2017

A better before_script (outputs the RUBYOPT result, and is more future-proof, handling versions beyond 2.4.x):

before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT

pat commented Jun 19, 2017

A better before_script (outputs the RUBYOPT result, and is more future-proof, handling versions beyond 2.4.x):

before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT

pat added a commit to pat/rails that referenced this pull request Jun 19, 2017

Make ActiveSupport frozen string literal friendly.
The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder:
tenderlove/builder#6

Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.

pat added a commit to pat/rails that referenced this pull request Jun 20, 2017

Make ActiveSupport frozen string literal friendly.
The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder:
tenderlove/builder#6

Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment