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