summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/assert.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/assert.rb b/test/assert.rb
index 9329638c9..89e820a00 100644
--- a/test/assert.rb
+++ b/test/assert.rb
@@ -81,7 +81,7 @@ 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
+ tolerance = Math::TOLERANCE
a = a.to_f
b = b.to_f
if a.finite? and b.finite?
@@ -90,4 +90,3 @@ def check_float(a, b)
true
end
end
-