summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-30 02:58:36 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-30 02:58:36 +0000
commitee1519777bbd4f57463e23b267653f8f37d7afaa (patch)
treeeb05966a8c66192512e534bc56cd8868e0362011 /compar.c
parent61f3baeef9003de4651419fa27ee97c18c8ce170 (diff)
merge revision(s) 49224,49225,49234,49235: [Backport #10711]
* numeric.c (bit_coerce): use original value for error message [ruby-core:67405] [Bug #10711] * test/ruby/test_numeric.rb (test_coerce): check error message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51067 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 2f4db291a4..0cfce8f4ed 100644
--- a/compar.c
+++ b/compar.c
@@ -20,7 +20,7 @@ rb_cmperr(VALUE x, VALUE y)
{
const char *classname;
- if (SPECIAL_CONST_P(y)) {
+ if (SPECIAL_CONST_P(y) || BUILTIN_TYPE(y) == T_FLOAT) {
y = rb_inspect(y);
classname = StringValuePtr(y);
}