summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-13 12:07:04 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-13 12:07:04 (GMT)
commit748325b80de254374a5a71e2e07a2a70d7ea9318 (patch)
treeac54c64c243dedaf99cca962d81bd7942fb7c7a6 /compar.c
parent79cd3c375711fb835d190d9e51a8de841f260075 (diff)
compar.c: fix message
* compar.c (rb_cmperr): show float values in the error message always, not only flonum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compar.c b/compar.c
index 81dff38..3d0a3e8 100644
--- a/compar.c
+++ b/compar.c
@@ -20,7 +20,7 @@ rb_cmperr(VALUE x, VALUE y)
{
VALUE classname;
- if (SPECIAL_CONST_P(y)) {
+ if (SPECIAL_CONST_P(y) || BUILTIN_TYPE(y) == T_FLOAT) {
classname = rb_inspect(y);
}
else {