ufuk (Ufuk Kayserilioglu) wrote in #note-1: > I think you should be able to use `Module.nesting.first` to get the closest lexical nesting to the executing code. There might be edge-cases where this doesn't work the way you might want it...hibachrach (Hazel Bachrach)
Hello! As far as I know, there is no way to reference the current `Class` or `Module` one is inside of lexically in Ruby. Would it make sense to add a syntax/keyword for this? ``` ruby module Foo module Bar def blah pu...hibachrach (Hazel Bachrach)
This feels related to [this proposal](https://bugs.ruby-lang.org/issues/16460) I submitted ~1.5 years ago concerning external/internal names for keyword parameters as it would solve this problem somewhat more elegantly: ```ruby # Onl...hibachrach (Hazel Bachrach)
zverok (Victor Shepelev) wrote: > You propose to introduce the "same" construct, which means something > ... I think at the core, I am suggesting introducing something _new_. While there is certainly merit to discussion of what is the...hibachrach (Hazel Bachrach)
zverok (Victor Shepelev) wrote: > It also means _exactly_ "...and put in this variable" in this cases: > ... I stand corrected! That is a compelling refutation of my point. > * It is unlike _anything_ that exists in Ruby (I can't ...hibachrach (Hazel Bachrach)
zverok (Victor Shepelev) wrote: > I'd say, considering new pattern-matching examples, something with `=>` _might_ work (while still looking ugly) [...] See, to me, this seems *more* confusing as it reverses the common meaning of `=>`...hibachrach (Hazel Bachrach)
> What is `foo`? In this case, `foo` would be a (JavaScript) `Object`. In using this syntax, you are presuming that `foo` would have the properties `nameOfOneProperty` or `nameOfAnotherProperty`, though if it did not have either of th...hibachrach (Hazel Bachrach)
Hello! This is my first time filing an issue and I was unable to find anything similar. I apologize if one already exists. In other languages (such as JavaScript, Swift, and Crystal), it is possible to have two names for a given keywo...hibachrach (Hazel Bachrach)