1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-01-13 12:07:04 +00:00
parent 79cd3c3757
commit 748325b80d

View file

@ -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 {