diff options
Diffstat (limited to 'test/assert.rb')
| -rw-r--r-- | test/assert.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/assert.rb b/test/assert.rb index 239730cb9..5cca59187 100644 --- a/test/assert.rb +++ b/test/assert.rb @@ -74,12 +74,12 @@ end # Performs fuzzy check for equality on methods returning floats # on the basis of the Math::TOLERANCE constant. def check_float(a, b) + tolerance = 1e-12 a = a.to_f b = b.to_f if a.finite? and b.finite? - (a-b).abs < Math::TOLERANCE + (a-b).abs < tolerance else true end end - |
