summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-19 07:47:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-19 07:47:07 +0000
commit9eae31d5696cb796821929ff289869e94d87c840 (patch)
treefed3a1b8c969954c23bbe53f740958107edcb171 /class.c
parent87dfb89d2e15b031432ae09225340331a8259a1c (diff)
* file.c (path_check_1): do not warn on world writable *parent*
directories. * class.c (rb_include_module): should preserve ancestor order in the included class/module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2094 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 32ee98be72..12d03f15e4 100644
--- a/class.c
+++ b/class.c
@@ -361,8 +361,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; /* move insertion point */
goto skip;
+ }
}
}
RCLASS(c)->super = include_class_new(module, RCLASS(c)->super);