lib/ruby-progressbar/format/formatter.rb in ruby-progressbar-1.8.1 vs lib/ruby-progressbar/format/formatter.rb in ruby-progressbar-1.8.3
- old
+ new
@@ -11,10 +11,10 @@
processed_string.gsub!(/%%/, '%')
bar_length = max_length -
processed_string.displayable_length +
format_string.bar_molecule_placeholder_length
- bar_length = bar_length < 0 ? 0 : bar_length
+ bar_length = (bar_length < 0) ? 0 : bar_length
format_string.bar_molecules.each do |molecule|
processed_string.gsub!(molecule.full_key,
molecule.lookup_value(bar, bar_length))
end