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

ruby-changes:32235

From: nagachika <ko1@a...>
Date: Sat, 21 Dec 2013 14:55:29 +0900 (JST)
Subject: [ruby-changes:32235] nagachika:r44314 (ruby_2_0_0): merge revision(s) 43669, 43672, 43678: [Backport #8958]

nagachika	2013-12-21 14:55:08 +0900 (Sat, 21 Dec 2013)

  New Revision: 44314

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

  Log:
    merge revision(s) 43669,43672,43678: [Backport #8958]
    
    * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
      +precision+ argument for Rational#to_d [Bug #8958]
    
    * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required
    
    * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
      Rational#to_d without argument. [Bug #8958]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/ext/bigdecimal/lib/bigdecimal/util.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 44313)
+++ ruby_2_0_0/ChangeLog	(revision 44314)
@@ -1,3 +1,17 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sat Dec 21 14:54:37 2013  CHIKANAGA Tomoyuki  <nagachika@r...>
+
+	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
+	  Rational#to_d without argument. [Bug #8958]
+
+Sat Dec 21 14:54:37 2013  Zachary Scott  <e@z...>
+
+	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required
+
+Sat Dec 21 14:54:37 2013  Zachary Scott  <e@z...>
+
+	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
+	  +precision+ argument for Rational#to_d [Bug #8958]
+
 Sat Dec 21 03:46:14 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/date/date_strptime.c (date__strptime_internal): unset
Index: ruby_2_0_0/ext/bigdecimal/lib/bigdecimal/util.rb
===================================================================
--- ruby_2_0_0/ext/bigdecimal/lib/bigdecimal/util.rb	(revision 44313)
+++ ruby_2_0_0/ext/bigdecimal/lib/bigdecimal/util.rb	(revision 44314)
@@ -83,16 +83,17 @@ end https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/bigdecimal/lib/bigdecimal/util.rb#L83
 
 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)
-  #   r.to_d
-  #   # => #<BigDecimal:1a52bd8,'0.3142857142 8571427937 0154144999 105E1',45(63)>
   #   r.to_d(3)
   #   # => #<BigDecimal:1a44d08,'0.314E1',18(36)>
   def to_d(precision)
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 44313)
+++ ruby_2_0_0/version.h	(revision 44314)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-12-21"
-#define RUBY_PATCHLEVEL 360
+#define RUBY_PATCHLEVEL 361
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 12

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r43669,43672,43678


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

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