aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorKevin Deisz <kevin.deisz@gmail.com>2018-08-24 16:16:41 -0400
committerKevin Deisz <kevin.deisz@gmail.com>2018-08-24 16:16:41 -0400
commit0efecd913c07104e8fba82d5044c1ad824af68d5 (patch)
tree077b4398346ab4b9906ef22ceb1bdf83eb1d64d3 /activejob
parentcac2bb7f44a6b8e240034d1de89a41fe0dd9f0ec (diff)
downloadrails-0efecd913c07104e8fba82d5044c1ad824af68d5.tar.gz
rails-0efecd913c07104e8fba82d5044c1ad824af68d5.tar.bz2
rails-0efecd913c07104e8fba82d5044c1ad824af68d5.zip
Convert remaining usage of whitelist and blacklist
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/arguments.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb
index 86bb0c5540..43897faf4c 100644
--- a/activejob/lib/active_job/arguments.rb
+++ b/activejob/lib/active_job/arguments.rb
@@ -24,16 +24,16 @@ module ActiveJob
module Arguments
extend self
# :nodoc:
- TYPE_WHITELIST = [ NilClass, String, Integer, Float, BigDecimal, TrueClass, FalseClass ]
+ PERMITTED_TYPES = [ NilClass, String, Integer, Float, BigDecimal, TrueClass, FalseClass ]
- # Serializes a set of arguments. Whitelisted types are returned
+ # Serializes a set of arguments. Permitted types are returned
# as-is. Arrays/Hashes are serialized element by element.
# All other types are serialized using GlobalID.
def serialize(arguments)
arguments.map { |argument| serialize_argument(argument) }
end
- # Deserializes a set of arguments. Whitelisted types are returned
+ # Deserializes a set of arguments. Permitted types are returned
# as-is. Arrays/Hashes are deserialized element by element.
# All other types are deserialized using GlobalID.
def deserialize(arguments)
@@ -64,7 +64,7 @@ module ActiveJob
def serialize_argument(argument)
case argument
- when *TYPE_WHITELIST
+ when *PERMITTED_TYPES
argument
when GlobalID::Identification
convert_to_global_id_hash(argument)
@@ -88,7 +88,7 @@ module ActiveJob
case argument
when String
GlobalID::Locator.locate(argument) || argument
- when *TYPE_WHITELIST
+ when *PERMITTED_TYPES
argument
when Array
argument.map { |arg| deserialize_argument(arg) }