From 22768f9aefdb5e7a466bfd4e63dbfdf2bc5184b8 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 20 Feb 2002 04:28:52 +0000 Subject: * 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 --- class.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'class.c') 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); -- cgit v1.2.3