From 1a101d775a8c42f36c5a16978914ae2ac070e8a4 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Jan 2002 07:02:26 +0000 Subject: [PATCH] * eval.c (rb_add_method): clear replaced method from the cache. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ eval.c | 3 ++- version.h | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a83c3ecf15..2fd840bdad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Jan 8 15:54:02 2002 Nobuyoshi Nakada + + * eval.c (rb_add_method): clear replaced method from the cache. + Mon Jan 7 12:38:47 2002 Tanaka Akira * lib/time.rb (Time#xmlschema): new optional argument diff --git a/eval.c b/eval.c index d791b31f86..f5fbd5c91b 100644 --- a/eval.c +++ b/eval.c @@ -229,7 +229,8 @@ rb_add_method(klass, mid, node, noex) } if (OBJ_FROZEN(klass)) rb_error_frozen("class/module"); body = NEW_METHOD(node, noex); - st_insert(RCLASS(klass)->m_tbl, mid, body); + if (st_insert(RCLASS(klass)->m_tbl, mid, body)) + rb_clear_cache_by_id(mid); } static NODE* diff --git a/version.h b/version.h index 73262c0c6a..185c6b2cab 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.7.2" -#define RUBY_RELEASE_DATE "2002-01-07" +#define RUBY_RELEASE_DATE "2002-01-08" #define RUBY_VERSION_CODE 172 -#define RUBY_RELEASE_CODE 20020107 +#define RUBY_RELEASE_CODE 20020108