diff --git a/ChangeLog b/ChangeLog index ccaeca8b73..732ef9a337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 8 05:51:20 2012 Eric Hodel + + * proc.c (method_clone): Added documentation. Patch by Robin Dupret. + Fixes #152 on github. + Tue Aug 7 20:19:29 2012 NARUSE, Yui * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns 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