Skip to content

Commit be477e6

Browse files
committed
Enable Frozen string literals
At the best of my knowledge, this is not a breaking change. The only method that may potentially be affected is `Money::Formatter#append_currency_symbol`, however: - It is private API - Its inputs are derived from `append_sign`, and can be either an interpolated string or a result of `String#gsub` - In all supported Ruby versions, interpolated strings are always unfrozen Close #1108
1 parent 579286a commit be477e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+86
-0
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
gem 'pry', require: false

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "bundler/gem_tasks"
24
require "rake/clean"
35
require "rspec/core/rake_task"

lib/money.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "bigdecimal"
24
require "bigdecimal/util"
35
require "set"

lib/money/bank/base.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Money
24
# Provides classes that aid in the ability of exchange one currency with
35
# another.

lib/money/bank/single_currency.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'money/bank/base'
24

35
class Money

lib/money/bank/variable_exchange.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'money/bank/base'
24
require 'money/rates_store/memory'
35
require 'json'

lib/money/currency.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "json"
24
require "money/currency/loader"
35
require "money/currency/heuristics"

lib/money/currency/heuristics.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Money
24
class Currency
35
module Heuristics

lib/money/currency/loader.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Money
24
class Currency
35
module Loader

lib/money/locale_backend/base.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'money/locale_backend/errors'
24

35
class Money

0 commit comments

Comments
 (0)