Skip to content
Permalink
Browse files

more passing tests

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 4, 2013
1 parent ddbf11d commit eee3dbe668edd7952a69175529ad9e0cf39ec168

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -6,7 +6,7 @@
from rpython.rlib.rarithmetic import ovfcheck_float_to_int
from rpython.rlib.rbigint import rbigint
from rpython.rlib.rfloat import (formatd, DTSF_ADD_DOT_0, DTSF_STR_PRECISION,
NAN, INFINITY)
NAN, INFINITY, isfinite)

from topaz.error import RubyError
from topaz.module import ClassDef
@@ -233,6 +233,10 @@ def method_infinity(self, space):
return space.newint(int(math.copysign(1, self.floatvalue)))
return space.w_nil

@classdef.method("finite?")
def method_finite(self, space):
return space.newbool(isfinite(self.floatvalue))

@classdef.method("nan?")
def method_nan(self, space):
return space.newbool(math.isnan(self.floatvalue))

0 comments on commit eee3dbe

Please sign in to comment.