From 72950568dde05bfe8a69ce4bbf6338fdebf3062f Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Sun, 9 Jul 2017 15:06:36 +0300 Subject: Use frozen-string-literal in ActiveSupport --- 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 + 9 files changed, 9 insertions(+) (limited to 'activesupport/lib/active_support/core_ext/hash') 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 713711e16a..193004608a 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_relative "../../xml_mini" require_relative "../../time" require_relative "../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 4b7fe34cc9..7727f0751e 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_relative "../../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. -- cgit v1.2.3