summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-02 01:41:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-02 01:41:14 +0000
commitcaf92db48646a0b2febcd69f2e9a9a6734074a68 (patch)
treee4309ab8ddc7da7787b98ef0ec6adb5e7c44339c /proc.c
parent0118b985459ad20520af09e5202774b3cc52b491 (diff)
downloadruby-caf92db48646a0b2febcd69f2e9a9a6734074a68.tar.gz
Add Method#original_name code example [ci skip]
* proc.c (method_original_name): [DOC] add code example. [Fix GH-1693] Author: Seiei Miyagi <hanachin@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index f35994b111..c4a5ad5cb4 100644
--- a/proc.c
+++ b/proc.c
@@ -1606,6 +1606,12 @@ method_name(VALUE obj)
* 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