Skip to content

Commit 5797699

Browse files
committed
Fix compatibility with --frozen-string-literal
1 parent c5987d5 commit 5797699

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ jobs:
88
matrix:
99
ruby: [ '3.1', '3.2', '3.3', 'head' ]
1010
rails: [ '7.1', 'edge' ]
11+
rubyopt: [""]
1112
include:
12-
- ruby: '2.7'
13-
rails: '6.1'
1413
- ruby: '3.0'
1514
rails: '6.1'
1615
- ruby: '3.1'
1716
rails: '7.0'
17+
- ruby: '3.3'
18+
rails: 'edge'
19+
rubyopt: "--enable-frozen-string-literal"
1820

1921
env:
2022
RAILS_VERSION: ${{ matrix.rails }}
2123

2224
steps:
23-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v4
2426

2527
- name: Set up Ruby
2628
uses: ruby/setup-ruby@v1
@@ -29,10 +31,10 @@ jobs:
2931
bundler-cache: true
3032

3133
- name: Run unit tests
32-
run: bundle exec rake test:unit
34+
run: bundle exec rake test:unit RUBYOPT="${{ matrix.rubyopt }}"
3335
timeout-minutes: 3
3436

3537
- name: Run acceptance tests
36-
run: bundle exec rake test:acceptance
38+
run: bundle exec rake test:acceptance RUBYOPT="${{ matrix.rubyopt }}"
3739
timeout-minutes: 10
3840
if: ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new`

test/support/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def read_streams
168168
end
169169

170170
def read_stream(stream)
171-
output = ""
171+
output = +""
172172
while IO.select([stream], [], [], 0.5) && !stream.eof?
173173
output << stream.readpartial(10240)
174174
end

0 commit comments

Comments
 (0)