From: Andre Nathan Date: 2006-04-07T23:28:17+09:00 Subject: rb_hash_aref and symbol keys Hello I'm just getting starting with ruby C extensions, and I'm having a problem accessing hash values corresponding to keys which are symbols. String keys work fine: /* In ruby: myhash = { 'foo' => 'blah' } */ foo = rb_hash_aref(myhash, rb_str_new2("foo")); /* works */ /* In ruby: myhash = { :foo => 'blah' } */ foo = rb_hash_aref(myhash, rb_intern("foo")); /* returns Qnil :( */ What is the proper way to do that? I found someone with the same problem in the archives, but I'm afraid I didn't understand Nobu's answer in ruby-talk:86571 :\ Thanks in advance, Andre