ruby-changes:33408
From: nobu <ko1@a...>
Date: Mon, 31 Mar 2014 23:38:44 +0900 (JST)
Subject: [ruby-changes:33408] nobu:r45487 (trunk): variable.c, vm_method.c: pin down
nobu 2014-03-31 23:38:38 +0900 (Mon, 31 Mar 2014) New Revision: 45487 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45487 Log: variable.c, vm_method.c: pin down * variable.c (rb_alias_variable): ensure pinned down. * vm_method.c (rb_method_entry_make): ditto. Modified files: trunk/variable.c trunk/vm_method.c Index: variable.c =================================================================== --- variable.c (revision 45486) +++ variable.c (revision 45487) @@ -873,6 +873,7 @@ rb_alias_variable(ID name1, ID name2) https://github.com/ruby/ruby/blob/trunk/variable.c#L873 entry2 = rb_global_entry(name2); if (!st_lookup(rb_global_tbl, (st_data_t)name1, &data1)) { + name1 = SYM2ID(ID2SYM(name1)); entry1 = ALLOC(struct global_entry); entry1->id = name1; st_add_direct(rb_global_tbl, name1, (st_data_t)entry1); Index: vm_method.c =================================================================== --- vm_method.c (revision 45486) +++ vm_method.c (revision 45487) @@ -333,6 +333,8 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L333 rb_unlink_method_entry(old_me); } + mid = SYM2ID(ID2SYM(mid)); + me = ALLOC(rb_method_entry_t); rb_clear_method_cache_by_class(klass); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/