diff options
author | Alberto Almagro <albertoalmagro@gmail.com> | 2018-11-12 20:44:59 +0100 |
---|---|---|
committer | Alberto Almagro <albertoalmagro@gmail.com> | 2018-11-12 20:44:59 +0100 |
commit | 36ea629fae8fce2b478fde6dc9ebf980b6d676ea (patch) | |
tree | 46ed0eda45264170d666d9257c2d97d4f67a1d68 | |
parent | 1cbc6555f5eeaae32abaf7f35db807cbb3a3a9c9 (diff) | |
download | rails-36ea629fae8fce2b478fde6dc9ebf980b6d676ea.tar.gz rails-36ea629fae8fce2b478fde6dc9ebf980b6d676ea.tar.bz2 rails-36ea629fae8fce2b478fde6dc9ebf980b6d676ea.zip |
Make `PERMITTED_TYPES` private
The constant `PERMITTED_TYPES` is only used by the private method
`serialize_argument` and it already has the `# :nodoc:` annotation as
the other constants in the class.
Complements e899e22
-rw-r--r-- | activejob/lib/active_job/arguments.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index 38d5d0214e..ffc57dae84 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -26,9 +26,6 @@ module ActiveJob module Arguments extend self - # :nodoc: - PERMITTED_TYPES = [ NilClass, String, Integer, Float, BigDecimal, TrueClass, FalseClass ] - # Serializes a set of arguments. Intrinsic types that can safely be # serialized without mutation are returned as-is. Arrays/Hashes are # serialized element by element. All other types are serialized using @@ -50,6 +47,8 @@ module ActiveJob private # :nodoc: + PERMITTED_TYPES = [ NilClass, String, Integer, Float, BigDecimal, TrueClass, FalseClass ] + # :nodoc: GLOBALID_KEY = "_aj_globalid" # :nodoc: SYMBOL_KEYS_KEY = "_aj_symbol_keys" @@ -65,7 +64,7 @@ module ActiveJob OBJECT_SERIALIZER_KEY, OBJECT_SERIALIZER_KEY.to_sym, WITH_INDIFFERENT_ACCESS_KEY, WITH_INDIFFERENT_ACCESS_KEY.to_sym, ] - private_constant :RESERVED_KEYS, :GLOBALID_KEY, :SYMBOL_KEYS_KEY, :WITH_INDIFFERENT_ACCESS_KEY + private_constant :PERMITTED_TYPES, :RESERVED_KEYS, :GLOBALID_KEY, :SYMBOL_KEYS_KEY, :WITH_INDIFFERENT_ACCESS_KEY def serialize_argument(argument) case argument |