From b552b5edaffe5dae183ece4d8475a0e7005da6c7 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sat, 8 Oct 2016 10:50:36 +1030 Subject: [PATCH] Merge pull request #26732 from matthewd/fixnum-warning Fixnum and Bignum are deprecated in Ruby trunk --- activejob/lib/active_job/arguments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index a5c749e..e809bdd 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -34,8 +34,8 @@ class SerializationError < ArgumentError; end module Arguments extend self # :nodoc: - # Calls #uniq since Integer, Fixnum, and Bignum are all the same class on Ruby 2.4+ - TYPE_WHITELIST = [ NilClass, String, Integer, Fixnum, Bignum, Float, BigDecimal, TrueClass, FalseClass ].uniq + TYPE_WHITELIST = [ NilClass, String, Integer, Float, BigDecimal, TrueClass, FalseClass ] + TYPE_WHITELIST.push(Fixnum, Bignum) unless 1.class == Integer # Serializes a set of arguments. Whitelisted types are returned # as-is. Arrays/Hashes are serialized element by element.