summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
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 {