summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-13 06:25:33 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-13 06:25:33 +0000
commit8ac05ae500332d7fb8a86f9da7d87424915ab0ca (patch)
tree8b07a070df41fecb6a199c5232572403fd581ef8
parent925c936bb1f362cb806184afddf2dbac40b21ffc (diff)
* gc.c (rb_data_object_alloc): check klass only if klass is not 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--gc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 14956f8..a84743e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon May 13 15:24:16 2013 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (rb_data_object_alloc): check klass only if klass is not 0.
+
Mon May 13 14:57:28 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
diff --git a/gc.c b/gc.c
index d0294cb..fbdc964 100644
--- a/gc.c
+++ b/gc.c
@@ -716,7 +716,7 @@ VALUE
rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
{
NEWOBJ_OF(data, struct RData, klass, T_DATA);
- Check_Type(klass, T_CLASS);
+ if (klass) Check_Type(klass, T_CLASS);
data->data = datap;
data->dfree = dfree;
data->dmark = dmark;