Ticket #8041: make_decimals_decimal.diff
| File make_decimals_decimal.diff, 2.1 kB (added by wycats, 1 year ago) |
|---|
-
activerecord/test/base_test.rb
old new 1101 1101 # As with migration_test.rb, we should make world_population >= 2**62 1102 1102 # to cover 64-bit platforms and test it is a Bignum, but the main thing 1103 1103 # is that it's an Integer. 1104 assert_kind_of Integer, m1.world_population1104 assert_kind_of BigDecimal, m1.world_population 1105 1105 assert_equal 6000000000, m1.world_population 1106 1106 1107 assert_kind_of Fixnum, m1.my_house_population1107 assert_kind_of BigDecimal, m1.my_house_population 1108 1108 assert_equal 3, m1.my_house_population 1109 1109 1110 1110 assert_kind_of BigDecimal, m1.bank_balance -
activerecord/test/migration_test.rb
old new 547 547 548 548 # TODO: set world_population >= 2**62 to cover 64-bit platforms and test 549 549 # is_a?(Bignum) 550 assert_kind_of Integer, b.world_population550 assert_kind_of BigDecimal, b.world_population 551 551 assert_equal 6000000000, b.world_population 552 assert_kind_of Fixnum, b.my_house_population552 assert_kind_of BigDecimal, b.my_house_population 553 553 assert_equal 3, b.my_house_population 554 554 assert_kind_of BigDecimal, b.bank_balance 555 555 assert_equal BigDecimal("1586.43"), b.bank_balance -
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
old new 184 184 when /float|double/i 185 185 :float 186 186 when /decimal|numeric|number/i 187 extract_scale(field_type) == 0 ? :integer ::decimal187 :decimal 188 188 when /datetime/i 189 189 :datetime 190 190 when /timestamp/i