class Array

Public Instance Methods

to_hash() click to toggle source
[1,2]

> {1=>2}

# File lib/ext/core.rb, line 3
def to_hash
  hash = {}
  each {|k,v| hash[k]=v}
  hash
end