summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 06:57:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 06:57:56 +0000
commit36585f17fb8deb2042c36842c68637b740565811 (patch)
tree911831920c055e9c601f38d06b353098666dfa70 /gc.c
parente5a15da7990e9bc98733b11cfae3180023e82ee3 (diff)
* gc.c (id2ref): skip ICLASS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 4b239b634a..9bbca22588 100644
--- a/gc.c
+++ b/gc.c
@@ -2069,7 +2069,8 @@ id2ref(VALUE obj, VALUE objid)
return ID2SYM(symid);
}
- if (!is_pointer_to_heap((void *)ptr) || BUILTIN_TYPE(ptr) >= T_VALUES) {
+ if (!is_pointer_to_heap((void *)ptr) ||
+ BUILTIN_TYPE(ptr) >= T_VALUES || BUILTIN_TYPE(ptr) == T_ICLASS) {
rb_raise(rb_eRangeError, "%p is not id value", p0);
}
if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {