< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #11188 has been updated by Eregon (Benoit Daloze).
Nice, in fact this was already the behavior in TruffleRuby.
----------------------------------------
Bug #11188: Method#inspect for chaining alias methods
https://bugs.ruby-lang.org/issues/11188#change-85777
* Author: ko1 (Koichi Sasada)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* ruby -v: 2.3dev
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
The following script prints strange results (at least for me).
```ruby
class C0
def foo
end
end
class C1 < C0
alias foo1 foo
alias foo2 foo1
alias foo3 foo2
end
p C1.new.method(:foo)
p C1.new.method(:foo1)
p C1.new.method(:foo2)
p C1.new.method(:foo3)
```
Result:
```
#<Method: C1(C0)#foo>
#<Method: C1(C0)#foo1(foo)>
#<Method: C1#foo2(foo)>
#<Method: C1#foo3(foo)>
```
I believe 3rd and 4th results should be:
```
#<Method: C1(C0)#foo2(foo)>
#<Method: C1(C0)#foo3(foo)>
```
How about it?
---Files--------------------------------
method-inspect-chain-alias-11188.patch (2.37 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>