* vm_method.c (rb_alias): treats an alias as if it is a newly defined

method so that oklass in a method cache refers the class on which the
  aliasing occured.
  [ruby-core:26074] (#2202).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2010-01-30 12:50:48 +00:00
parent d274933b13
commit be40bdbad7
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Sat Jan 30 18:09:36 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* vm_method.c (rb_alias): treats an alias as if it is a newly defined
method so that oklass in a method cache refers the class on which the
aliasing occured.
[ruby-core:26074] (#2202).
Sat Jan 30 17:58:28 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* .gdbinit: follows r24470.

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
#define RUBY_PATCHLEVEL 400
#define RUBY_PATCHLEVEL 401
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1

View file

@ -771,7 +771,7 @@ rb_alias(VALUE klass, ID name, ID def)
st_insert(RCLASS_M_TBL(klass), name,
(st_data_t) NEW_FBODY(
method = NEW_METHOD(orig_fbody->nd_body->nd_body,
orig_fbody->nd_body->nd_clss,
klass,
NOEX_WITH_SAFE(orig_fbody->nd_body->nd_noex)), def));
method->nd_file = (void *)def;