jasonhutchens / gmail.com (Jason Hutchens) Jan 11, 2005 at 11:43 PM wrote: >Using the one-click under Windows. Interpreter version 1.8.2. >Language issues: > blah while and blah until don't behave like do...while in C >Comments? ->print 'before ' ;begin print 'hello ' end while false before hello nil ->print 'before ' ;begin print 'hello ' end until true before hello nil ->system 'ruby --version' ruby 1.8.2 (2004-07-29) [i386-mswin32] From _Programming Ruby_: "While and Until Modifiers: expression while boolean-expression expression until boolean-expression If expression is anything other than a begin/end block, executes expression zero or more times while boolean-expression is true (false for until). If expression is a begin/end block, the block will always be executed at least one time." "Block Expressions: begin body end Expressions may be grouped between begin and end. The value of the block expression is the value of the last expression executed." Differs from (note the capitalization): "BEGIN and END Blocks: Every Ruby source file can declare blocks of code to be run as the file is being loaded (the BEGIN blocks) and after the program has finished executing (the END blocks). BEGIN { begin code } END { end code } A program may include multiple BEGIN and END blocks. BEGIN blocks are executed in the order they are encountered. END blocks are executed in reverse order." Cordially,