clbustos/Rserve-Ruby-client — pull request #9 by nessche (2012-10-30 15:37:05+00:00)
Title: Incorrect Handling of infinite values

When inspecting the content of an array for NaN/NA values, the code in `Double.na?` attempts a conversion to integer. This leads to an exception if the float value to be converted is an infinite one. I added an extra check to the `na?` code to verify that the float is finite before trying to convert it to an integer.

I also added an `infinite?` class method to Double to be used when converting floats to integer: when the float is infinite and it must be converted to a in integer, it will result in an NA value.

I also added specs to verify that the behaviour is the desired one.