Fix keep_if for ruby 187