lib/watir/elements/table.rb in watir-7.1.0 vs lib/watir/elements/table.rb in watir-7.2.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Watir
class Table < HTMLElement
include RowContainer
include Enumerable
@@ -29,10 +31,10 @@
all_rows = rows.locate
header_row = all_rows.first || raise(Error, 'no rows in table')
all_rows.entries[1..].map do |row|
cell_size_check(header_row, row)
- Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))]
+ headers(header_row).map(&:text).zip(row.cells.map(&:text)).to_h
end
end
#
# Returns first row of Table with proper subtype