If i have a float of 49.967 and I do .to_i it will chop it down to 49 which for my use of disk space analysis .967 is over 900mb of space that wont be accounted for in the displ
Try Float.round.
Float.round
irb(main):001:0> 5.44.round => 5 irb(main):002:0> 5.54.round => 6