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

ruby-changes:34938

From: mrkn <ko1@a...>
Date: Fri, 1 Aug 2014 07:36:28 +0900 (JST)
Subject: [ruby-changes:34938] mrkn:r47021 (trunk): * ext/bigdecimal/bigdecimal.c: [DOC] Add description of

mrkn	2014-08-01 07:36:16 +0900 (Fri, 01 Aug 2014)

  New Revision: 47021

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

  Log:
    * ext/bigdecimal/bigdecimal.c: [DOC] Add description of
      `BigDecimal.new` exceptions.  Patched by @joker1007 and
      @prathamesh-sonpatki [Fixes GH-690]
      https://github.com/ruby/ruby/pull/690

  Modified files:
    trunk/ChangeLog
    trunk/ext/bigdecimal/bigdecimal.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47020)
+++ ChangeLog	(revision 47021)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug 01 07:28:12 2014  Kenta Murata  <mrkn@m...>
+
+	* ext/bigdecimal/bigdecimal.c: [DOC] Add description of
+	  `BigDecimal.new` exceptions.  Patched by @joker1007 and
+	  @prathamesh-sonpatki [Fixes GH-690]
+	  https://github.com/ruby/ruby/pull/690
+
 Thu Jul 31 22:20:12 2014  Masaki Suketa <masaki.suketa@n...>
 
 	* ext/win32ole/win32ole.c: add WIN32OLE_RECORD#inspect.
Index: ext/bigdecimal/bigdecimal.c
===================================================================
--- ext/bigdecimal/bigdecimal.c	(revision 47020)
+++ ext/bigdecimal/bigdecimal.c	(revision 47021)
@@ -2463,6 +2463,19 @@ static Real *BigDecimal_new(int argc, VA https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.c#L2463
  *
  * The actual number of significant digits used in computation is usually
  * larger than the specified number.
+ *
+ * ==== Exceptions
+ *
+ * TypeError:: If the +initial+ type is neither Fixnum, Bignum, Float,
+ *             Rational, nor BigDecimal, this exception is raised.
+ *
+ * TypeError:: If the +digits+ is not a Fixnum, this exception is raised.
+ *
+ * ArgumentError:: If +initial+ is a Float, and the +digits+ is larger than
+ *                 Float::DIG + 1, this exception is raised.
+ *
+ * ArgumentError:: If the +initial+ is a Float or Rational, and the +digits+
+ *                 value is omitted, this exception is raised.
  */
 static VALUE
 BigDecimal_initialize(int argc, VALUE *argv, VALUE self)

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

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