It's such a British expression

That Realist II story must be one of the first times I heard it, although perhaps it was some other British-style school story. It's a very powerful social sanction in a boarding school, since if your schoolmates stop talking to you there you are left with no social relations.
Because it's so dramatic, it also appears in non-spanking boarding school stories. Like for example, in The Fifth Form at St. Dominic's (published 1881), the best known of the school novels by Talbot Baines Reed, one of the main characters, Oliver Greenfield, is sent to Coventry because his peers believe he cheated in a scholarship exam, thus taking a scholarship that he did nor deserve (and to add more drama, the one supposedly cheated, as he came in second, was his best friend). Only, Greenfield proves to be a tough nut to crack:
Were you ever at Coventry, reader? I don’t mean the quaint old Warwickshire city, but that other place where from morning till night you are shunned and avoided by everybody? Where friends with whom you were once on the most intimate terms now pass you without a word, or look another way as you go by? Where, whichever way you go, you find yourself alone? Where every one you speak to is deaf, every one you appear before is blind, every one you go near has business somewhere else? Where you will be left undisturbed in your study for a week, to fag for yourself, study by yourself, disport yourself with yourself? Where in the playground you will be as solitary as if you were in the desert, in school you will be a class by yourself, and even in church on Sundays you will feel hopelessly out in the cold among your fellow-worshippers?
If you have ever been to such a place, you can imagine Oliver Greenfield’s experiences during this Christmas term at Saint Dominic’s.
When the gentlemen of the Fifth Form had once made up their minds to anything, they generally carried it through with great heartiness, and certainly they never succeeded better in any undertaking than in this of “leaving Oliver to himself.”
The only drawback to their success was that the proceeding appeared to have little or no effect on the very person on whose behalf it was undertaken. Not that Oliver could be quite insensible of the honours paid him. He could not—they were too marked for that. And without doubt they were as unpleasant as they were unmistakable. But, for any sign of unhappiness he displayed, the whole affair might have been a matter of supreme indifference to him. Indeed, it looked quite as much as if Greenfield had sent the Fifth to Coventry as the Fifth Greenfield. If they determined none of them to speak to him, he was equally determined none of them should have the chance; and if it was part of their scheme to leave him as much as possible to himself, they had little trouble in doing it, for he, except when inevitable, never came near them.
Of course this was dreadfully irritating to the Fifth! The moral revenge they had promised themselves on the disgracer of their class never seemed to come off. The wind was taken out of their sails at every turn. The object of their aversion was certainly not reduced to humility or penitence by their conduct; on the contrary, one or two of them felt decidedly inclined to be ashamed of themselves and feel foolish when they met their victim.
Oliver always had been a queer fellow, and he now came out in a queerer light than ever.
Having once seen how the wind lay, and what he had to expect from the Fifth, he altered the course of his life to suit the new circumstances with the greatest coolness. Instead of going up the river in a pair-oar or a four, he now went up in a sculling boat or a canoe, and seemed to enjoy himself quite as much. Instead of doing his work with Wraysford evening after evening, he now did it undisturbed by himself, and, to judge by his progress in class, more successfully than ever. Instead of practising with the fifteens at football, he went in for a regular course of practice in the gymnasium, and devoted himself with remarkable success to the horizontal bar and the high jump. Instead of casting in his lot in class with a jovial though somewhat distracting set, he now kept his mind free for his studies, and earned the frequent commendation of the Doctor and Mr Jellicott.