diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-09-01 18:45:03 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-09-01 19:28:54 +0900 |
commit | 10ebf87428fa41dcbb179f8a35428fb63dc69d5c (patch) | |
tree | cf86f5d3ed2fbc0d4991bca6091b9ef0721a8fa2 /proc.c | |
parent | f9bdb17c02ff012b6b9bb46463a3596b6f99f144 (diff) |
Assert not to be UNDEF visibility
Any defined methods, bound to any classes/modules and not being
UNDEFINED_METHOD_ENTRY_P, should not be METHOD_VISI_UNDEF.
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1657,6 +1657,7 @@ mnew_internal(const rb_method_entry_t *me, VALUE klass, VALUE iclass, } if (visi == METHOD_VISI_UNDEF) { visi = METHOD_ENTRY_VISI(me); + RUBY_ASSERT(visi != METHOD_VISI_UNDEF); /* !UNDEFINED_METHOD_ENTRY_P(me) */ if (scope && (visi != METHOD_VISI_PUBLIC)) { if (!error) return Qnil; rb_print_inaccessible(klass, id, visi); |