From: "Eregon (Benoit Daloze) via ruby-core" Date: 2023-05-20T18:21:21+00:00 Subject: [ruby-core:113566] [Ruby master Feature#19682] ability to get a reference to the "default definee" Issue #19682 has been updated by Eregon (Benoit Daloze). bughit (bug hit) wrote in #note-8: > Not clear to me how you can implement these concepts and still be confused about the differences among self, Module::nesting[0] and "default definee". I am not confused, you misunderstood my reply in https://bugs.ruby-lang.org/issues/19644#note-1. I was trying to help you by asking what you want to use this for concretely. When you see such a contradiction, I suggest you think harder. Module.nesting[0] is the same as self in a module body and in a singleton method. In a regular method it's just the `self` outside the `def`. This is a trivial value, there is no point to add a new method for it. It's also visually trivial to identify the module and class keywords. And Module.nesting is mostly relevant for constant lookup, and if you care about constant lookup, it's meaningless to only look at Module.nesting[0] but not other elements. I ask you to not be needlessly rude and have some respect for committers. Also it would be great if you can think by yourself how to better present your tickets so they have a chance to be accepted and not be so vague and IMO feel like spam. "Could be useful for" is not a good enough motivation to open a ticket. ---------------------------------------- Feature #19682: ability to get a reference to the "default definee" https://bugs.ruby-lang.org/issues/19682#change-103199 * Author: bughit (bug hit) * Status: Open * Priority: Normal ---------------------------------------- https://blog.yugui.jp/entry/846 "default definee" is a pretty important context so why not make it easy to identify? Could be a Module class method or a global method (Kernel) or a keyword. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/