Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
CSV::Row#==
row == other → true or false
lib/csv/row.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/csv/row.rb, line 633
def ==(other)
return @row == other.row if other.is_a? CSV::Row
@row == other
end
Returns true if other is a /CSV::Row that has the same fields (headers and values) in the same order as self; otherwise returns false:
Example
source = "Name,Name,Name\nFoo,Bar,Baz\n" table = CSV.parse(source, headers: true) row = table[0] other_row = table[0] row == other_row # => true other_row = table[1] row == other_row # => false