ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "shugo (Shugo Maeda) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "shugo (Shugo Maeda)" <noreply@ruby-lang.org>
Subject: [ruby-core:119962] [Ruby master Feature#19366] Rename/alias Refinedment#refined_class => #refined_module
Date: Tue, 19 Nov 2024 05:05:59 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-110693.20241119050559.710@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-19366.20230122142931.710@ruby-lang.org>

Issue #19366 has been updated by shugo (Shugo Maeda).

Status changed from Open to Closed

After discussions in [Feature #19714], Refinement#target was added, so I close this issue.


----------------------------------------
Feature #19366: Rename/alias Refinedment#refined_class => #refined_module
https://bugs.ruby-lang.org/issues/19366#change-110693

* Author: zverok (Victor Shepelev)
* Status: Closed
----------------------------------------
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/lists/ruby-core.ml.ruby-lang.org/

      parent reply	other threads:[~2024-11-19  5:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 14:29 [ruby-core:111966] " zverok (Victor Shepelev) via ruby-core
2023-01-24 14:17 ` [ruby-core:112007] " Eregon (Benoit Daloze) via ruby-core
2023-02-13  6:16 ` [ruby-core:112392] " rubyFeedback (robert heiler) via ruby-core
2024-11-19  5:05 ` shugo (Shugo Maeda) via ruby-core [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-110693.20241119050559.710@ruby-lang.org \
    --to=ruby-core@ml.ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).