diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-28 11:29:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-28 11:29:11 +0000 |
commit | 38f013391d3ae9556008c37f95bdeb2b9da46de0 (patch) | |
tree | 68fa000bb9182a9a1d33655f988f1d4b95e02c3d /ext/bigdecimal/lib/bigdecimal/math.rb | |
parent | 8b76d21f5562607ec66cb6033d02af1576d27e57 (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
Diffstat (limited to 'ext/bigdecimal/lib/bigdecimal/math.rb')
-rw-r--r-- | ext/bigdecimal/lib/bigdecimal/math.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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") |