Skip to content

Commit 85979fd

Browse files
Freeze strings by default
1 parent bc473c8 commit 85979fd

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
run: docker compose up --detach
3939
- name: Run tests
4040
run: bin/rails test; bin/rails test:system
41+
env:
42+
RUBYOPT: "--enable-frozen-string-literal"
4143
- name: Keep screenshots from failed system tests
4244
uses: actions/upload-artifact@v6
4345
if: failure()

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ WORKDIR /hackathons
55
ENV RAILS_ENV="production" \
66
BUNDLE_DEPLOYMENT="1" \
77
BUNDLE_PATH="/usr/local/bundle" \
8-
BUNDLE_WITHOUT="development"
8+
BUNDLE_WITHOUT="development" \
9+
RUBYOPT="--enable-frozen-string-literal"
910

1011

1112
FROM base AS build

app/models/hackathon.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class Hackathon < ApplicationRecord
2+
CS = "rr".succ!
3+
24
include Broadcasting
35
include Eventable
46
include Taggable

0 commit comments

Comments
 (0)