Hello,
I am working on this gem to provide backward-compatibility of the new `dig` method in `Hash` and `Array`.
But I can't tell from the documentation or tests in the original commit
what is supposed to happen if Array#dig is passed a non-numeric index. For example:
['zero', 'one', 'two'].dig(:first)
It seems like the C code is just calling the `[]` operator, in which case it would raise this exception:
TypeError: no implicit conversion of Symbol into Integer
But it definitely seems like the spirit of `dig` that `nil` should be returned if the expected structure isn't there. I believe the most typical use case for `dig` is to dig through a JSON hash and either find the result we expected, or get `nil`. Wouldn't it defeat the purpose of `dig` if we had to wrap it in a `rescue`?
Can we clarify the desired behavior, then update the documentation and tests to reflect that?
-Colin