summaryrefslogtreecommitdiffhomepage
path: root/test/assert.rb
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-05 09:09:50 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-05 09:09:50 +0900
commit501f7f6027b99416b94f093bb30691c5ae43d7d0 (patch)
tree825ecc404bafcd85eaa6562c303f468d06b3ccbf /test/assert.rb
parent114168a551ffe4c429f9eeb2b2ccc09471b403a5 (diff)
downloadmruby-501f7f6027b99416b94f093bb30691c5ae43d7d0.tar.gz
mruby-501f7f6027b99416b94f093bb30691c5ae43d7d0.zip
stop introducing Math::TORELANCE
Diffstat (limited to 'test/assert.rb')
-rw-r--r--test/assert.rb4
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
-