* cont.c (cont_restore_0): improve docs. [Bug #6706][ruby-core:46243]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d6add973e
commit
b0d53d51f5
@ -1,3 +1,8 @@
|
|||||||
|
Sat Jul 14 17:17:55 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
|
||||||
|
|
||||||
|
* cont.c (cont_restore_0): improve docs. [Bug #6706][ruby-core:46243]
|
||||||
|
patched by Oscar Del Ben via https://github.com/ruby/ruby/pull/140
|
||||||
|
|
||||||
Sat Jul 14 17:08:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Jul 14 17:08:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* hash.c (rb_hash_s_create): raise an exception, when input elements
|
* hash.c (rb_hash_s_create): raise an exception, when input elements
|
||||||
|
14
cont.c
14
cont.c
@ -799,8 +799,8 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
|
|||||||
/*
|
/*
|
||||||
* Document-class: Continuation
|
* Document-class: Continuation
|
||||||
*
|
*
|
||||||
* Continuation objects are generated by <code>Kernel#callcc</code>,
|
* Continuation objects are generated by Kernel#callcc,
|
||||||
* after having <code>require</code>d <i>continuation</i>. They hold
|
* after having +require+d <i>continuation</i>. They hold
|
||||||
* a return address and execution context, allowing a nonlocal return
|
* a return address and execution context, allowing a nonlocal return
|
||||||
* to the end of the <code>callcc</code> block from anywhere within a
|
* to the end of the <code>callcc</code> block from anywhere within a
|
||||||
* program. Continuations are somewhat analogous to a structured
|
* program. Continuations are somewhat analogous to a structured
|
||||||
@ -849,15 +849,15 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* callcc {|cont| block } -> obj
|
* callcc {|cont| block } -> obj
|
||||||
*
|
*
|
||||||
* Generates a <code>Continuation</code> object, which it passes to
|
* Generates a Continuation object, which it passes to
|
||||||
* the associated block. You need to <code>require
|
* the associated block. You need to <code>require
|
||||||
* 'continuation'</code> before using this method. Performing a
|
* 'continuation'</code> before using this method. Performing a
|
||||||
* <em>cont</em><code>.call</code> will cause the <code>callcc</code>
|
* <em>cont</em><code>.call</code> will cause the #callcc
|
||||||
* to return (as will falling through the end of the block). The
|
* to return (as will falling through the end of the block). The
|
||||||
* value returned by the <code>callcc</code> is the value of the
|
* value returned by the #callcc is the value of the
|
||||||
* block, or the value passed to <em>cont</em><code>.call</code>. See
|
* block, or the value passed to <em>cont</em><code>.call</code>. See
|
||||||
* class <code>Continuation</code> for more details. Also see
|
* class Continuation for more details. Also see
|
||||||
* <code>Kernel::throw</code> for an alternative mechanism for
|
* Kernel#throw for an alternative mechanism for
|
||||||
* unwinding a call stack.
|
* unwinding a call stack.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user