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/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 + 7 files changed, 7 insertions(+) (limited to 'activesupport/lib/active_support/core_ext/array') 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). # -- cgit v1.2.3