Gapsule

From Sonic Retro

Gapsule (ガプセル), found at the end of Flying Battery Zone Act 1, is one of the more bizarre boss battles of the Sonic series, with you battling a trap that looks like an animal prison. It also takes some thinking to figure out how to damage this guy, as he's immune to all direct attacks. Every so often he sends one of his spiked balls (which other times float around to his upper left and upper right on chains) homing in on you. To defeat him, stand on his plunger and wait for his eyes to blink; that's the signal that he's about to send a ball flying toward you. Then quickly run off the plunger, being careful not to touch a spiked ball. The spiked ball will hit the plunger, damaging him. Repeat for a total six times and you've won.