Project

General

Profile

Actions

Bug #11202

closed

No warning when a link to an original method body was removed

Added by ko1 (Koichi Sasada) almost 9 years ago. Updated over 3 years ago.

Status:
Rejected
Target version:
-
[ruby-dev:49009]

Description

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 で取り出したものは、その実体が見つからないようになったとしても、別に気にしない、ということでいいでしょうか。
警告なんで、あまり気にしても、とも思いますが。

Actions

Also available in: Atom PDF

Like0
Like0Like0