aboutsummaryrefslogtreecommitdiffstats
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
parente5a15da7990e9bc98733b11cfae3180023e82ee3 (diff)
downloadruby-36585f17fb8deb2042c36842c68637b740565811.tar.gz
* gc.c (id2ref): skip ICLASS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--gc.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3733c10b78..5f9a5e1d47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Oct 1 15:57:49 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (id2ref): skip ICLASS.
+
Mon Oct 1 15:29:35 2007 Tanaka Akira <akr@fsij.org>
* bootstraptest/runner.rb (assert_normal_exit): use `` instead of
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) {