Closed sbeckeriv closed 8 years ago
Hello, I read over the ruby-sys code. It looks like the value has is_(type) methods pretty well defined with a ty method that returns the type. Since Hash exposes this I am now check for nil. I think my comment stands. I will try a pull request for what I am thinking.
Thanks Becker
Hello,
My question is can hash
at
return a rust option or can i get a hint of the type from any object. Or match on the type AnyObject can become?Question really about the Hash but could apply to Array. I am looking for a key that might not be there. Right now hash returns AnyObject. Not sure if its possible but the Option would help a lot! I am currently throwing my results in to a rust HashMap then converting it to a Hash before returning. If I can sort out the nil issue I can just use a Hash from the start.
Thanks! It was fun and easy! I look forward to really using ruru in a real project.
Becker
For reference my code https://github.com/sbeckeriv/greedy-color