mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
+precision+ argument for Rational#to_d [Bug #8958] -This line, and those below, will be ignored-- M ChangeLog M ext/bigdecimal/lib/bigdecimal/util.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4c1e390fa8
commit
a369b7f7cb
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 13 19:21:36 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
|
||||
+precision+ argument for Rational#to_d [Bug #8958]
|
||||
|
||||
Wed Nov 13 19:02:05 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* ext/digest/*: [DOC] Fix several typos and broken http links.
|
||||
|
|
|
@ -105,10 +105,14 @@ end
|
|||
class Rational < Numeric
|
||||
# call-seq:
|
||||
# r.to_d -> bigdecimal
|
||||
# r.to_d(sig) -> bigdecimal
|
||||
# r.to_d(precision) -> bigdecimal
|
||||
#
|
||||
# Converts a Rational to a BigDecimal. Takes an optional parameter +sig+ to
|
||||
# limit the amount of significant digits.
|
||||
# Converts a Rational to a BigDecimal.
|
||||
#
|
||||
# The required +precision+ parameter is used to determine the amount of
|
||||
# significant digits for the result. See BigDecimal#div for more information,
|
||||
# as it is used along with the #denominator and the +precision+ for
|
||||
# parameters.
|
||||
#
|
||||
# r = (22/7.0).to_r
|
||||
# # => (7077085128725065/2251799813685248)
|
||||
|
|
Loading…
Add table
Reference in a new issue