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

ruby-changes:34519

From: nobu <ko1@a...>
Date: Sat, 28 Jun 2014 20:29:21 +0900 (JST)
Subject: [ruby-changes:34519] nobu:r46600 (trunk): bigdecimal/math.rb: error message in BigMath#PI

nobu	2014-06-28 20:29:11 +0900 (Sat, 28 Jun 2014)

  New Revision: 46600

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

  Log:
    bigdecimal/math.rb: error message in BigMath#PI
    
    * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#PI): change error
      message about zero or negative precision for clarity and
      consistency with other methods.  [GH-644]

  Modified files:
    trunk/ChangeLog
    trunk/ext/bigdecimal/lib/bigdecimal/math.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46599)
+++ ChangeLog	(revision 46600)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun 28 20:29:03 2014  Simon Baird  <simon.baird@g...>
+
+	* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#PI): change error
+	  message about zero or negative precision for clarity and
+	  consistency with other methods.  [GH-644]
+
 Sat Jun 28 15:32:57 2014  Tanaka Akira  <akr@f...>
 
 	* lib/webrick/utils.rb (create_listeners): Close socket objects.
Index: ext/bigdecimal/lib/bigdecimal/math.rb
===================================================================
--- ext/bigdecimal/lib/bigdecimal/math.rb	(revision 46599)
+++ ext/bigdecimal/lib/bigdecimal/math.rb	(revision 46600)
@@ -180,7 +180,7 @@ module BigMath https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/math.rb#L180
   #   #=> "0.3141592653589793238462643388813853786957412E1"
   #
   def PI(prec)
-    raise ArgumentError, "Zero or negative argument for PI" if prec <= 0
+    raise ArgumentError, "Zero or negative precision for PI" if prec <= 0
     n      = prec + BigDecimal.double_fig
     zero   = BigDecimal("0")
     one    = BigDecimal("1")

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

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