From 06864afbc44f59a15b6647447720802fff0223e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sat, 16 Feb 2019 14:48:51 +0100 Subject: [PATCH] Add frozen string literal support --- .github/workflows/macos.yml | 2 +- lib/rdoc/erb_partial.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7d20478e58..dd438501a9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,4 +12,4 @@ jobs: gem install bundler --no-document bundle install - name: Run test - run: rake + run: rake && RUBYOPT=--enable-frozen_string_literal rake diff --git a/lib/rdoc/erb_partial.rb b/lib/rdoc/erb_partial.rb index 8dc2c46013..d6e3f41b7e 100644 --- a/lib/rdoc/erb_partial.rb +++ b/lib/rdoc/erb_partial.rb @@ -12,7 +12,7 @@ class RDoc::ERBPartial < ERB def set_eoutvar compiler, eoutvar = '_erbout' super - compiler.pre_cmd = ["#{eoutvar} ||= ''"] + compiler.pre_cmd = ["#{eoutvar} ||= +''"] end end