Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

How can I get Hash value via a Symbol key? #56

Open
zhuangsirui opened this issue Jul 3, 2017 · 1 comment
Open

How can I get Hash value via a Symbol key? #56

zhuangsirui opened this issue Jul 3, 2017 · 1 comment

Comments

@zhuangsirui
Copy link

I read the doc, use Hash.Get to access values, but I can't find a way to convert to Symbol.

@erikh
Copy link
Collaborator

erikh commented Jul 4, 2017

Hi!

So I don't think the library has support for this yet, but I don't think it'll be complicated to add; basically we need a new value type called Symbol that MrbValue()'s with C.mrb_intern_cstr. This should yield the values necessary to populate the hash table, or use symbols in any other context.

It might take me a few weeks to free up time but i can do this patch soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants