petervandenabeele/relativity — pull request #2 by dunsmoreb (2012-03-01 01:50:07+00:00)
Title: Fix BigDecimal TypeError in Ruby 1.9.2.

In Ruby 1.9.2, BigDecimal raises a TypeError when you pass an Integer
(including Fixnum and Bignum) to it. To get around this behavior you
can pass the Integer interpolated in a string to BigDecimal.

This occurs in the relativity gem when initializing a new BigDecimal
instance. Specifically, when calculating the seconds from midnight.
As part of the calculation a new BigDecimal instance is created based
on the nanoseconds. As mentioned previously, the relevant fix was to
interpolate the variable when passing it to BigDecimal::new.