From 292a319608bbd760a9eec9f8072c0cb9a970eb90 Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 7 Aug 2012 20:51:48 +0000 Subject: * proc.c (method_clone): Added documentation. Patch by Robin Dupret. Fixes #152 on github. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 54bef3b45d..6ccb888bd7 100644 --- a/proc.c +++ b/proc.c @@ -1444,9 +1444,21 @@ rb_obj_define_method(int argc, VALUE *argv, VALUE obj) return rb_mod_define_method(argc, argv, klass); } - /* - * MISSING: documentation + * call-seq: + * method.clone -> new_method + * + * Returns a clone of this method. + * + * class A + * def foo + * return "bar" + * end + * end + * + * m = A.new.method(:foo) + * m.call # => "bar" + * n = m.clone.call # => "bar" */ static VALUE -- cgit v1.2.3