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

Add new value type Symbol #78

Closed
wants to merge 4 commits into from

Conversation

SeekingMeaning
Copy link

@SeekingMeaning SeekingMeaning commented Aug 1, 2020

Closes #56

This uses C.mrb_check_intern_cstr instead of C.mrb_intern_cstr as the former returns an mrb_value while the latter returns an mrb_sym (which we don't want)

Also allows struct keys to be symbols, for example:

type Food struct {
    Name string
    Description string
}
{:name => "aks-engine", :description => "Azure Kubernetes Engine"}
# or
{name: "aks-engine", description: "Azure Kubernetes Engine"}

Thanks for creating this useful library!

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 this pull request may close these issues.

How can I get Hash value via a Symbol key?
1 participant