From 748325b80de254374a5a71e2e07a2a70d7ea9318 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 13 Jan 2015 12:07:04 +0000 Subject: 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 --- compar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compar.c b/compar.c index 81dff38f49..3d0a3e81dc 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 { -- cgit v1.2.3