summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-14 07:49:27 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-14 07:49:27 +0000
commitaac5ff00319e2d215c3dcba557f60595da24bc8d (patch)
tree78855922da1b79cb8f36a09b8f7898560e92bbd2 /struct.c
parent5db5aa2edbd20bb95f3c75f5147e2cc8ae7b56cb (diff)
* struct.c (Init_Struct): should undefine "allocate" for Struct
class (it's redefined in the subclasses). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 0b17eb0302..6a2bb640ab 100644
--- a/struct.c
+++ b/struct.c
@@ -132,7 +132,7 @@ rb_struct_set(obj, val)
member = rb_struct_iv_get(rb_obj_class(obj), "__member__");
if (NIL_P(member)) {
- rb_bug("non-initialized struct");
+ rb_bug("uninitialized struct");
}
rb_struct_modify(obj);
for (i=0; i<RARRAY(member)->len; i++) {
@@ -568,6 +568,7 @@ Init_Struct()
rb_cStruct = rb_define_class("Struct", rb_cObject);
rb_include_module(rb_cStruct, rb_mEnumerable);
+ rb_undef_method(CLASS_OF(rb_cStruct), "allocate");
rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1);
rb_define_method(rb_cStruct, "initialize", rb_struct_initialize, -2);