mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix memory leak at the same named alias [Bug #18516]
When aliasing a method to the same name method, set a separate bit flag on that method definition, instead of the reference count increment. Although this kind of alias has no actual effect at runtime, is used as the hack to suppress the method re-definition warning.
This commit is contained in:
parent
7ff1bf3178
commit
e89d80702b
Notes:
git
2022-01-27 15:46:41 +09:00
3 changed files with 27 additions and 1 deletions
1
method.h
1
method.h
|
@ -181,6 +181,7 @@ struct rb_method_definition_struct {
|
|||
unsigned int iseq_overload: 1;
|
||||
int alias_count : 27;
|
||||
int complemented_count : 28;
|
||||
unsigned int no_redef_warning: 1;
|
||||
|
||||
union {
|
||||
rb_method_iseq_t iseq;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue