Closed mike-burns closed 7 years ago
We can use Integer
instead of Fixnum
and all will work as desired.
~% ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
~% irb
irb(main):001:0> 1.is_a?(Integer)
=> true
irb(main):002:0> 1.class
=> Fixnum
~% ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
~% irb
irb(main):001:0> 1.is_a?(Integer)
=> true
irb(main):002:0> 1.class
=> Integer
Verified all the way back to 2.0.0
I saw this yesterday. Thought it was Rails' fault.
The
Fixnum
constant is deprecated in Ruby 2.4, to be replaced withInteger
. This causes a warning to be printed:Let's find a way to silence that warning.