From cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 22 Jun 2017 22:59:18 -0400 Subject: Enforce frozen string in Rubocop --- activesupport/lib/active_support/core_ext/array.rb | 1 + activesupport/lib/active_support/core_ext/array/access.rb | 1 + activesupport/lib/active_support/core_ext/array/conversions.rb | 1 + activesupport/lib/active_support/core_ext/array/extract_options.rb | 1 + activesupport/lib/active_support/core_ext/array/grouping.rb | 1 + activesupport/lib/active_support/core_ext/array/inquiry.rb | 1 + activesupport/lib/active_support/core_ext/array/prepend_and_append.rb | 1 + activesupport/lib/active_support/core_ext/array/wrap.rb | 1 + activesupport/lib/active_support/core_ext/benchmark.rb | 1 + activesupport/lib/active_support/core_ext/big_decimal.rb | 1 + activesupport/lib/active_support/core_ext/big_decimal/conversions.rb | 1 + activesupport/lib/active_support/core_ext/class.rb | 1 + activesupport/lib/active_support/core_ext/class/attribute.rb | 1 + activesupport/lib/active_support/core_ext/class/attribute_accessors.rb | 1 + activesupport/lib/active_support/core_ext/class/subclasses.rb | 1 + activesupport/lib/active_support/core_ext/date.rb | 1 + activesupport/lib/active_support/core_ext/date/acts_like.rb | 1 + activesupport/lib/active_support/core_ext/date/blank.rb | 1 + activesupport/lib/active_support/core_ext/date/calculations.rb | 1 + activesupport/lib/active_support/core_ext/date/conversions.rb | 1 + activesupport/lib/active_support/core_ext/date/zones.rb | 1 + activesupport/lib/active_support/core_ext/date_and_time/calculations.rb | 1 + activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb | 1 + activesupport/lib/active_support/core_ext/date_and_time/zones.rb | 1 + activesupport/lib/active_support/core_ext/date_time.rb | 1 + activesupport/lib/active_support/core_ext/date_time/acts_like.rb | 1 + activesupport/lib/active_support/core_ext/date_time/blank.rb | 1 + activesupport/lib/active_support/core_ext/date_time/calculations.rb | 1 + activesupport/lib/active_support/core_ext/date_time/compatibility.rb | 1 + activesupport/lib/active_support/core_ext/date_time/conversions.rb | 1 + activesupport/lib/active_support/core_ext/digest/uuid.rb | 1 + activesupport/lib/active_support/core_ext/enumerable.rb | 1 + activesupport/lib/active_support/core_ext/file.rb | 1 + activesupport/lib/active_support/core_ext/file/atomic.rb | 1 + activesupport/lib/active_support/core_ext/hash.rb | 1 + activesupport/lib/active_support/core_ext/hash/compact.rb | 1 + activesupport/lib/active_support/core_ext/hash/conversions.rb | 1 + activesupport/lib/active_support/core_ext/hash/deep_merge.rb | 1 + activesupport/lib/active_support/core_ext/hash/except.rb | 1 + activesupport/lib/active_support/core_ext/hash/indifferent_access.rb | 1 + activesupport/lib/active_support/core_ext/hash/keys.rb | 1 + activesupport/lib/active_support/core_ext/hash/reverse_merge.rb | 1 + activesupport/lib/active_support/core_ext/hash/slice.rb | 1 + activesupport/lib/active_support/core_ext/hash/transform_values.rb | 1 + activesupport/lib/active_support/core_ext/integer.rb | 1 + activesupport/lib/active_support/core_ext/integer/inflections.rb | 1 + activesupport/lib/active_support/core_ext/integer/multiple.rb | 1 + activesupport/lib/active_support/core_ext/integer/time.rb | 1 + activesupport/lib/active_support/core_ext/kernel.rb | 1 + activesupport/lib/active_support/core_ext/kernel/agnostics.rb | 1 + activesupport/lib/active_support/core_ext/kernel/concern.rb | 1 + activesupport/lib/active_support/core_ext/kernel/reporting.rb | 1 + activesupport/lib/active_support/core_ext/kernel/singleton_class.rb | 1 + activesupport/lib/active_support/core_ext/load_error.rb | 1 + activesupport/lib/active_support/core_ext/marshal.rb | 1 + activesupport/lib/active_support/core_ext/module.rb | 1 + activesupport/lib/active_support/core_ext/module/aliasing.rb | 1 + activesupport/lib/active_support/core_ext/module/anonymous.rb | 1 + activesupport/lib/active_support/core_ext/module/attr_internal.rb | 1 + activesupport/lib/active_support/core_ext/module/attribute_accessors.rb | 1 + .../lib/active_support/core_ext/module/attribute_accessors_per_thread.rb | 1 + activesupport/lib/active_support/core_ext/module/concerning.rb | 1 + activesupport/lib/active_support/core_ext/module/delegation.rb | 1 + activesupport/lib/active_support/core_ext/module/deprecation.rb | 1 + activesupport/lib/active_support/core_ext/module/introspection.rb | 1 + activesupport/lib/active_support/core_ext/module/reachable.rb | 1 + activesupport/lib/active_support/core_ext/module/remove_method.rb | 1 + activesupport/lib/active_support/core_ext/name_error.rb | 1 + activesupport/lib/active_support/core_ext/numeric.rb | 1 + activesupport/lib/active_support/core_ext/numeric/bytes.rb | 1 + activesupport/lib/active_support/core_ext/numeric/conversions.rb | 1 + activesupport/lib/active_support/core_ext/numeric/inquiry.rb | 1 + activesupport/lib/active_support/core_ext/numeric/time.rb | 1 + activesupport/lib/active_support/core_ext/object.rb | 1 + activesupport/lib/active_support/core_ext/object/acts_like.rb | 1 + activesupport/lib/active_support/core_ext/object/blank.rb | 1 + activesupport/lib/active_support/core_ext/object/conversions.rb | 1 + activesupport/lib/active_support/core_ext/object/deep_dup.rb | 1 + activesupport/lib/active_support/core_ext/object/duplicable.rb | 1 + activesupport/lib/active_support/core_ext/object/inclusion.rb | 1 + activesupport/lib/active_support/core_ext/object/instance_variables.rb | 1 + activesupport/lib/active_support/core_ext/object/json.rb | 1 + activesupport/lib/active_support/core_ext/object/to_param.rb | 1 + activesupport/lib/active_support/core_ext/object/to_query.rb | 1 + activesupport/lib/active_support/core_ext/object/try.rb | 1 + activesupport/lib/active_support/core_ext/object/with_options.rb | 1 + activesupport/lib/active_support/core_ext/range.rb | 1 + activesupport/lib/active_support/core_ext/range/conversions.rb | 1 + activesupport/lib/active_support/core_ext/range/each.rb | 1 + activesupport/lib/active_support/core_ext/range/include_range.rb | 1 + activesupport/lib/active_support/core_ext/range/overlaps.rb | 1 + activesupport/lib/active_support/core_ext/regexp.rb | 1 + activesupport/lib/active_support/core_ext/securerandom.rb | 1 + activesupport/lib/active_support/core_ext/string.rb | 1 + activesupport/lib/active_support/core_ext/string/access.rb | 1 + activesupport/lib/active_support/core_ext/string/behavior.rb | 1 + activesupport/lib/active_support/core_ext/string/conversions.rb | 1 + activesupport/lib/active_support/core_ext/string/exclude.rb | 1 + activesupport/lib/active_support/core_ext/string/filters.rb | 1 + activesupport/lib/active_support/core_ext/string/indent.rb | 1 + activesupport/lib/active_support/core_ext/string/inflections.rb | 1 + activesupport/lib/active_support/core_ext/string/inquiry.rb | 1 + activesupport/lib/active_support/core_ext/string/multibyte.rb | 1 + activesupport/lib/active_support/core_ext/string/output_safety.rb | 1 + activesupport/lib/active_support/core_ext/string/starts_ends_with.rb | 1 + activesupport/lib/active_support/core_ext/string/strip.rb | 1 + activesupport/lib/active_support/core_ext/string/zones.rb | 1 + activesupport/lib/active_support/core_ext/time.rb | 1 + activesupport/lib/active_support/core_ext/time/acts_like.rb | 1 + activesupport/lib/active_support/core_ext/time/calculations.rb | 1 + activesupport/lib/active_support/core_ext/time/compatibility.rb | 1 + activesupport/lib/active_support/core_ext/time/conversions.rb | 1 + activesupport/lib/active_support/core_ext/time/zones.rb | 1 + activesupport/lib/active_support/core_ext/uri.rb | 1 + 114 files changed, 114 insertions(+) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/array.rb b/activesupport/lib/active_support/core_ext/array.rb index e908386a1c..3f58855902 100644 --- a/activesupport/lib/active_support/core_ext/array.rb +++ b/activesupport/lib/active_support/core_ext/array.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/wrap" require "active_support/core_ext/array/access" require "active_support/core_ext/array/conversions" diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb index fca33c9d69..b6e576ad29 100644 --- a/activesupport/lib/active_support/core_ext/array/access.rb +++ b/activesupport/lib/active_support/core_ext/array/access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # Returns the tail of the array from +position+. # diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index cac15e1100..3d00046d02 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/xml_mini" require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/inflections" diff --git a/activesupport/lib/active_support/core_ext/array/extract_options.rb b/activesupport/lib/active_support/core_ext/array/extract_options.rb index 9008a0df2a..8204d42caf 100644 --- a/activesupport/lib/active_support/core_ext/array/extract_options.rb +++ b/activesupport/lib/active_support/core_ext/array/extract_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # By default, only instances of Hash itself are extractable. # Subclasses of Hash may implement this method and return diff --git a/activesupport/lib/active_support/core_ext/array/grouping.rb b/activesupport/lib/active_support/core_ext/array/grouping.rb index 0d798e5c4e..706c576691 100644 --- a/activesupport/lib/active_support/core_ext/array/grouping.rb +++ b/activesupport/lib/active_support/core_ext/array/grouping.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # Splits or iterates over the array in groups of size +number+, # padding any remaining slots with +fill_with+ unless it is +false+. diff --git a/activesupport/lib/active_support/core_ext/array/inquiry.rb b/activesupport/lib/active_support/core_ext/array/inquiry.rb index 66fa5fcd0c..81082f7128 100644 --- a/activesupport/lib/active_support/core_ext/array/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/array/inquiry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/array_inquirer" class Array diff --git a/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb b/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb index 88a34128c9..2dd1547765 100644 --- a/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb +++ b/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # The human way of thinking about adding stuff to the end of a list is with append. alias_method :append, :push unless [].respond_to?(:append) diff --git a/activesupport/lib/active_support/core_ext/array/wrap.rb b/activesupport/lib/active_support/core_ext/array/wrap.rb index b611d34c27..adb25718e4 100644 --- a/activesupport/lib/active_support/core_ext/array/wrap.rb +++ b/activesupport/lib/active_support/core_ext/array/wrap.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Array # Wraps its argument in an array unless it is already an array (or array-like). # diff --git a/activesupport/lib/active_support/core_ext/benchmark.rb b/activesupport/lib/active_support/core_ext/benchmark.rb index 2300953860..2db6e5f1c5 100644 --- a/activesupport/lib/active_support/core_ext/benchmark.rb +++ b/activesupport/lib/active_support/core_ext/benchmark.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "benchmark" class << Benchmark diff --git a/activesupport/lib/active_support/core_ext/big_decimal.rb b/activesupport/lib/active_support/core_ext/big_decimal.rb index 7b4f87f10e..b02bae8804 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "active_support/core_ext/big_decimal/conversions" diff --git a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb index decd4e1699..1729f00530 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bigdecimal" require "bigdecimal/util" diff --git a/activesupport/lib/active_support/core_ext/class.rb b/activesupport/lib/active_support/core_ext/class.rb index 6a19e862d0..059f0a9097 100644 --- a/activesupport/lib/active_support/core_ext/class.rb +++ b/activesupport/lib/active_support/core_ext/class.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require "active_support/core_ext/class/attribute" require "active_support/core_ext/class/subclasses" diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 8caddcd5c3..2fd4b18d3f 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/singleton_class" require "active_support/core_ext/module/remove_method" require "active_support/core_ext/array/extract_options" diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 0f767925ed..fb92c5d3d1 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # cattr_* became mattr_* aliases in 7dfbd91b0780fbd6a1dd9bfbc176e10894871d2d, # but we keep this around for libraries that directly require it knowing they # want cattr_*. No need to deprecate. diff --git a/activesupport/lib/active_support/core_ext/class/subclasses.rb b/activesupport/lib/active_support/core_ext/class/subclasses.rb index 62397d9508..f92ccdbf88 100644 --- a/activesupport/lib/active_support/core_ext/class/subclasses.rb +++ b/activesupport/lib/active_support/core_ext/class/subclasses.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/anonymous" require "active_support/core_ext/module/reachable" diff --git a/activesupport/lib/active_support/core_ext/date.rb b/activesupport/lib/active_support/core_ext/date.rb index 4f66804da2..1598be9ba6 100644 --- a/activesupport/lib/active_support/core_ext/date.rb +++ b/activesupport/lib/active_support/core_ext/date.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date/acts_like" require "active_support/core_ext/date/blank" require "active_support/core_ext/date/calculations" diff --git a/activesupport/lib/active_support/core_ext/date/acts_like.rb b/activesupport/lib/active_support/core_ext/date/acts_like.rb index 46fe99ad47..6c125d279c 100644 --- a/activesupport/lib/active_support/core_ext/date/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/date/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/acts_like" class Date diff --git a/activesupport/lib/active_support/core_ext/date/blank.rb b/activesupport/lib/active_support/core_ext/date/blank.rb index edd2847126..a28e726902 100644 --- a/activesupport/lib/active_support/core_ext/date/blank.rb +++ b/activesupport/lib/active_support/core_ext/date/blank.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" class Date #:nodoc: diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb index d6f60cac04..c0f4fdae80 100644 --- a/activesupport/lib/active_support/core_ext/date/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/duration" require "active_support/core_ext/object/acts_like" diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index 0f59c754fe..a36d5d844d 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/inflector/methods" require "active_support/core_ext/date/zones" diff --git a/activesupport/lib/active_support/core_ext/date/zones.rb b/activesupport/lib/active_support/core_ext/date/zones.rb index da23fe4892..6aa0852e07 100644 --- a/activesupport/lib/active_support/core_ext/date/zones.rb +++ b/activesupport/lib/active_support/core_ext/date/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/core_ext/date_and_time/zones" diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb index e2e1d3e359..1fa629e017 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" module DateAndTime diff --git a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb index 2d45e16546..078ac88229 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module DateAndTime diff --git a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb index edd724f1d0..4cc94d4ece 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module DateAndTime module Zones # Returns the simultaneous time in Time.zone if a zone is given or diff --git a/activesupport/lib/active_support/core_ext/date_time.rb b/activesupport/lib/active_support/core_ext/date_time.rb index 6fd498f864..5f238079c0 100644 --- a/activesupport/lib/active_support/core_ext/date_time.rb +++ b/activesupport/lib/active_support/core_ext/date_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date_time/acts_like" require "active_support/core_ext/date_time/blank" require "active_support/core_ext/date_time/calculations" diff --git a/activesupport/lib/active_support/core_ext/date_time/acts_like.rb b/activesupport/lib/active_support/core_ext/date_time/acts_like.rb index 6f50f55a53..774ff692c4 100644 --- a/activesupport/lib/active_support/core_ext/date_time/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/date_time/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/core_ext/object/acts_like" diff --git a/activesupport/lib/active_support/core_ext/date_time/blank.rb b/activesupport/lib/active_support/core_ext/date_time/blank.rb index b475fd926d..874c7554a3 100644 --- a/activesupport/lib/active_support/core_ext/date_time/blank.rb +++ b/activesupport/lib/active_support/core_ext/date_time/blank.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" class DateTime #:nodoc: diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb index 7a9eb8c266..91289175ed 100644 --- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" class DateTime diff --git a/activesupport/lib/active_support/core_ext/date_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_time/compatibility.rb index 870391aeaa..fd97fbce98 100644 --- a/activesupport/lib/active_support/core_ext/date_time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/date_time/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date_and_time/compatibility" require "active_support/core_ext/module/remove_method" diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb index d9b3743858..5c515bebbf 100644 --- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/inflector/methods" require "active_support/core_ext/time/conversions" diff --git a/activesupport/lib/active_support/core_ext/digest/uuid.rb b/activesupport/lib/active_support/core_ext/digest/uuid.rb index e6d60e3267..26a300feb6 100644 --- a/activesupport/lib/active_support/core_ext/digest/uuid.rb +++ b/activesupport/lib/active_support/core_ext/digest/uuid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" module Digest diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index 3a4ae6cb8b..a744b78e1c 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Enumerable # Enumerable#sum was added in Ruby 2.4, but it only works with Numeric elements # when we omit an identity. diff --git a/activesupport/lib/active_support/core_ext/file.rb b/activesupport/lib/active_support/core_ext/file.rb index 6d99bad2af..a1272c02e2 100644 --- a/activesupport/lib/active_support/core_ext/file.rb +++ b/activesupport/lib/active_support/core_ext/file.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "active_support/core_ext/file/atomic" diff --git a/activesupport/lib/active_support/core_ext/file/atomic.rb b/activesupport/lib/active_support/core_ext/file/atomic.rb index 8d6c0d3685..5b30e93357 100644 --- a/activesupport/lib/active_support/core_ext/file/atomic.rb +++ b/activesupport/lib/active_support/core_ext/file/atomic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fileutils" class File diff --git a/activesupport/lib/active_support/core_ext/hash.rb b/activesupport/lib/active_support/core_ext/hash.rb index c819307e8a..5d9fe68bb6 100644 --- a/activesupport/lib/active_support/core_ext/hash.rb +++ b/activesupport/lib/active_support/core_ext/hash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/compact" require "active_support/core_ext/hash/conversions" require "active_support/core_ext/hash/deep_merge" diff --git a/activesupport/lib/active_support/core_ext/hash/compact.rb b/activesupport/lib/active_support/core_ext/hash/compact.rb index e357284be0..ddccbe7d16 100644 --- a/activesupport/lib/active_support/core_ext/hash/compact.rb +++ b/activesupport/lib/active_support/core_ext/hash/compact.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash unless Hash.instance_methods(false).include?(:compact) # Returns a hash with non +nil+ values. diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 2a58a7f1ca..f33a52ae2b 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/xml_mini" require "active_support/time" require "active_support/core_ext/object/blank" diff --git a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb index 9c9faf67ea..1c6627a597 100644 --- a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a new hash with +self+ and +other_hash+ merged recursively. # diff --git a/activesupport/lib/active_support/core_ext/hash/except.rb b/activesupport/lib/active_support/core_ext/hash/except.rb index 2f6d38c1f6..e31c7c61e4 100644 --- a/activesupport/lib/active_support/core_ext/hash/except.rb +++ b/activesupport/lib/active_support/core_ext/hash/except.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a hash that includes everything except given keys. # hash = { a: true, b: false, c: nil } diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb index 3e1ccecb6c..74e606dcc7 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/hash_with_indifferent_access" class Hash diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index b7089357a8..b38ea9ba50 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a new hash with all keys converted using the +block+ operation. # diff --git a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb index 061c959442..2055d06385 100644 --- a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Merges the caller into +other_hash+. For example, # diff --git a/activesupport/lib/active_support/core_ext/hash/slice.rb b/activesupport/lib/active_support/core_ext/hash/slice.rb index 161b00dfb3..bd370931e4 100644 --- a/activesupport/lib/active_support/core_ext/hash/slice.rb +++ b/activesupport/lib/active_support/core_ext/hash/slice.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Slices a hash to include only the given keys. Returns a hash containing # the given keys. diff --git a/activesupport/lib/active_support/core_ext/hash/transform_values.rb b/activesupport/lib/active_support/core_ext/hash/transform_values.rb index 2f693bff0c..b6e2734193 100644 --- a/activesupport/lib/active_support/core_ext/hash/transform_values.rb +++ b/activesupport/lib/active_support/core_ext/hash/transform_values.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Hash # Returns a new hash with the results of running +block+ once for every value. # The keys are unchanged. diff --git a/activesupport/lib/active_support/core_ext/integer.rb b/activesupport/lib/active_support/core_ext/integer.rb index 8f0c55f9d3..21c6d9e0cc 100644 --- a/activesupport/lib/active_support/core_ext/integer.rb +++ b/activesupport/lib/active_support/core_ext/integer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/integer/multiple" require "active_support/core_ext/integer/inflections" require "active_support/core_ext/integer/time" diff --git a/activesupport/lib/active_support/core_ext/integer/inflections.rb b/activesupport/lib/active_support/core_ext/integer/inflections.rb index bc21b65533..945817793d 100644 --- a/activesupport/lib/active_support/core_ext/integer/inflections.rb +++ b/activesupport/lib/active_support/core_ext/integer/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector" class Integer diff --git a/activesupport/lib/active_support/core_ext/integer/multiple.rb b/activesupport/lib/active_support/core_ext/integer/multiple.rb index c668c7c2eb..2e4d78e66c 100644 --- a/activesupport/lib/active_support/core_ext/integer/multiple.rb +++ b/activesupport/lib/active_support/core_ext/integer/multiple.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Integer # Check whether the integer is evenly divisible by the argument. # diff --git a/activesupport/lib/active_support/core_ext/integer/time.rb b/activesupport/lib/active_support/core_ext/integer/time.rb index 74baae3639..be0958a495 100644 --- a/activesupport/lib/active_support/core_ext/integer/time.rb +++ b/activesupport/lib/active_support/core_ext/integer/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/core_ext/numeric/time" diff --git a/activesupport/lib/active_support/core_ext/kernel.rb b/activesupport/lib/active_support/core_ext/kernel.rb index 3d41ff7876..9e75d29cab 100644 --- a/activesupport/lib/active_support/core_ext/kernel.rb +++ b/activesupport/lib/active_support/core_ext/kernel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/kernel/agnostics" require "active_support/core_ext/kernel/concern" require "active_support/core_ext/kernel/reporting" diff --git a/activesupport/lib/active_support/core_ext/kernel/agnostics.rb b/activesupport/lib/active_support/core_ext/kernel/agnostics.rb index 64837d87aa..84a48979c4 100644 --- a/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +++ b/activesupport/lib/active_support/core_ext/kernel/agnostics.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # Makes backticks behave (somewhat more) similarly on all platforms. # On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the diff --git a/activesupport/lib/active_support/core_ext/kernel/concern.rb b/activesupport/lib/active_support/core_ext/kernel/concern.rb index 307a7f7a63..9d170e0a64 100644 --- a/activesupport/lib/active_support/core_ext/kernel/concern.rb +++ b/activesupport/lib/active_support/core_ext/kernel/concern.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/concerning" module Kernel diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb index c02618d5f3..822efb5aae 100644 --- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb +++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kernel module_function diff --git a/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb b/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb index 9bbf1bbd73..5f9c008f6e 100644 --- a/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb +++ b/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kernel # class_eval on an object acts like singleton_class.class_eval. def class_eval(*args, &block) diff --git a/activesupport/lib/active_support/core_ext/load_error.rb b/activesupport/lib/active_support/core_ext/load_error.rb index d273487010..55177efdaf 100644 --- a/activesupport/lib/active_support/core_ext/load_error.rb +++ b/activesupport/lib/active_support/core_ext/load_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class LoadError REGEXPS = [ /^no such file to load -- (.+)$/i, diff --git a/activesupport/lib/active_support/core_ext/marshal.rb b/activesupport/lib/active_support/core_ext/marshal.rb index bba2b3be2e..13b1d0cf95 100644 --- a/activesupport/lib/active_support/core_ext/marshal.rb +++ b/activesupport/lib/active_support/core_ext/marshal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module MarshalWithAutoloading # :nodoc: def load(source, proc = nil) diff --git a/activesupport/lib/active_support/core_ext/module.rb b/activesupport/lib/active_support/core_ext/module.rb index 2930255557..6fe85c30a6 100644 --- a/activesupport/lib/active_support/core_ext/module.rb +++ b/activesupport/lib/active_support/core_ext/module.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/aliasing" require "active_support/core_ext/module/introspection" require "active_support/core_ext/module/anonymous" diff --git a/activesupport/lib/active_support/core_ext/module/aliasing.rb b/activesupport/lib/active_support/core_ext/module/aliasing.rb index c48bd3354a..62eb9e4c76 100644 --- a/activesupport/lib/active_support/core_ext/module/aliasing.rb +++ b/activesupport/lib/active_support/core_ext/module/aliasing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Allows you to make aliases for attributes, which includes # getter, setter, and a predicate. diff --git a/activesupport/lib/active_support/core_ext/module/anonymous.rb b/activesupport/lib/active_support/core_ext/module/anonymous.rb index 510c9a5430..7d10240199 100644 --- a/activesupport/lib/active_support/core_ext/module/anonymous.rb +++ b/activesupport/lib/active_support/core_ext/module/anonymous.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # A module may or may not have a name. # diff --git a/activesupport/lib/active_support/core_ext/module/attr_internal.rb b/activesupport/lib/active_support/core_ext/module/attr_internal.rb index 5081d5f7a3..8d37460dbc 100644 --- a/activesupport/lib/active_support/core_ext/module/attr_internal.rb +++ b/activesupport/lib/active_support/core_ext/module/attr_internal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Declares an attribute reader backed by an internally-named instance variable. def attr_internal_reader(*attrs) diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb index 9244cfa157..9276755374 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb index 1e82b4acc2..348563b1f7 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/core_ext/module/concerning.rb b/activesupport/lib/active_support/core_ext/module/concerning.rb index 97b0a382ce..bc22e3169b 100644 --- a/activesupport/lib/active_support/core_ext/module/concerning.rb +++ b/activesupport/lib/active_support/core_ext/module/concerning.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/concern" class Module diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 13f3894e6c..ccc33609b7 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "active_support/core_ext/regexp" diff --git a/activesupport/lib/active_support/core_ext/module/deprecation.rb b/activesupport/lib/active_support/core_ext/module/deprecation.rb index f3f2e7f5fc..98dfaad760 100644 --- a/activesupport/lib/active_support/core_ext/module/deprecation.rb +++ b/activesupport/lib/active_support/core_ext/module/deprecation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # deprecate :foo # deprecate bar: 'message' diff --git a/activesupport/lib/active_support/core_ext/module/introspection.rb b/activesupport/lib/active_support/core_ext/module/introspection.rb index ca20a6d4c5..1e1c3870f5 100644 --- a/activesupport/lib/active_support/core_ext/module/introspection.rb +++ b/activesupport/lib/active_support/core_ext/module/introspection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector" class Module diff --git a/activesupport/lib/active_support/core_ext/module/reachable.rb b/activesupport/lib/active_support/core_ext/module/reachable.rb index b89a38f26c..8cb09dd259 100644 --- a/activesupport/lib/active_support/core_ext/module/reachable.rb +++ b/activesupport/lib/active_support/core_ext/module/reachable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/anonymous" require "active_support/core_ext/string/inflections" diff --git a/activesupport/lib/active_support/core_ext/module/remove_method.rb b/activesupport/lib/active_support/core_ext/module/remove_method.rb index d5ec16d68a..c17808b244 100644 --- a/activesupport/lib/active_support/core_ext/module/remove_method.rb +++ b/activesupport/lib/active_support/core_ext/module/remove_method.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Removes the named method, if it exists. def remove_possible_method(method) diff --git a/activesupport/lib/active_support/core_ext/name_error.rb b/activesupport/lib/active_support/core_ext/name_error.rb index 6b447d772b..1bcb6ded3c 100644 --- a/activesupport/lib/active_support/core_ext/name_error.rb +++ b/activesupport/lib/active_support/core_ext/name_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class NameError # Extract the name of the missing constant from the exception message. # diff --git a/activesupport/lib/active_support/core_ext/numeric.rb b/activesupport/lib/active_support/core_ext/numeric.rb index 6062f9e3a8..402e9d4323 100644 --- a/activesupport/lib/active_support/core_ext/numeric.rb +++ b/activesupport/lib/active_support/core_ext/numeric.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/numeric/bytes" require "active_support/core_ext/numeric/time" require "active_support/core_ext/numeric/inquiry" diff --git a/activesupport/lib/active_support/core_ext/numeric/bytes.rb b/activesupport/lib/active_support/core_ext/numeric/bytes.rb index dfbca32474..23e1e39dd8 100644 --- a/activesupport/lib/active_support/core_ext/numeric/bytes.rb +++ b/activesupport/lib/active_support/core_ext/numeric/bytes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Numeric KILOBYTE = 1024 MEGABYTE = KILOBYTE * 1024 diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb index 4f6621693e..bedfe5ce32 100644 --- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb +++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/big_decimal/conversions" require "active_support/number_helper" require "active_support/core_ext/module/deprecation" diff --git a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb index ec79701189..baccf87848 100644 --- a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3 class Numeric # Returns true if the number is positive. diff --git a/activesupport/lib/active_support/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb index 2e6c70d418..95f73fb336 100644 --- a/activesupport/lib/active_support/core_ext/numeric/time.rb +++ b/activesupport/lib/active_support/core_ext/numeric/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/core_ext/time/calculations" require "active_support/core_ext/time/acts_like" diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 58bbf78601..f3cd8b0898 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/acts_like" require "active_support/core_ext/object/blank" require "active_support/core_ext/object/duplicable" diff --git a/activesupport/lib/active_support/core_ext/object/acts_like.rb b/activesupport/lib/active_support/core_ext/object/acts_like.rb index 3912cc5ace..b856e1ba16 100644 --- a/activesupport/lib/active_support/core_ext/object/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/object/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # A duck-type assistant method. For example, Active Support extends Date # to define an acts_like_date? method, and extends Time to define diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index bdb50ee291..3ad4605235 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/regexp" class Object diff --git a/activesupport/lib/active_support/core_ext/object/conversions.rb b/activesupport/lib/active_support/core_ext/object/conversions.rb index 918ebcdc9f..2626d9ed29 100644 --- a/activesupport/lib/active_support/core_ext/object/conversions.rb +++ b/activesupport/lib/active_support/core_ext/object/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/to_param" require "active_support/core_ext/object/to_query" require "active_support/core_ext/array/conversions" diff --git a/activesupport/lib/active_support/core_ext/object/deep_dup.rb b/activesupport/lib/active_support/core_ext/object/deep_dup.rb index 5ac649e552..ce1f765448 100644 --- a/activesupport/lib/active_support/core_ext/object/deep_dup.rb +++ b/activesupport/lib/active_support/core_ext/object/deep_dup.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/duplicable" class Object diff --git a/activesupport/lib/active_support/core_ext/object/duplicable.rb b/activesupport/lib/active_support/core_ext/object/duplicable.rb index b028df97ee..0838b1fb70 100644 --- a/activesupport/lib/active_support/core_ext/object/duplicable.rb +++ b/activesupport/lib/active_support/core_ext/object/duplicable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Most objects are cloneable, but not all. For example you can't dup methods: # diff --git a/activesupport/lib/active_support/core_ext/object/inclusion.rb b/activesupport/lib/active_support/core_ext/object/inclusion.rb index 98bf820d36..525ddcb575 100644 --- a/activesupport/lib/active_support/core_ext/object/inclusion.rb +++ b/activesupport/lib/active_support/core_ext/object/inclusion.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # Returns true if this object is included in the argument. Argument must be # any object which responds to +#include?+. Usage: diff --git a/activesupport/lib/active_support/core_ext/object/instance_variables.rb b/activesupport/lib/active_support/core_ext/object/instance_variables.rb index 593a7a4940..0a06125210 100644 --- a/activesupport/lib/active_support/core_ext/object/instance_variables.rb +++ b/activesupport/lib/active_support/core_ext/object/instance_variables.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Object # Returns a hash with string keys that maps instance variable names without "@" to their # corresponding values. diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 1c4d181443..87e5cdce0d 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Hack to load json gem first so we can overwrite its to_json. require "json" require "bigdecimal" diff --git a/activesupport/lib/active_support/core_ext/object/to_param.rb b/activesupport/lib/active_support/core_ext/object/to_param.rb index 5eeaf03163..58e60b5d4e 100644 --- a/activesupport/lib/active_support/core_ext/object/to_param.rb +++ b/activesupport/lib/active_support/core_ext/object/to_param.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "active_support/core_ext/object/to_query" diff --git a/activesupport/lib/active_support/core_ext/object/to_query.rb b/activesupport/lib/active_support/core_ext/object/to_query.rb index a3a3abacbb..f85e0eaa6f 100644 --- a/activesupport/lib/active_support/core_ext/object/to_query.rb +++ b/activesupport/lib/active_support/core_ext/object/to_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" class Object diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index b2be619b2d..952fba4541 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "delegate" module ActiveSupport diff --git a/activesupport/lib/active_support/core_ext/object/with_options.rb b/activesupport/lib/active_support/core_ext/object/with_options.rb index 3a44e08630..bc3075b5f1 100644 --- a/activesupport/lib/active_support/core_ext/object/with_options.rb +++ b/activesupport/lib/active_support/core_ext/object/with_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/option_merger" class Object diff --git a/activesupport/lib/active_support/core_ext/range.rb b/activesupport/lib/active_support/core_ext/range.rb index 3190e3ff76..9d84cbcec2 100644 --- a/activesupport/lib/active_support/core_ext/range.rb +++ b/activesupport/lib/active_support/core_ext/range.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/range/conversions" require "active_support/core_ext/range/include_range" require "active_support/core_ext/range/overlaps" diff --git a/activesupport/lib/active_support/core_ext/range/conversions.rb b/activesupport/lib/active_support/core_ext/range/conversions.rb index 69ea046cb6..5038a15cdf 100644 --- a/activesupport/lib/active_support/core_ext/range/conversions.rb +++ b/activesupport/lib/active_support/core_ext/range/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport::RangeWithFormat RANGE_FORMATS = { db: Proc.new { |start, stop| "BETWEEN '#{start.to_s(:db)}' AND '#{stop.to_s(:db)}'" } diff --git a/activesupport/lib/active_support/core_ext/range/each.rb b/activesupport/lib/active_support/core_ext/range/each.rb index dc6dad5ced..aeea8c867b 100644 --- a/activesupport/lib/active_support/core_ext/range/each.rb +++ b/activesupport/lib/active_support/core_ext/range/each.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module EachTimeWithZone #:nodoc: def each(&block) diff --git a/activesupport/lib/active_support/core_ext/range/include_range.rb b/activesupport/lib/active_support/core_ext/range/include_range.rb index c69e1e3fb9..d307750a23 100644 --- a/activesupport/lib/active_support/core_ext/range/include_range.rb +++ b/activesupport/lib/active_support/core_ext/range/include_range.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActiveSupport module IncludeWithRange #:nodoc: # Extends the default Range#include? to support range comparisons. diff --git a/activesupport/lib/active_support/core_ext/range/overlaps.rb b/activesupport/lib/active_support/core_ext/range/overlaps.rb index 603657c180..ecdfbd803b 100644 --- a/activesupport/lib/active_support/core_ext/range/overlaps.rb +++ b/activesupport/lib/active_support/core_ext/range/overlaps.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Range # Compare two ranges and see if they overlap each other # (1..5).overlaps?(4..6) # => true diff --git a/activesupport/lib/active_support/core_ext/regexp.rb b/activesupport/lib/active_support/core_ext/regexp.rb index d77d01bf42..23b337ba67 100644 --- a/activesupport/lib/active_support/core_ext/regexp.rb +++ b/activesupport/lib/active_support/core_ext/regexp.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Regexp #:nodoc: def multiline? options & MULTILINE == MULTILINE diff --git a/activesupport/lib/active_support/core_ext/securerandom.rb b/activesupport/lib/active_support/core_ext/securerandom.rb index a57685bea1..033ac356bd 100644 --- a/activesupport/lib/active_support/core_ext/securerandom.rb +++ b/activesupport/lib/active_support/core_ext/securerandom.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "securerandom" module SecureRandom diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb index 4cb3200875..cfac17f810 100644 --- a/activesupport/lib/active_support/core_ext/string.rb +++ b/activesupport/lib/active_support/core_ext/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/conversions" require "active_support/core_ext/string/filters" require "active_support/core_ext/string/multibyte" diff --git a/activesupport/lib/active_support/core_ext/string/access.rb b/activesupport/lib/active_support/core_ext/string/access.rb index 6133826f37..11f4bf8052 100644 --- a/activesupport/lib/active_support/core_ext/string/access.rb +++ b/activesupport/lib/active_support/core_ext/string/access.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # If you pass a single integer, returns a substring of one character at that # position. The first character of the string is at position 0, the next at diff --git a/activesupport/lib/active_support/core_ext/string/behavior.rb b/activesupport/lib/active_support/core_ext/string/behavior.rb index 710f1f4670..e63888991d 100644 --- a/activesupport/lib/active_support/core_ext/string/behavior.rb +++ b/activesupport/lib/active_support/core_ext/string/behavior.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. def acts_like_string? diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 221b4969cc..79668312c5 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "active_support/core_ext/time/calculations" diff --git a/activesupport/lib/active_support/core_ext/string/exclude.rb b/activesupport/lib/active_support/core_ext/string/exclude.rb index 0ac684f6ee..2893a6eeed 100644 --- a/activesupport/lib/active_support/core_ext/string/exclude.rb +++ b/activesupport/lib/active_support/core_ext/string/exclude.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # The inverse of String#include?. Returns true if the string # does not include the other string. diff --git a/activesupport/lib/active_support/core_ext/string/filters.rb b/activesupport/lib/active_support/core_ext/string/filters.rb index a9ec2eb842..e05cf024f6 100644 --- a/activesupport/lib/active_support/core_ext/string/filters.rb +++ b/activesupport/lib/active_support/core_ext/string/filters.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Returns the string, first removing all whitespace on both ends of # the string, and then changing remaining consecutive whitespace diff --git a/activesupport/lib/active_support/core_ext/string/indent.rb b/activesupport/lib/active_support/core_ext/string/indent.rb index d7b58301d3..a38198a8e6 100644 --- a/activesupport/lib/active_support/core_ext/string/indent.rb +++ b/activesupport/lib/active_support/core_ext/string/indent.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Same as +indent+, except it indents the receiver in-place. # diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index b27cfe53f4..63bb52b2da 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" require "active_support/inflector/transliterate" diff --git a/activesupport/lib/active_support/core_ext/string/inquiry.rb b/activesupport/lib/active_support/core_ext/string/inquiry.rb index c95d83beae..874efc6ae3 100644 --- a/activesupport/lib/active_support/core_ext/string/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/string/inquiry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/string_inquirer" class String diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb index 1c73182259..aee0bb4bf3 100644 --- a/activesupport/lib/active_support/core_ext/string/multibyte.rb +++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/multibyte" class String diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index 94ce3f6a61..c26f1edc88 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erb" require "active_support/core_ext/kernel/singleton_class" require "active_support/multibyte/unicode" diff --git a/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb b/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb index 641acf62d0..f072fbf7d7 100644 --- a/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +++ b/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String alias_method :starts_with?, :start_with? alias_method :ends_with?, :end_with? diff --git a/activesupport/lib/active_support/core_ext/string/strip.rb b/activesupport/lib/active_support/core_ext/string/strip.rb index bb62e6c0ba..979b6bd767 100644 --- a/activesupport/lib/active_support/core_ext/string/strip.rb +++ b/activesupport/lib/active_support/core_ext/string/strip.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class String # Strips indentation in heredocs. # diff --git a/activesupport/lib/active_support/core_ext/string/zones.rb b/activesupport/lib/active_support/core_ext/string/zones.rb index de5a28e4f7..a327bdc782 100644 --- a/activesupport/lib/active_support/core_ext/string/zones.rb +++ b/activesupport/lib/active_support/core_ext/string/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/conversions" require "active_support/core_ext/time/zones" diff --git a/activesupport/lib/active_support/core_ext/time.rb b/activesupport/lib/active_support/core_ext/time.rb index b1ae4a45d9..92f5cdde9f 100644 --- a/activesupport/lib/active_support/core_ext/time.rb +++ b/activesupport/lib/active_support/core_ext/time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/time/acts_like" require "active_support/core_ext/time/calculations" require "active_support/core_ext/time/compatibility" diff --git a/activesupport/lib/active_support/core_ext/time/acts_like.rb b/activesupport/lib/active_support/core_ext/time/acts_like.rb index cf4b2539c5..fb81cd41af 100644 --- a/activesupport/lib/active_support/core_ext/time/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/time/acts_like.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/acts_like" class Time diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index d3f23f4663..011291f693 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/duration" require "active_support/core_ext/time/conversions" require "active_support/time_with_zone" diff --git a/activesupport/lib/active_support/core_ext/time/compatibility.rb b/activesupport/lib/active_support/core_ext/time/compatibility.rb index 45e86b77ce..9acd18d012 100644 --- a/activesupport/lib/active_support/core_ext/time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/time/compatibility.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/date_and_time/compatibility" require "active_support/core_ext/module/remove_method" diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index 595bda6b4f..e07bc5a93a 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/inflector/methods" require "active_support/values/time_zone" diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb index 87b5ad903a..93e57ae4f2 100644 --- a/activesupport/lib/active_support/core_ext/time/zones.rb +++ b/activesupport/lib/active_support/core_ext/time/zones.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/time_with_zone" require "active_support/core_ext/time/acts_like" require "active_support/core_ext/date_and_time/zones" diff --git a/activesupport/lib/active_support/core_ext/uri.rb b/activesupport/lib/active_support/core_ext/uri.rb index 342a5fcd52..f93dbdf2cd 100644 --- a/activesupport/lib/active_support/core_ext/uri.rb +++ b/activesupport/lib/active_support/core_ext/uri.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "uri" str = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E" # Ni-ho-nn-go in UTF-8, means Japanese. parser = URI::Parser.new -- cgit v1.2.3