Project

General

Profile

Actions

Feature #6973

open

Add an #integral? method to Numeric to test for whole-number values

Added by regularfry (Alex Young) about 12 years ago. Updated almost 7 years ago.

Status:
Assigned
Target version:
-
[ruby-core:47409]

Description

Numeric#integer? checks whether an instance is an Integer. It is often useful to check whether the value of a non-Integer variable is actually a whole number, and the #integer? method doesn't help here.

This patch adds Numeric#integral?, which performs this check.


Files

integral.patch (2.43 KB) integral.patch regularfry (Alex Young), 09/04/2012 06:03 AM

Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #5310: Integral objectsAssignedmrkn (Kenta Murata)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0