You should seriously consider reading http://whytheluckystiff.net/ruby/pickaxe/
And this question is suited for ruby-lang