Checking if a Float is equivalent to an integer value in Ruby September 27, 2023 by Tarik You mod the value with 1, and check if the value equals 0. if y % 1 == 0