The Somali piracy incident turned out OK.
On the other hand, there is this from the UK. The commenters are rightly aghast. Suppose a British ship stops a vessel that has been taken by pirates. Now what? They can't detain the pirates, and they can't let them take the stolen boat. They would have to call for a naval vessel from another country. I can partially understand not turning them over to the barely-existing Somali government, but why not try them for piracy in the UK? The UN document on this says:
On the high seas, or in any other place outside the jurisdiction of any State, every State may seize a pirate ship or aircraft, or a ship or aircraft taken by piracy and under the control of pirates, and arrest the persons and seize the property on board. The courts of the State which carried out the seizure may decide upon the penalties to be imposed, and may also determine the action to be taken with regard to the ships, aircraft or property, subject to the rights of third parties acting in good faith.
I also have a wild thought regarding unintended consequences. The alleged basis for this is human rights. But, regarding the above scenario, suppose there are no other ships around? Wouldn't the British sailors technically be obligated to throw the pirates overboard? That strikes me as a bigger human rights violation, although it does seem more in keeping with High Seas tradition. I'm guessing this will be changed before they have to start making people walk the plank.