diff --git a/ChangeLog b/ChangeLog index dc8c2ce749..f7bb1ce0d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Aug 1 09:44:25 2010 Tanaka Akira + + * class.c (rb_include_module): don't clear the method cache if the + included module has no method. + Sun Aug 1 09:21:32 2010 Tanaka Akira * ext/pathname/pathname.c (path_sub): Pathname#sub translated diff --git a/class.c b/class.c index 7e2f40b0a3..9ad8ec8539 100644 --- a/class.c +++ b/class.c @@ -659,7 +659,8 @@ rb_include_module(VALUE klass, VALUE module) } } c = RCLASS_SUPER(c) = include_class_new(module, RCLASS_SUPER(c)); - changed = 1; + if (RMODULE_M_TBL(module) && RMODULE_M_TBL(module)->num_entries) + changed = 1; skip: module = RCLASS_SUPER(module); }