Two dimensional array which have CSV::Row object returns different result in ruby 2.3 and ruby 2.6

71 views Asked by At

Two dimensional array has the element which is CSV::Row object like this.

[[csv_row_object]]

I tried to flatten this array and got different result in ruby 2.3 and 2.6.

why different result?

# in Ruby 2.6(ruby 2.6.0rc1)

[[#<CSV::Row "no":"001111" "status":"1" >]].flatten

returns ["no","001111","status","1"]


# in Ruby 2.3.8

[[#<CSV::Row "no":"001111" "status":"1">]].flatten

returns [#<CSV::Row "no":"001111" "status":"1">]
0

There are 0 answers