[#111712] [Ruby master Feature#19322] Support spawning "private" child processes — "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" <ruby-core@...>
SXNzdWUgIzE5MzIyIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtqdHNhbmFrdHNpZGlzIChLSiBUc2Fu
14 messages
2023/01/07
[ruby-core:112007] [Ruby master Feature#19366] Rename/alias Refinedment#refined_class => #refined_module
From:
"Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>
Date:
2023-01-24 14:17:54 UTC
List:
ruby-core #112007
Issue #19366 has been updated by Eregon (Benoit Daloze).
Agreed, I think it's fine to have both `refined_class` and `refined_module`, much like we have {module,class}_{eval,exec}.
----------------------------------------
Feature #19366: Rename/alias Refinedment#refined_class => #refined_module
https://bugs.ruby-lang.org/issues/19366#change-101440
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
----------------------------------------
In #12737, `Refinement#refined_class` is introduced.
As "module" is more generic concept than "class", the name misleadingly implies that either this method doesn't returns refined _modules_, or modules can't be refined. This is obviously not true and trivially disproved:
```ruby
module Refs
refine Enumerable do
def foo = puts 'foo'
end
end
Refs.refinements[0].refined_class
#=> Enumerable. Which is, well, not a class.
# The refinement is usable, so it is not a mute concept:
using Refs
[1, 2, 3].foo # prints "foo" successfully
```
I believe we refer to "modules" when some feature applies to modules and classes.
Unless there is some deeper consideration for the current naming (I don't see justification in #12737, but I might miss something), the method should be renamed or aliased.
PS: Sorry for a huge amount of "nitpicky" issues after the version release. Typically, those concerns emerge while I am working on the [changelog](https://rubyreferences.github.io/rubychanges/), and I am usually trying to start the work at least a month before the release. Unfortunately, due to you-know-what, I was unable to do it in time this year.
After the 3.2 changelog, I plan to switch to the "master changelog" approach (following the development with the "current unreleased changes" document) this year. Unless I'll be unable to due to reasons not in my control.
--
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/