aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manual/manual.of11
1 files changed, 6 insertions, 5 deletions
diff --git a/manual/manual.of b/manual/manual.of
index fd49b404..725b12ad 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -1553,9 +1553,11 @@ interrupt the respective method,
1553but are otherwise ignored; 1553but are otherwise ignored;
1554the error reported is the original one. 1554the error reported is the original one.
1555 1555
1556If a coroutine yields inside a block and is never resumed again, 1556If a coroutine yields and is never resumed again,
1557the variables visible at that block will never go out of scope, 1557some variables may never go out of scope,
1558and therefore they will never be closed. 1558and therefore they will never be closed.
1559(These variables are the ones created inside the coroutine
1560and in scope at the point where the coroutine yielded.)
1559Similarly, if a coroutine ends with an error, 1561Similarly, if a coroutine ends with an error,
1560it does not unwind its stack, 1562it does not unwind its stack,
1561so it does not close any variable. 1563so it does not close any variable.
@@ -2245,9 +2247,9 @@ Consider the following example:
2245@verbatim{ 2247@verbatim{
2246a = {} 2248a = {}
2247local x = 20 2249local x = 20
2248for i=1,10 do 2250for i = 1, 10 do
2249 local y = 0 2251 local y = 0
2250 a[i] = function () y=y+1; return x+y end 2252 a[i] = function () y = y + 1; return x + y end
2251end 2253end
2252} 2254}
2253The loop creates ten closures 2255The loop creates ten closures
@@ -6815,7 +6817,6 @@ A value of @true as a fourth, optional argument @id{plain}
6815turns off the pattern matching facilities, 6817turns off the pattern matching facilities,
6816so the function does a plain @Q{find substring} operation, 6818so the function does a plain @Q{find substring} operation,
6817with no characters in @id{pattern} being considered magic. 6819with no characters in @id{pattern} being considered magic.
6818Note that if @id{plain} is given, then @id{init} must be given as well.
6819 6820
6820If the pattern has captures, 6821If the pattern has captures,
6821then in a successful match 6822then in a successful match