summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index c221773..9e6a8f3 100644
--- a/gc.c
+++ b/gc.c
@@ -398,7 +398,7 @@ rb_data_object_alloc(klass, datap, dmark, dfree)
RUBY_DATA_FUNC dfree;
{
NEWOBJ(data, struct RData);
- Check_Type(klass, T_CLASS);
+ if (klass) Check_Type(klass, T_CLASS);
OBJSETUP(data, klass, T_DATA);
data->data = datap;
data->dfree = dfree;