Skip to content

Commit 292a319

Browse files
committed
* 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
1 parent a996b48 commit 292a319

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Wed Aug 8 05:51:20 2012 Eric Hodel <[email protected]>
2+
3+
* proc.c (method_clone): Added documentation. Patch by Robin Dupret.
4+
Fixes #152 on github.
5+
16
Tue Aug 7 20:19:29 2012 NARUSE, Yui <[email protected]>
27

38
* ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns

proc.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,9 +1444,21 @@ rb_obj_define_method(int argc, VALUE *argv, VALUE obj)
14441444
return rb_mod_define_method(argc, argv, klass);
14451445
}
14461446

1447-
14481447
/*
1449-
* MISSING: documentation
1448+
* call-seq:
1449+
* method.clone -> new_method
1450+
*
1451+
* Returns a clone of this method.
1452+
*
1453+
* class A
1454+
* def foo
1455+
* return "bar"
1456+
* end
1457+
* end
1458+
*
1459+
* m = A.new.method(:foo)
1460+
* m.call # => "bar"
1461+
* n = m.clone.call # => "bar"
14501462
*/
14511463

14521464
static VALUE

0 commit comments

Comments
 (0)