rails / arel

A Relational Algebra
2.06k stars 390 forks source link

Support for unified Integer class in Ruby 2.4+ #439

Closed koic closed 8 years ago

koic commented 8 years ago

Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005

Ruby ~2.3 1234.class is Fixnum and 123456789012345678901234567890.class is Bignum. Ruby 2.4+ 1234.class is Integer and 123456789012345678901234567890.class is Integer.

So what we should do is defining visit_Integer method to visitors.

Backport of https://github.com/rails/arel/commit/dc85a6e9c74942945ad696f5da4d82490a85b865

vipulnsward commented 8 years ago

LGTM