Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more
Numeric
Converts a Rational to a BigDecimal
# File bigdecimal/lib/bigdecimal/util.rb, line 46 def to_d(nFig=0) num = self.numerator.to_s if nFig<=0 nFig = BigDecimal.double_fig*2+1 end BigDecimal.new(num).div(self.denominator,nFig) end