Daniel Carrera wrote: > Hello, > > How can you exit a loop mid-way?: > > while condition1 > ... > last if condition2 > ... > end > > 'last' doesn't work. > > Could someone tell me where this is documented? > It's really hard to figure out much with the current Ruby documentation. > break if condition2 break(value) if condition2 # value is used as the value of the while statement. Doc-ed in the Pickaxe chapter on Expressions. (But not the value argument, which is a recently added feature.)