So, what did Jack think would happen next after he shot Oswald, assuming, that is, that alert Dallas officers didn't shoot him dead at the scene instead of merely arresting him for murder I? What was Jack Ruby's plan?
There's a guy named John Elrod, who claims to have shared a cell with Oswald at Dallas Police HQ. He claimed Oswald told him he had met with Jack Ruby a few days before in connection with some gun-running scheme.
http://www.youtube.com/watch?v=soF14oKklto
The official story is that Oswald didn't have a cellmate, that he was isolated in a cellblock that was otherwise empty except for a Dallas copper sitting on a chair in the hall.
Jack Ruby was dying of cancer, he died shortly after killing Oswald, he had no plan other than killing Oswald, he didn't expect to get away or live through it. The fact he had nothing to lose goes a long way towards justifying the theory he was acting under orders from someone else.