ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: matz@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:82973] [Ruby trunk Feature#13551][Rejected] Add a method to alias class methods
Date: Mon, 25 Sep 2017 08:13:24 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-66877.20170925081322.bfbc90d0e4244663@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-13551.20170509042019@ruby-lang.org

Issue #13551 has been updated by matz (Yukihiro Matsumoto).

Status changed from Feedback to Rejected

As Martin-sensei pointed out, use singleton class notation.

  class Foo
    class <<Foo
      def foo; end
      alias bar foo
    end
  end

I don't think it's worth adding a new method to avoid this simple thing.

Matz.


----------------------------------------
Feature #13551: Add a method to alias class methods
https://bugs.ruby-lang.org/issues/13551#change-66877

* Author: JustJosh (Joshua Stowers)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
There doesn't seem to be an intuitive way to alias class methods.

Perhaps we can add a method such as 

~~~ ruby
alias_class_method :new_name, :old_name
~~~



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2017-09-25  8:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-13551.20170509042019@ruby-lang.org>
2017-05-09  4:20 ` [ruby-core:81046] [Ruby trunk Bug#13551] Add a method to alias class methods stowers.joshua
2017-05-09  7:09 ` [ruby-core:81056] [Ruby trunk Feature#13551][Feedback] " duerst
2017-05-09  7:19 ` [ruby-core:81058] [Ruby trunk Feature#13551] " matthew
2017-05-09 16:23 ` [ruby-core:81077] " stowers.joshua
2017-05-10  7:43 ` [ruby-core:81086] " duerst
2017-05-21 17:29 ` [ruby-core:81319] " shevegen
2017-05-21 17:33 ` [ruby-core:81320] " shevegen
2017-06-14  3:07 ` [ruby-core:81676] " stowers.joshua
2017-06-14  3:08 ` [ruby-core:81677] " stowers.joshua
2017-09-25  8:13 ` matz [this message]
2017-09-25  9:01 ` [ruby-core:82982] " duerst

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-list from there: mbox

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

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

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

  git send-email \
    --in-reply-to=redmine.journal-66877.20170925081322.bfbc90d0e4244663@ruby-lang.org \
    --to=ruby-core@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 read-only IMAP folder(s) and NNTP newsgroup(s).