diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-03-05 06:37:50 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-03-05 06:37:50 +0000 |
commit | f70ffbee2120cbbb8c6b0a15dfc693a69ac0d7d4 (patch) | |
tree | 2070b335aaddd33fd915c14557c82ba06ac86df9 /error.c | |
parent | 369124b0ec6aa0d58ea628339713444c559bfa5f (diff) |
block arg etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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; } |