summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-07 08:37:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-07 08:37:59 +0000
commit4d215cd9d3e0c4ea8ba802aa87773d6578c45a15 (patch)
tree0726d5ac3dbee381503921a9a6016c6dea786115 /util.c
parent73d2362580ad40c267419a31cc1fd1bf550760c8 (diff)
2000-03-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util.c b/util.c
index a48b420..24a2fe4 100644
--- a/util.c
+++ b/util.c
@@ -19,10 +19,6 @@
#define RUBY_NO_INLINE
#include "ruby.h"
-#ifdef USE_CWGUSI
-extern char* mktemp(char*);
-#endif
-
VALUE
rb_class_of(obj)
VALUE obj;
@@ -31,6 +27,7 @@ rb_class_of(obj)
if (obj == Qnil) return rb_cNilClass;
if (obj == Qfalse) return rb_cFalseClass;
if (obj == Qtrue) return rb_cTrueClass;
+ if (SYMBOL_P(obj)) return rb_cSymbol;
return RBASIC(obj)->klass;
}
@@ -43,6 +40,7 @@ rb_type(obj)
if (obj == Qnil) return T_NIL;
if (obj == Qfalse) return T_FALSE;
if (obj == Qtrue) return T_TRUE;
+ if (SYMBOL_P(obj)) return T_SYMBOL;
return BUILTIN_TYPE(obj);
}