diff options
author | Paweł Przeniczny <pawel.przeniczny@airhelp.com> | 2019-11-24 23:08:16 +0100 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-25 09:19:15 +0900 |
commit | ce50af21af3d23e292b73f955a8b12ea9c2038e3 (patch) | |
tree | 893d8141ec5de75019fbb79eb7219d0900c69f2a /proc.c | |
parent | fd956c72eaeb07d26d61310a9e4b55b500237c02 (diff) |
Fix the docs for Proc#>>.
The docs are wrong about the behaviour of `#>>` (looks like it was copied from `#<<`)
In `(prc >> g).call(n)` _prc_ is called first (with _n_), *then* _g_ is called with the result.
Code examples are OK.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2691
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3362,8 +3362,8 @@ rb_proc_compose_to_left(VALUE self, VALUE g) * prc >> g -> a_proc * * Returns a proc that is the composition of this proc and the given <i>g</i>. - * The returned proc takes a variable number of arguments, calls <i>g</i> with them - * then calls this proc with the result. + * The returned proc takes a variable number of arguments, calls this proc with them + * then calls <i>g</i> with the result. * * f = proc {|x| x * x } * g = proc {|x| x + x } |