[前][次][番号順一覧][スレッド一覧]

ruby-changes:31590

From: zzak <ko1@a...>
Date: Wed, 13 Nov 2013 19:23:19 +0900 (JST)
Subject: [ruby-changes:31590] zzak:r43669 (trunk): * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required

zzak	2013-11-13 19:23:14 +0900 (Wed, 13 Nov 2013)

  New Revision: 43669

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43669

  Log:
    * 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

  Modified files:
    trunk/ChangeLog
    trunk/ext/bigdecimal/lib/bigdecimal/util.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43668)
+++ ChangeLog	(revision 43669)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov 13 19:21:36 2013  Zachary Scott  <e@z...>
+
+	* 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@z...>
 
 	* ext/digest/*: [DOC] Fix several typos and broken http links.
Index: ext/bigdecimal/lib/bigdecimal/util.rb
===================================================================
--- ext/bigdecimal/lib/bigdecimal/util.rb	(revision 43668)
+++ ext/bigdecimal/lib/bigdecimal/util.rb	(revision 43669)
@@ -105,10 +105,14 @@ end https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/util.rb#L105
 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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]