וַיֻּגַּ֗ד לַמֶּ֣לֶךְ דָּוִד֮ לֵאמֹר֒ בֵּרַ֣ךְ יְהוָ֗ה אֶת־בֵּ֨ית עֹבֵ֤ד אֱדֹם֙ וְאֶת־כָּל־אֲשֶׁר־ל֔וֹ בַּעֲב֖וּר אֲר֣וֹן הָאֱלֹהִ֑ים וַיֵּ֣לֶךְ דָּוִ֗ד וַיַּעַל֩ אֶת־אֲר֨וֹן הָאֱלֹהִ֜ים מִבֵּ֨ית עֹבֵ֥ד אֱדֹ֛ם עִ֥יר דָּוִ֖ד בְּשִׂמְחָֽה׃
И было сказано царю Давиду: 'Господь благословил дом Овед-Едома и все, что к нему, из-за ковчега Божия.' И пришел Давид и с радостью поднял ковчег Божий из дома Овед-Едома в город Давидов.
Rashi
והוקע — This is “hanging”, just as we find in the case of Saul’s sons, (II Samuel XXL 6) “And we will kill them by הוקעה unto the Lord”, and there (II Samuel vv. 12—13) hanging is distinctly mentioned (Sanhedrin 34b). It is true that idolatry (the sin committed here) is punishable by stoning, but all who were stoned were also hanged (Sanhedrin 45b).