Actions
Bug #18670
closedMatchData#[start, length] pads nil values when negative start is given
Description
Example
irb(main):001:0> /(.)(.)(\d+)(\d)/.match("THX1138.")[-1, 10]
=> ["8", nil, nil, nil, nil, nil, nil, nil, nil, nil]
I would expect this to be consistent with String or Array for example:
irb(main):002:0> "hello"[-1, 10]
=> "o"
irb(main):003:0> [1,2,3][-1,10]
=> [3]
Actions
Like0
Like0Like0Like0Like0