Blocks

A block is a list of statements; syntactically, a block is the same as a chunk:

block ::= chunk

A block can be explicitly delimited to produce a single statement:

statement ::= do block end

Explicit blocks are useful to control the scope of variable declarations. Explicit blocks are also sometimes used to add a return or break statement in the middle of another block (see Control Structures).