diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-03-02 22:50:26 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-03-02 22:50:26 +0100 |
commit | 9291d5a067b3c3ea314dcf49fb45f6171f653b43 (patch) | |
tree | 09faf450c7b06c1b7e99d7edbe8cff2e7839560e /activerecord | |
parent | f60b5249194d71a5a7ad152332400af39543628f (diff) | |
parent | 398b4de011e5bbfd10408ed591e92f192cb37327 (diff) | |
download | rails-9291d5a067b3c3ea314dcf49fb45f6171f653b43.tar.gz rails-9291d5a067b3c3ea314dcf49fb45f6171f653b43.tar.bz2 rails-9291d5a067b3c3ea314dcf49fb45f6171f653b43.zip |
Merge pull request #14248 from vipulnsward/fix-pg-ar-warnings
Fix PG warnings.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/range_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index d1fb132b60..9f18fdd3e5 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -822,7 +822,7 @@ module ActiveRecord # populate range types ranges.find_all { |row| type_map.key? row['rngsubtype'].to_i }.each do |row| subtype = type_map[row['rngsubtype'].to_i] - range = OID::Range.new type_map[row['rngsubtype'].to_i] + range = OID::Range.new subtype type_map[row['oid'].to_i] = range end end diff --git a/activerecord/test/cases/adapters/postgresql/range_test.rb b/activerecord/test/cases/adapters/postgresql/range_test.rb index 306bb09a0d..4e84335e9b 100644 --- a/activerecord/test/cases/adapters/postgresql/range_test.rb +++ b/activerecord/test/cases/adapters/postgresql/range_test.rb @@ -156,7 +156,7 @@ _SQL assert_equal 0.5..0.7, @first_range.float_range assert_equal 0.5...0.7, @second_range.float_range assert_equal 0.5...Float::INFINITY, @third_range.float_range - assert_equal -Float::INFINITY...Float::INFINITY, @fourth_range.float_range + assert_equal (-Float::INFINITY...Float::INFINITY), @fourth_range.float_range assert_nil @empty_range.float_range end |