Neither behavior demonstrated above is "incorrect". What is incorrect
is both the expectation that

ruby1.9 -v -e 'p 5.51'

will produce

5.51

*and* the expectation that it will produce

5.5099999999999998

The *correct* expectation is that it will produce a result within plus
or minus some small machine-dependent value of the input, 5.51.
Typically, this small value is on the order of 10 **  -15 for most
64-bit IEEE-format arithmetic.
-- 
M. Edward (Ed) Borasky
http://www.linkedin.com/in/edborasky

I've never met a happy clam. In fact, most of them were pretty steamed.