summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-14 08:13:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-14 08:13:31 +0000
commit04a8e85bc5d305d1c227ca9d3ccc0794e07fafc1 (patch)
tree9a58b8ba5b6f90fc55acf9da7dbc478e0b495bda /class.c
parent0aa005f8e96ff032229d1e90a0ac209eb90e4168 (diff)
* range.c (range_step): new method.
* string.c (rb_str_cmp): remove needless conditional. * string.c (rb_str_lstrip_bang) `return Qnil' was missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/class.c b/class.c
index 68a7b55..43bb7b1 100644
--- a/class.c
+++ b/class.c
@@ -30,6 +30,7 @@ rb_class_boot(super)
klass->m_tbl = 0; /* safe GC */
klass->m_tbl = st_init_numtable();
+ OBJ_INFECT(klass, super);
return (VALUE)klass;
}
@@ -280,6 +281,8 @@ include_class_new(module, super)
else {
RBASIC(klass)->klass = module;
}
+ OBJ_INFECT(klass, module);
+ OBJ_INFECT(klass, super);
return (VALUE)klass;
}
@@ -308,6 +311,7 @@ rb_include_module(klass, module)
Check_Type(module, T_MODULE);
}
+ OBJ_INFECT(klass, module);
while (module) {
/* ignore if the module included already in superclasses */
for (p = RCLASS(klass)->super; p; p = RCLASS(p)->super) {