ruby-changes:47604
From: nobu <ko1@a...>
Date: Sat, 2 Sep 2017 10:41:17 +0900 (JST)
Subject: [ruby-changes:47604] nobu:r59720 (trunk): Add Method#original_name code example [ci skip]
nobu 2017-09-02 10:41:14 +0900 (Sat, 02 Sep 2017) New Revision: 59720 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59720 Log: Add Method#original_name code example [ci skip] * proc.c (method_original_name): [DOC] add code example. [Fix GH-1693] Author: Seiei Miyagi <hanachin@g...> Modified files: trunk/proc.c Index: proc.c =================================================================== --- proc.c (revision 59719) +++ proc.c (revision 59720) @@ -1606,6 +1606,12 @@ method_name(VALUE obj) https://github.com/ruby/ruby/blob/trunk/proc.c#L1606 * meth.original_name -> symbol * * Returns the original name of the method. + * + * class C + * def foo; end + * alias bar foo + * end + * C.method(:bar).original_name # => :foo */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/