November 30th, 2005

  • evan

ruby gotcha

out = filename.dup
out << " %.2f%%" % 100 * fraction_complete
puts out


For some inputs, this prints 100.00%, but for others it doesn't print any percentage at all -- why?

Answer follows in the comments.