make ruby 1.9 happy

"Hash#index is deprecated; use Hash#key"
Merge pull request #20 from reallyenglish/tomoyukis

make ruby 1.9 happy