summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-28 11:29:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-28 11:29:11 +0000
commit38f013391d3ae9556008c37f95bdeb2b9da46de0 (patch)
tree68fa000bb9182a9a1d33655f988f1d4b95e02c3d
parent8b76d21f5562607ec66cb6033d02af1576d27e57 (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/bigdecimal/lib/bigdecimal/math.rb2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f0d4c794e4..de86a50f34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jun 28 20:29:03 2014 Simon Baird <simon.baird@gmail.com>
+
+ * 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@fsij.org>
* lib/webrick/utils.rb (create_listeners): Close socket objects.
diff --git a/ext/bigdecimal/lib/bigdecimal/math.rb b/ext/bigdecimal/lib/bigdecimal/math.rb
index 39fa79d493..4a4fcc2b06 100644
--- a/ext/bigdecimal/lib/bigdecimal/math.rb
+++ b/ext/bigdecimal/lib/bigdecimal/math.rb
@@ -180,7 +180,7 @@ module BigMath
# #=> "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")