Ruby float with double 0 Ruby float with double 0 ruby ruby

Ruby float with double 0


Format strings to the rescue:

>> puts "%.2f" % 1.0 #=> nil1.00