diff options
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -164,8 +164,9 @@ rb_check_type(x, t) int t; { struct types *type = builtin_types; + int tt = TYPE(x); - if (TYPE(x)!=(t)) { + if (tt != t) { while (type->type >= 0) { if (type->type == t) { char *etype; @@ -173,6 +174,9 @@ rb_check_type(x, t) if (NIL_P(x)) { etype = "nil"; } + else if (FIXNUM_P(x)) { + etype = "Fixnum"; + } else if (rb_special_const_p(x)) { etype = RSTRING(obj_as_string(x))->ptr; } |