summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-01 13:04:04 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-01 13:04:04 +0000
commita3e5a86596c8a34559361055911f724a2200d287 (patch)
tree9147a4da9226f945c134cb304806de4396c94c3c /ext/bigdecimal
parent2e6b5ece958d6bfb389d2b0cb9fedce0e733214f (diff)
* ext/bigdecimal/bigdecimal.c (BigDecimal_new),
test/bigdecimal/test_bigdecimal.rb: Fix exception message of BigDecimal constructor with a Float. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 8b3fef0..f58b640 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2354,7 +2354,9 @@ BigDecimal_new(int argc, VALUE *argv)
/* fall through */
case T_RATIONAL:
if (NIL_P(nFig)) {
- rb_raise(rb_eArgError, "can't omit precision for a Rational.");
+ rb_raise(rb_eArgError,
+ "can't omit precision for a %s.",
+ rb_class2name(CLASS_OF(iniValue)));
}
return GetVpValueWithPrec(iniValue, mf, 1);