Skip to content

Commit 748325b

Browse files
committed
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
1 parent 79cd3c3 commit 748325b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ rb_cmperr(VALUE x, VALUE y)
2020
{
2121
VALUE classname;
2222

23-
if (SPECIAL_CONST_P(y)) {
23+
if (SPECIAL_CONST_P(y) || BUILTIN_TYPE(y) == T_FLOAT) {
2424
classname = rb_inspect(y);
2525
}
2626
else {

0 commit comments

Comments
 (0)