summaryrefslogtreecommitdiff
path: root/method.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-27 00:28:39 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-27 15:46:08 +0900
commite89d80702bd98a8276243a7fcaa2a158b3bfb659 (patch)
tree7508f7d54158336e4486aa94c4b78b34dc8de3e0 /method.h
parent7ff1bf317887c0d7b21e91ad548d07b9f05c540c (diff)
downloadruby-e89d80702bd98a8276243a7fcaa2a158b3bfb659.tar.gz
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.
Diffstat (limited to 'method.h')
-rw-r--r--method.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/method.h b/method.h
index 815fd9da47..2f4504bfec 100644
--- a/method.h
+++ b/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;