Sha256: ae54a8595fbe699a6e6d6de7afe2a0bfd57473283c64f0baab758d16cd1b9c8f
Contents?: true
Size: 292 Bytes
Versions: 10
Compression:
Stored size: 292 Bytes
Contents
class Hash def Hash.with_keys_values(keys, values) raise ArgumentError, "Unmatching sizes #{keys.size} != #{values.size}" unless keys.size == values.size #Hash[keys.zip(values).flatten] ret = Hash.new keys.each_with_index{|key, idx| ret[key] = values[idx]} ret end end
Version data entries
10 entries across 10 versions & 1 rubygems