Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix PG warnings. #14248

Merged
merged 1 commit into from

2 participants

@vipulnsward

Fix warnings due to:

  • unused variable in PG Adapter.
  • Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
@vipulnsward vipulnsward Fix warnings due to:
- unused variable in PG Adapter.
- Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
398b4de
@senny senny merged commit 9291d5a into rails:master

1 check passed

Details default The Travis CI build passed
@senny
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2014
  1. @vipulnsward

    Fix warnings due to:

    vipulnsward authored
    - unused variable in PG Adapter.
    - Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
This page is out of date. Refresh to see the latest.
View
2  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -822,7 +822,7 @@ def initialize_type_map(type_map)
# 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
View
2  activerecord/test/cases/adapters/postgresql/range_test.rb
@@ -156,7 +156,7 @@ def test_custom_range_values
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
Something went wrong with that request. Please try again.