Skip to content

Updates for frozen string literal compatibility.#6

Merged
tenderlove merged 1 commit intorails:masterfrom
pat:master
Feb 18, 2019
Merged

Updates for frozen string literal compatibility.#6
tenderlove merged 1 commit intorails:masterfrom
pat:master

Conversation

@pat
Copy link
Copy Markdown

@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
Copy link
Copy Markdown
Author

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 20, 2017
The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder:
rails/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.
@tenderlove tenderlove merged commit 0a5eefa into rails:master Feb 18, 2019
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