Updates for frozen string literal compatibility. #1376
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
These changes allow the tests to run with
RUBYOPT="--enable-frozen-string-literal"
- well, except for the last three tests intest/test_integration.rb
, which were hanging for me, so I added temporary skip statements in (though this happens without the env variable too - a quirk of my system, I guess).At the current point in time, Rubocop is not frozen-string-literal friendly, as it depends on parser (which I've got a pending PR submitted for), but parser depends on racc (which has existing PRs from quite some time ago, not yet merged). So, if anyone knows anything about racc, would love your input there, as the maintainer of parser is happy enough with my patch but wants racc patched first. Due to the compiling nature of parser, it can't be used as a git reference in Gemfiles, so this is certainly more of a roadblock than I'd like.
All of that is to say: there's no point setting the
RUBYOPT
flag for MRI 2.4+ in the Travis configuration until these dependencies are sorted, which means there's the possibility of introducing regressions in the meantime.whitequark/parser#354
ruby/racc#80
ruby/racc#81