From: matz@... Date: 2020-10-26T04:45:37+00:00 Subject: [ruby-dev:50968] [Ruby master Bug#11202] No warning when a link to an original method body was removed 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/