diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-07 20:51:48 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-07 20:51:48 +0000 |
commit | 292a319608bbd760a9eec9f8072c0cb9a970eb90 (patch) | |
tree | 62c77be362003fe6b2afc63e91fe3105b6827f75 /proc.c | |
parent | a996b48515f67c8ccb7594d96a22a248a2461650 (diff) | |
download | ruby-292a319608bbd760a9eec9f8072c0cb9a970eb90.tar.gz |
* 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
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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 |