lib/write_xlsx/worksheet.rb in write_xlsx-1.09.1 vs lib/write_xlsx/worksheet.rb in write_xlsx-1.09.2

- old
+ new

@@ -900,10 +900,10 @@ elsif token.respond_to?(:coerce) # Numeric write_number(*args) # Match integer with leading zero(s) elsif @leading_zeros && token =~ /^0\d*$/ write_string(*args) - elsif token =~ /^\d+$/ + elsif token =~ /\A([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?\Z/ write_number(*args) # Match formula elsif token =~ /^=/ write_formula(*args) # Match array formula