Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pp'
- a1 = %w(one two three four)
- h = Hash.new([])
- a1.each do |el|
- h[el] << el
- h[el] << el
- end
- pp h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement