Float precision is not infinite. Depending on your use case, you need to be very careful.
« It’s 1$ for this delicious chocolate. »
« Perfect, I have 10 dimes. »
« Sorry, you don’t have enough! »
Ruby can address this problem thanks to Rational, which it handles natively.
« Ok, now you have enough. »
Link to Ruby documentation for Rational