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