Something
public ruby v1 · immutable while row = result.fetch_hash do attribute = row['attribute'] value = row['value'] if (attributs.has_key?(row['attribute'])) if (attributs[attribute].class != Array) old = attributs[attribute] attributs[attribute] = Array.new attributs[attribute] << old attributs[attribute] << value end else attributs[attribute] = value end end