Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 4ecf073

Browse files
committed
Run 3.4 build with frozen string mutation detection
https://gist.github.com/fxn/bf4eed2505c76f4fca03ab48c43adc72
1 parent 2ba0f10 commit 4ecf073

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

script/functions.sh

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ if is_mri_192_plus; then
1616
export RUBYOPT="--disable=gem"
1717
fi
1818

19+
if is_ruby_34_plus; then
20+
export RUBYOPT="$RUBYOPT -W:deprecated"
21+
export RUBYOPT="$RUBYOPT --enable=frozen-string-literal --debug=frozen-string-literal"
22+
fi
23+
1924
function clone_repo {
2025
if [ ! -d $1 ]; then # don't clone if the dir is already there
2126
if [ -z "$2" ]; then

script/predicate_functions.sh

+8
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ function is_ruby_31_plus {
111111
fi
112112
}
113113

114+
function is_ruby_34_plus {
115+
if ruby -e "exit(RUBY_VERSION.to_f >= 3.4)"; then
116+
return 0
117+
else
118+
return 1
119+
fi
120+
}
121+
114122
function rspec_rails_compatible {
115123
if is_ruby_25_plus; then
116124
# TODO remove when RSpec-Rails build is 3.1 safe by default

0 commit comments

Comments
 (0)