aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2016-05-17 07:56:08 -0700
committerJeremy Daer <jeremydaer@gmail.com>2016-05-18 21:58:51 -0700
commit89e2f7e722e06f900bdb1c14db33073c90d7cdea (patch)
tree4803f5036f64c6c6fb9f6b5a0a5521c197ebd892 /activerecord/test/cases/migration_test.rb
parent1a4deb9664bbb9f69a8fd73d6da3ac0e8c4405b6 (diff)
downloadrails-89e2f7e722e06f900bdb1c14db33073c90d7cdea.tar.gz
rails-89e2f7e722e06f900bdb1c14db33073c90d7cdea.tar.bz2
rails-89e2f7e722e06f900bdb1c14db33073c90d7cdea.zip
Support for unified Integer class in Ruby 2.4+
Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005 * Forward compat with new unified Integer class in Ruby 2.4+. * Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3. * Drops needless Fixnum distinction in docs, preferring Integer.
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index a4b0de3f4e..6ad028d31b 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -180,7 +180,7 @@ class MigrationTest < ActiveRecord::TestCase
# is_a?(Bignum)
assert_kind_of Integer, b.world_population
assert_equal 6000000000, b.world_population
- assert_kind_of Fixnum, b.my_house_population
+ assert_kind_of Integer, b.my_house_population
assert_equal 3, b.my_house_population
assert_kind_of BigDecimal, b.bank_balance
assert_equal BigDecimal("1586.43"), b.bank_balance
@@ -204,7 +204,7 @@ class MigrationTest < ActiveRecord::TestCase
assert_in_delta BigDecimal("2.71828182845905"), b.value_of_e, 0.00000000000001
else
# - SQL standard is an integer
- assert_kind_of Fixnum, b.value_of_e
+ assert_kind_of Integer, b.value_of_e
assert_equal 2, b.value_of_e
end