Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #11976 from etehtsea/inf

[PG adapter] Use infinity const
  • Loading branch information...
commit 998d9c89e42d41f99b1970ce229cc4b818db3680 2 parents 042c86d + a01756c
@senny senny authored
View
4 activerecord/lib/active_record/connection_adapters/postgresql/cast.rb
@@ -17,8 +17,8 @@ def string_to_time(string)
return string unless String === string
case string
- when 'infinity'; 1.0 / 0.0
- when '-infinity'; -1.0 / 0.0
+ when 'infinity'; Float::INFINITY
+ when '-infinity'; -Float::INFINITY
when / BC$/
super("-" + string.sub(/ BC$/, ""))
else
Please sign in to comment.
Something went wrong with that request. Please try again.