Create kdex.rb

Fix #331
Update kdex.rb
Merge pull request #392 from shrx/patch-11

Create kdex.rb