evan_tech

Previous Entry Share Next Entry
02:19 pm, 30 Nov 05

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.