calebhearth / formulaic

Simplify form filling with Capybara
MIT License
552 stars 29 forks source link

Uses deprecated Fixnum constant #61

Closed mike-burns closed 7 years ago

mike-burns commented 7 years ago

The Fixnum constant is deprecated in Ruby 2.4, to be replaced with Integer. This causes a warning to be printed:

/home/mike/.gem/ruby/2.4.0/gems/formulaic-0.3.0/lib/formulaic/form.rb:11: warning: constant ::Fixnum is deprecated

Let's find a way to silence that warning.

mike-burns commented 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
derekprior commented 7 years ago

Verified all the way back to 2.0.0

calebhearth commented 7 years ago

I saw this yesterday. Thought it was Rails' fault.