Open
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 ing 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))
Expand Down