From: "Iñaki Baz Castillo" Date: 2009-10-21T08:54:35+09:00 Subject: C extension: How to create a Hash entry with Symbol key ? Hi, I do know how to create a hash from C in wich keys and values are strings: VALUE hash = rb_hash_new(); rb_hash_aset(hash, rb_str_new("mykey",5), rb_str_new2(myvalue)); But now I want to create Hash entries with Symbol keys so the resulting Hash would look like: { :mykey => "lalala" } By reading the C API documentation I don't find how to do it: http://www.eqqon.com/index.php/Ruby_C_Extension Any help please? Thanks a lot. -- Iñaki Baz Castillo