Green’s Dictionary of Slang

rib n.2

[rib v. (5)]

1. (US) a joke, a trick, an act of teasing.

[US]W. Winchell On Broadway 28 Nov. [synd. col.] Club 18, where the clowns ‘louse up’ anybody. The bigger the shot, the bigger the rib.
[US]J.E. Dadswell Hey, Sucker 103: A ‘rib’ is what normal folks call ‘a dirty dig’.
[US]R. Chandler Long Good-Bye 242: Must have been some kind of a rib. Only Magoon ain’t feeling funny, what with both arms in casts.
[US]M. Braly Shake Him Till He Rattles (1964) 136: Is this some kind of a rib?
H. Acosta ‘Doing the Job’ in ThugLit Dec. [ebook] ‘It started as just another rib, a joke to pass the time, but—’.

2. (US Und.) an act of setting up an innocent person.

[US] ‘Und. and Its Vernacular’ in Clues mag. 158—62: rib Frame up.

In phrases

give someone the rib (v.)

to tease.

[US]J. Thompson Savage Night (1991) 19: I heard you giving him the rib.
[US](con. 1950s) McAleer & Dickson Unit Pride (1981) 220: He knew I was giving him the rib. [Ibid.] 217: Y’all wouldn’t be givin’ us the rib now, would y’all?