Project

General

Profile

Actions

Feature #10261

closed

[PATCH] Fix improper test method

Added by gogotanaka (Kazuki Tanaka) about 10 years ago. Updated about 10 years ago.

Status:
Closed
Assignee:
-
Target version:
[ruby-core:65117]

Description

Right now, a test method TestMath#assert_infinity implement like below,

def assert_infinity(a, *rest)
  rest = ["not infinity: #{a.inspect}"] if rest.empty?
  assert_not_predicate(a, :finite?, *rest)
end

I suppose this is intended to check Float::INFINITY or not,

but Float#finite returns True if the value is not NaN or ±Float::INFINITY.

So I fixed it to check Float::INFINITY or not.

If you have different aim for that, please feel free to tell me.

Thank you. gogo.


Files

test_math_ Fix improper test method.PATCH (443 Bytes) test_math_ Fix improper test method.PATCH gogotanaka (Kazuki Tanaka), 09/18/2014 07:58 PM
Actions

Also available in: Atom PDF

Like0
Like0