ruby-changes:24606
From: drbrain <ko1@a...>
Date: Wed, 8 Aug 2012 05:52:25 +0900 (JST)
Subject: [ruby-changes:24606] drbrain:r36656 (trunk): * proc.c (method_clone): Added documentation. Patch by Robin Dupret.
drbrain 2012-08-08 05:51:48 +0900 (Wed, 08 Aug 2012) New Revision: 36656 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36656 Log: * proc.c (method_clone): Added documentation. Patch by Robin Dupret. Fixes #152 on github. Modified files: trunk/ChangeLog trunk/proc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 36655) +++ ChangeLog (revision 36656) @@ -1,3 +1,8 @@ +Wed Aug 8 05:51:20 2012 Eric Hodel <drbrain@s...> + + * proc.c (method_clone): Added documentation. Patch by Robin Dupret. + Fixes #152 on github. + Tue Aug 7 20:19:29 2012 NARUSE, Yui <naruse@r...> * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns Index: proc.c =================================================================== --- proc.c (revision 36655) +++ proc.c (revision 36656) @@ -1444,9 +1444,21 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/