diff --git a/ChangeLog b/ChangeLog index 920a94fb31..a5c2a5b03b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 14 11:27:37 2003 NAKAMURA Usaku + + * gc.c (rb_data_object_alloc): check type of 1st argument. + [ruby-dev:21192] + Wed Aug 13 23:31:00 2003 Shigeo Kobayashi * ext/bigdecimal.c .h .html: Ambiguity of BigDecimal::limit removed. diff --git a/gc.c b/gc.c index 1f8970eed7..a76d5c81bc 100644 --- a/gc.c +++ b/gc.c @@ -342,6 +342,7 @@ rb_data_object_alloc(klass, datap, dmark, dfree) RUBY_DATA_FUNC dfree; { NEWOBJ(data, struct RData); + Check_Type(klass, T_CLASS); OBJSETUP(data, klass, T_DATA); data->data = datap; data->dfree = dfree;