Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use infinity const

  • Loading branch information...
commit a01756c33ed9e2fcb3724dbf607ba64c963b112f 1 parent 9208338
@etehtsea etehtsea 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

1 comment on commit a01756c

@tilsammans

Good catch.

Please sign in to comment.
Something went wrong with that request. Please try again.