summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-20 04:28:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-20 04:28:52 +0000
commit22768f9aefdb5e7a466bfd4e63dbfdf2bc5184b8 (patch)
tree33117ceb2e479bc146c1f40711234ae780df5748 /class.c
parent92886835719364eac3497eeb74f10dce1ff6275a (diff)
* hash.c (rb_any_cmp): should handle Qundef in keys.
* eval.c (remove_method): should not remove a empty method to implement "undef". * eval.c (rb_eval): should allow singleton class def for true/false/nil. * parse.y (str_extend): backslash escape was done wrong. * class.c (rb_include_module): should preserve ancestor order in the included class/module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/class.c b/class.c
index b4d8c935ae..ea3e124293 100644
--- a/class.c
+++ b/class.c
@@ -330,8 +330,10 @@ rb_include_module(klass, module)
/* ignore if the module included already in superclasses */
for (p = RCLASS(klass)->super; p; p = RCLASS(p)->super) {
if (BUILTIN_TYPE(p) == T_ICLASS) {
- if (RCLASS(p)->m_tbl == RCLASS(module)->m_tbl)
+ if (RCLASS(p)->m_tbl == RCLASS(module)->m_tbl) {
+ c = p;
goto skip;
+ }
}
}
RCLASS(c)->super = include_class_new(module, RCLASS(c)->super);