ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: matz@ruby.or.jp
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50968] [Ruby master Bug#11202] No warning when a link to an original method body was removed
Date: Mon, 26 Oct 2020 04:45:37 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-88177.20201026044536.17@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-11202.20150601101914.17@ruby-lang.org>

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

Status changed from Open to Rejected

I don't think the benefit is worth the complexity.

Matz.
 

----------------------------------------
Bug #11202: No warning when a link to an original method body was removed
https://bugs.ruby-lang.org/issues/11202#change-88177

* Author: ko1 (Koichi Sasada)
* Status: Rejected
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* ruby -v: 2.3dev
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
```
class C0
  def foo
  end
end

class C < C0
  alias bar foo            # C0#foo is pointed from C0 and C#bar.
  C0.class_eval{undef foo} # C0#foo is pointed C#bar.
  def bar                  # C0#foo is not pointed from anybody.
  end
end
```

このプログラムは、最終的に C0#foo の実体を参照できないようになっていますが、-w で警告を出しません。
一度 alias で取り出したものは、その実体が見つからないようになったとしても、別に気にしない、ということでいいでしょうか。
警告なんで、あまり気にしても、とも思いますが。




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

           reply	other threads:[~2020-10-26  4:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <redmine.issue-11202.20150601101914.17@ruby-lang.org>]

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-88177.20201026044536.17@ruby-lang.org \
    --to=matz@ruby.or.jp \
    --cc=ruby-dev@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).