[#49078] DevelopersMeeting20150728Japan — SASADA Koichi <ko1@...>
Hi,
5 messages
2015/06/12
[ruby-dev:49010] [Ruby trunk - Bug #11202] No warning when a link to an original method body was removed
From:
ko1@...
Date:
2015-06-01 10:20:04 UTC
List:
ruby-dev #49010
Issue #11202 has been updated by Koichi Sasada.
Description updated
----------------------------------------
Bug #11202: No warning when a link to an original method body was removed
https://bugs.ruby-lang.org/issues/11202#change-52697
* Author: Koichi Sasada
* Status: Open
* Priority: Normal
* Assignee: 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/