Paul Duncan wrote: > * Jamis Buck (jgb3 / email.byu.edu) wrote: > >>Paul Duncan wrote: >> >>>* Jamis Buck (jgb3 / email.byu.edu) wrote: >> >>>>"I use octal until I get to 8, and then I switch to decimal." >>> >>>Shouldn't that be "until I get to 7"? >>> >> >>Depends on how you are understanding "until". :) Pseudocode: >> >> i = 0 >> until i == 8 >> puts "%o" % i >> i += 1 >> end >> puts "%d" % i > > > I see an opportunity for golfing! > > puts (0..8).map { |i| (i < 8 ? '%o' : '%d') % i } :-D Hole in one (line)! *clap* *clap* *clap* -- Jamis Buck jgb3 / email.byu.edu http://www.jamisbuck.org/jamis