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

Commit

Permalink
Run 3.4 build with frozen string mutation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Aug 7, 2024
1 parent 2ba0f10 commit 4ecf073
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ if is_mri_192_plus; then
export RUBYOPT="--disable=gem"
fi

if is_ruby_34_plus; then
export RUBYOPT="$RUBYOPT -W:deprecated"
export RUBYOPT="$RUBYOPT --enable=frozen-string-literal --debug=frozen-string-literal"
fi

function clone_repo {
if [ ! -d $1 ]; then # don't clone if the dir is already there
if [ -z "$2" ]; then
Expand Down
8 changes: 8 additions & 0 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ function is_ruby_31_plus {
fi
}

function is_ruby_34_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 3.4)"; then
return 0
else
return 1
fi
}

function rspec_rails_compatible {
if is_ruby_25_plus; then
# TODO remove when RSpec-Rails build is 3.1 safe by default
Expand Down

0 comments on commit 4ecf073

Please sign in to comment.