From a35c3cf34137c8a58a35d7e543af9cfa9d4725f6 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 1 Aug 2010 00:46:18 +0000 Subject: * class.c (rb_include_module): don't clear the method cache if the included module has no method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- class.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'class.c') 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); } -- cgit v1.2.3