Get Index of last value that matches a condition in an array ruby : So i have the following array 

    ["Pending Verification", "Pending Verification", nil, nil]

I want to be able to get the last index that matched the value nil. 

So meaning my index value should be 3

or in this scenario

    [nil, "Pending Verification", nil, "Bla"]

it should be 2

How can i do this in ruby?