On Fri, May 13, 2011 at 11:26:29PM -0500, Jack Christensen wrote: > On 5/13/2011 8:14 AM, byrnejb wrote: > > > >On Mar 30, 5:23 pm, Michael Koziarski<[email protected]> wrote: > >>As Fred mentions later in the thread your issue here is twofold. One > >>is that Rails isn't correctly understanding 'infinity', that's > >>obviously postgresql specific and has no parallel in ruby itself (as > >>you said). That'll never be fixed. > >> > >Actually, it turn out that 'infinity' is supported in Ruby. > >Apparently infinity can be represented by assigning the value obtained > >by dividing a float by zero. > > > >$ irb > >ruby-1.8.7-p334 :001> infinity = 1.0/0 > > => Infinity > >ruby-1.8.7-p334 :002> ninfinity = -1.0/0 > > => -Infinity > >ruby-1.8.7-p334 :003> > > > >So, I guess this now qualifies as a bug in the Ruby pg adapter gem. > > > FWIW - you don't have to divide by zero to get infinity. You can use > Float::INFINITY.
This constant isn't available in 1.8. /play trombone -- Aaron Patterson http://tenderlovemaking.com/
pgpcHuptmxKxy.pgp
Description: PGP signature
