End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
CSV::Table#headers
headers
lib/csv/table.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/csv/table.rb, line 139
def headers
if @table.empty?
@headers.dup
else
@table.first.headers
end
end
Returns the headers for the first row of this table (assumed to match all other rows). The headers Array passed to CSV::Table.new is returned for empty tables.