The only reason Ruby was able to shoot Oswald, was because Oswald wanted a different shirt and it delayed his transfer for about an hour.
Had the Dallas PD told him to wear the shirt he had, Ruby would have showed up after Oswald was gone.
It is tradition to give a condemned man a last request. He wanted to die in a different shirt by gum. And so he did.
Your assumption is only valid if there was no conspiracy to kill him. But there was, no matter the attempts at placing the blame on a irrational random act. Ruby knew very well when the transfer was going to take place.
But if you buy into one theory, he’d just have had to get him another time. That theory being that Oswald, Ruby, and Tippit were co-conspirators, members of a cell you might say, and each was given orders to take out one of the others. Oswald killed Tippit while he was on the run and Ruby’s orders were to kill Oswald. Was this Ruby’s plan and that’s why he alone survived? Who knows.
There was way too much happenstance in Rubys murder of Oswald for it to be preplanned.
So Oswald was in on the plot to murder him.