self == other -> boolRuby 1.9.3 から[permalink][rdoc][edit]-
自身が other と同じヘッダやフィールドを持つ場合に真を返します。そうでない場合は偽を返します。
- [PARAM]
other: - 比較対象の CSV::Row のインスタンスを指定します。
require "csv" row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"]) row2 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"]) p row1 == row2 # => true row2 << ["header3", "row1_3"] p row1 == row2 # => false - [PARAM]