I think this can be trimmed up to just

```ruby
        if self.kind_of?(Array)
          has_child = key < self.length
        else
          has_child = self.has_key?(key)
        end
```

which can probably be further trimmed up to:

```ruby
        has_child = self.kind_of?(Array) ? (key < self.length) : self.has_key?(key)
```

Then down below, we can also remove the `return false if self.empty?`.  When we call `self[key]` where the key is outside the range, we'll get nil, which won't respond to has_key_path, and it will return false, which is correct.

The other thing is that -1 is a valid key for Arrays, and the other code can't handle it.  I think we need specs where negative values are passed.  I think the code I wrote also suffers from an issue with negatives, but I think that can be corrected with `key.abs`