diff --git a/lib/csv-diff/csv_source.rb b/lib/csv-diff/csv_source.rb index faec38b..dfa71aa 100644 --- a/lib/csv-diff/csv_source.rb +++ b/lib/csv-diff/csv_source.rb @@ -57,7 +57,7 @@ def initialize(source, options = {}) @path = source # When you call CSV.open, it's best to pass in a block so that after it's yielded, # the underlying file handle is closed. Otherwise, you risk leaking the handle. - @data = CSV.open(@path, mode_string, csv_options) do |csv| + @data = CSV.open(@path, mode_string, **csv_options) do |csv| csv.readlines end elsif source.is_a?(Enumerable) && source.size == 0 || (source.size > 0 && source.first.is_a?(Enumerable))