Skip to content

Commit

Permalink
Don't test with frozen string literals on Ruby 2.3
Browse files Browse the repository at this point in the history
ERB in Ruby 2.3 doesn't seem to be frozen string literal
compatible - at least under certain cases. I observed a number
of test failures in GitHub Actions when working with templates,
generating an error like this:

```
(erb):1:in `concat': can't modify frozen String (RuntimeError)
```

You can see an example [here][1].

It seems prudent just to ignore this since (a) people are unlikely
to use Ruby 2.3, (b) we are set to drop support for it and (c)
it's even more unlikely that people use Ruby 2.3 *and* frozen
string literals.

[1]: https://github.com/octokit/octokit.rb/runs/6792298625?check_suite_focus=true
  • Loading branch information
timrogers committed Jun 8, 2022
1 parent 64c95b4 commit fa00889
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/octokit.yml
Expand Up @@ -58,11 +58,17 @@ jobs:
bundle config set path .bundle/gems
bundle config set without development
bundle install --jobs 4 --retry 3
- name: Test with RSpec
- name: Test with RSpec with frozen string literals enabled
env:
GITHUB_CI: 1
RUBYOPT: --enable-frozen-string-literal
run: bundle exec rspec -w
if: ${{ matrix.ruby != '2.3' }}
- name: Test with RSpec without frozen string literals enabled
env:
GITHUB_CI: 1
run: bundle exec rspec -w
if: ${{ matrix.ruby == '2.3' }}
- name: Lint with Rubocop
env:
GITHUB_CI: 1
Expand Down

0 comments on commit fa00889

Please sign in to comment.