#* http://rosettacode.org/wiki/Loops/While Demonstrate while loop *# i = 1024 while { i > 0 } { p i i = (i / 2).to_i } #* Output: 1024 512 256 128 64 32 16 8 4 2 1 *#