Skip to content

Commit

Permalink
Remove redundant encoding
Browse files Browse the repository at this point in the history
This magic comment is not needed anymore because the default encoding of
source code files assumed by Ruby 2 is utf-8, and the minimum required
Ruby version is 3.1

Autofixed with:
```
rubocop -a --only Style/Encoding
```
  • Loading branch information
tagliala committed Apr 23, 2024
1 parent 73b84b5 commit bb06f68
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 39 deletions.
2 changes: 0 additions & 2 deletions lib/money/currency.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

require "json"
require "money/currency/loader"
require "money/currency/heuristics"
Expand Down
2 changes: 0 additions & 2 deletions lib/money/currency/heuristics.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

class Money
class Currency
module Heuristics
Expand Down
1 change: 0 additions & 1 deletion lib/money/money.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
require "money/bank/variable_exchange"
require "money/bank/single_currency"
require "money/money/arithmetic"
Expand Down
2 changes: 0 additions & 2 deletions lib/money/money/allocation.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

class Money
class Allocation
# Splits a given amount in parts. The allocation is based on the parts' proportions
Expand Down
1 change: 0 additions & 1 deletion lib/money/money/formatter.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: UTF-8
require 'money/money/formatting_rules'

class Money
Expand Down
2 changes: 0 additions & 2 deletions lib/money/money/formatting_rules.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: UTF-8

class Money
class FormattingRules
def initialize(currency, *raw_rules)
Expand Down
2 changes: 0 additions & 2 deletions lib/money/money/locale_backend.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: UTF-8

require 'money/locale_backend/errors'
require 'money/locale_backend/legacy'
require 'money/locale_backend/i18n'
Expand Down
1 change: 0 additions & 1 deletion money.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "money/version"
Expand Down
2 changes: 0 additions & 2 deletions spec/currency/heuristics_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Currency::Heuristics do
describe "#analyze_string" do
let(:it) { Money::Currency }
Expand Down
2 changes: 0 additions & 2 deletions spec/currency/loader_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Currency::Loader do
it "returns a currency table hash" do
expect(subject.load_currencies).to be_a Hash
Expand Down
2 changes: 0 additions & 2 deletions spec/currency_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Currency do
FOO = '{ "priority": 1, "iso_code": "FOO", "iso_numeric": "840", "name": "United States Dollar", "symbol": "$", "subunit": "Cent", "subunit_to_unit": 1000, "symbol_first": true, "html_entity": "$", "decimal_mark": ".", "thousands_separator": ",", "smallest_denomination": 1 }'

Expand Down
2 changes: 0 additions & 2 deletions spec/locale_backend/currency_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend::Currency do
describe '#lookup' do
let(:currency) { Money::Currency.new('EUR') }
Expand Down
2 changes: 0 additions & 2 deletions spec/locale_backend/i18n_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend::I18n do
describe '#initialize' do
it 'raises an error when I18n is not defined' do
Expand Down
2 changes: 0 additions & 2 deletions spec/locale_backend/legacy_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend::Legacy do
after { Money.use_i18n = true }

Expand Down
2 changes: 0 additions & 2 deletions spec/money/allocation_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Allocation do
describe 'given number as argument' do
it 'raises an error when invalid argument is given' do
Expand Down
2 changes: 0 additions & 2 deletions spec/money/arithmetic_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Arithmetic do
describe "-@" do
it "changes the sign of a number" do
Expand Down
2 changes: 0 additions & 2 deletions spec/money/constructors_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Constructors do

describe "::empty" do
Expand Down
2 changes: 0 additions & 2 deletions spec/money/formatting_rules_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::FormattingRules do
it 'does not modify frozen rules in place' do
expect {
Expand Down
2 changes: 0 additions & 2 deletions spec/money/formatting_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money, "formatting" do

BAR = '{ "priority": 1, "iso_code": "BAR", "iso_numeric": "840", "name": "Dollar with 4 decimal places", "symbol": "$", "subunit": "Cent", "subunit_to_unit": 10000, "symbol_first": true, "html_entity": "$", "decimal_mark": ".", "thousands_separator": ",", "smallest_denomination": 1 }'
Expand Down
2 changes: 0 additions & 2 deletions spec/money/locale_backend_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend do
describe '.find' do
it 'returns an initialized backend' do
Expand Down
2 changes: 0 additions & 2 deletions spec/money_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money do
describe '.locale_backend' do
after { Money.locale_backend = :legacy }
Expand Down

0 comments on commit bb06f68

Please sign in to comment.