In the short story "The Cop and the Anthem" by O. Henry, the homeless man Soapy tries desperately to commit a crime that will land him a few months of prison time at Blackwell's Island (a former New York prison located on what is now known as Roosevelt Island). Soapy tries various schemes to get himself arrested, finally succeeding after loitering around a church and ironically convincing himself to turn his life around.
Soapy's first plan is to enter a fancy restaurant on Broadway Street, order some food, and then tell the restaurant that he has no money to pay for the meal (we can assume this is actually true). Though he is homeless, he believes that he looks well enough from the waist up to be accepted into the restaurant. When he tries to enter, however, the man at the door turns him away because of his tattered pants and old, worn-out shoes. Thus, his first plan to get arrested fails.
The ironic thing about this plan is that Soapy believes that because the only part of him people will see is from his torso upwards, the state of his legs and feet don't matter. Yet the man at the door, noticing how bad his legs and shoes look, refuses to let him in on that account. As with Soapy's other failed plans, his logic is sound, but the end result is an ironic failure.