Skip to content

Commit

Permalink
Merge pull request #1120 from casperisfine/fstr
Browse files Browse the repository at this point in the history
Fix compatibility with `--frozen-string-literal`
  • Loading branch information
pama authored Jun 17, 2024
2 parents 3089eaa + a2c1a8a commit 3ed8f44
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ jobs:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
rubyopt: [""]
include:
- ruby-version: '3.3'
rubyopt: "--enable-frozen-string-literal --debug-frozen-string-literal"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby-version }}"
bundler-cache: true
- run: bundle exec rake
- run: bundle exec rake RUBYOPT="${{ matrix.rubyopt }}"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## unreleased
- Update following locales:
- Portuguese (pt): Fixed `number.currency.format.format` and `helpers.submit.update` #1122
- Fix compatibility with frozen string literals. #1120

## 7.0.9 (2024-03-13)

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rails-i18n (7.0.8)
rails-i18n (7.0.9)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)

Expand Down
2 changes: 1 addition & 1 deletion rails/transliteration/ru.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def rule

chars = string.scan(%r{#{multi_keys.join '|'}|\w|.})

result = ""
result = +""

chars.each_with_index do |char, index|
if upper.has_key?(char) && lower.has_key?(chars[index+1])
Expand Down
2 changes: 1 addition & 1 deletion spec/support/ruby_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RailsI18n
module Spec
module RubyContent
def content
@content ||= eval(IO.read(@filepath), TOPLEVEL_BINDING)
@content ||= eval(File.read(@filepath), TOPLEVEL_BINDING, @filepath)
end
end
end
Expand Down

0 comments on commit 3ed8f44

Please sign in to comment.