diff --git a/lib/roo/formatters/csv.rb b/lib/roo/formatters/csv.rb index 595a6095..1c30c07a 100644 --- a/lib/roo/formatters/csv.rb +++ b/lib/roo/formatters/csv.rb @@ -1,7 +1,7 @@ module Roo module Formatters module CSV - def to_csv(filename = nil, separator: ",", sheet: default_sheet) + def to_csv(filename = nil, sheet = default_sheet, separator: ",") if filename File.open(filename, "w") do |file| write_csv_content(file, sheet, separator)