P
Patrick Gundlach
Hi,
in pure ruby, I sometimes access hashes with symbols as keys:
{ :foo => "this", :bar => "other" }
Q: How would I create this kind of hash on the c part?
OK, the hash is easy (rb_hash_new()). But how do I specify the key?
When I use rb_intern("foo"), I get a hash like:
{ 1234 => "this", 2345 => "other" }
Patrick
in pure ruby, I sometimes access hashes with symbols as keys:
{ :foo => "this", :bar => "other" }
Q: How would I create this kind of hash on the c part?
OK, the hash is easy (rb_hash_new()). But how do I specify the key?
When I use rb_intern("foo"), I get a hash like:
{ 1234 => "this", 2345 => "other" }
Patrick