Skip to content

Instantly share code, notes, and snippets.

@kenchan kenchan/gist:243373
Created Nov 26, 2009

Embed
What would you like to do?
#!/bin/env ruby
n = 3
hash = {}
n.downto(1).each { |i| hash[i] = [] }
hoges.each do |hoge|
hash[hoge.fuga] << fuga if hash[hoge.fuga]
end
n.downto(1).each do |i|
puts hash[i]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.