diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/bigdecimal/lib/bigdecimal/math.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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") |