Closed amatsuda closed 7 years ago
Thanks! How does merging this affect Backburner on older versions of Ruby pre 2.4?
Uh, I'm sorry, I should have explained a little bit more. This may not be a big problem here, but since Ruby 2.4+ regards both Fixnum and Bignum as Integer, this patch actually introduces a slight incompatibility. See the following code that demonstrates how a very big number is treated.
p 1.is_a?(Fixnum) && 1.is_a?(Integer)
p (10 ** 20).is_a?(Fixnum) && (10 ** 20).is_a?(Integer)
fixnum_integer.rb:1: warning: constant ::Fixnum is deprecated true fixnum_integer.rb:2: warning: constant ::Fixnum is deprecated true
true false
So, when a very big number is given as pri
or ttr
, the behavior used to be different between Ruby versions, but that situation is fixed now. This is the only side effect of this patch.
Thanks!
Fixnum and Bignum has been unified into Integer, and so it warns since Ruby 2.4. see: http://www.a-k-r.org/pub/2016-09-08-rubykaigi-unified-integer.pdf