Your Ad Here

Posted By

gouthamvel on 01/06/11


Tagged

String hash symbols


Versions (?)

hash string keys to symbols


 / Published in: Ruby
 

  1. my_hash = my_hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

Report this snippet  

You need to login to post a comment.