summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-05 06:37:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-05 06:37:50 +0000
commitf70ffbee2120cbbb8c6b0a15dfc693a69ac0d7d4 (patch)
tree2070b335aaddd33fd915c14557c82ba06ac86df9 /error.c
parent369124b0ec6aa0d58ea628339713444c559bfa5f (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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/error.c b/error.c
index 1cdf4692f0..cb56c4e163 100644
--- a/error.c
+++ b/error.c
@@ -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;
}