Closed chopraanmol1 closed 5 years ago
Hash[] pattern creates many unnecessary intermediate arrays.
Coverage increased (+0.003%) to 94.188% when pulling d0a5958502845cccb126a4a3503117fb8d986d00 on chopraanmol1:refactor_avoid_creating_hash_from_nested_array into 8091ff652b153cfee202b7026192541dca11ebb3 on roo-rb:master.
@chopraanmol1 why don't you use :index_by instead?
(first_column..last_column).index_by { |col| cell(@header_line, col) }
sorry, i've forgot that it's method from rails
Hash[] pattern creates many unnecessary intermediate arrays.