From 747fe5ecfe6d359aafcdcdd17bf46a441d36e6e4 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Mon, 1 Apr 2024 17:19:46 +0900 Subject: [PATCH] Run spec on ruby-head for the effect of frozen string literal See also https://bugs.ruby-lang.org/issues/20205 Itamae has no frozen_string_literal magic comments. In the future, Ruby will enable frozen string literal by default. This commit checks its effect for itamae, by recurring GitHub actions. --- .github/workflows/test.yml | 6 ++++++ itamae.gemspec | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b681557..1080c20b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,6 +59,12 @@ jobs: rubyopt: "--yjit" - ruby: "3.3" rubyopt: "--yjit" + include: + # ruby-debug is the same as ruby-head but with assertions enabled (-DRUBY_DEBUG=1) + - ruby: "debug" + rubyopt: "" # See also https://bugs.ruby-lang.org/issues/20205 (enable frozen string literal as default) + - ruby: "debug" + rubyopt: "--disable=frozen-string-literal" uses: ./.github/workflows/test_main.yml with: diff --git a/itamae.gemspec b/itamae.gemspec index 5a729507..de4222d7 100644 --- a/itamae.gemspec +++ b/itamae.gemspec @@ -32,6 +32,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "hashie" spec.add_runtime_dependency "ansi" spec.add_runtime_dependency "schash", "~> 0.1.0" + spec.add_runtime_dependency "base64" spec.add_development_dependency "bundler", ">= 1.3" spec.add_development_dependency "rake"