Declarer did not find the best line, but North took his eye off the ball and it made anyway.
Against the unscientific punt North led the eight of diamonds, covered with the queen, king and ruffed. Declarer might cross to a top spade and lead dummy’s heart. If South wins declarer has two heart tricks, but he will have to ruff a diamond high and finesse spades; if South ducks two ruffs bring down his ace. Declarer actually played ace, king of spades, then led the jack of diamonds, ruffing away South’s ace. Next he cashed the three top clubs, discarding dummy’s heart, and noting the fall of North’s jack. This was the position after declarer had made the first seven tricks:
He led the ten of clubs – and North ruffed with his apparently useless trump. Decalrer overruffed and led the nine of diamonds, covered and ruffed, then ran the heart king to South’s ace. A diamond return gives dummy the rest, so South returned a heart, but declarer discarded a second diamond, making dummy high.
Note the difference if North refuses to ruff. If declarer runs the king of hearts South can give partner a diamond overruff; if he draws the last trump South makes two diamond tricks; if he tries to ruff a diamond North can overruff and cash the ace of hearts.