mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #34431 from albertoalmagro/make-permitted-types-private
Make `PERMITTED_TYPES` private
This commit is contained in:
commit
82f2e9741f
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
@ -49,6 +46,8 @@ module ActiveJob
|
|||
|
||||
private
|
||||
|
||||
# :nodoc:
|
||||
PERMITTED_TYPES = [ NilClass, String, Integer, Float, BigDecimal, TrueClass, FalseClass ]
|
||||
# :nodoc:
|
||||
GLOBALID_KEY = "_aj_globalid"
|
||||
# :nodoc:
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue