Last night, fast food chain Arby’s bid farewell to its best frenemy — The Daily Show host Jon Stewart. 
 
 Stewart has frequently used the restaurant chain as a punchline on his show, calling them everything from “a dare for your colon” to “shock and awe for your bowels.” Over the past decade Stewart has even aired brutal fake tag lines like “Arby’s: Technically it’s food,” “Arby’s: Isn’t there something else we can eat?” and “Arby’s: You think pain and grief are hard to digest.” 
 
 While most businesses would revel in the fact that Stewart’s run with The Daily Show is ending and he could no longer use the restaurant as the target of his jokes, Arby’s got the last laugh. The burger chain put together a supercut of Stewart’s harshest words about the restaurant and aired it during one of the final installments of Stewart’s The Daily Show while the Golden Girls’ theme song “Thank You For Being A Friend” played. 
 
 It was a fitting farewell from one frenemy to another. 

 Over the past two years Comedy Central’s Jon Stewart has poked fun at fast-food chain Arby’s dozens of times in segments on the “Daily Show,” routinely linking the brand to cringe-worthy topics from Ebola to digestion problems. 
 
 His on-air quips have included: “Arby’s, for when you’re wondering what it tastes like when a cow dies” and “Arby’s, the meal that is a dare for your colon.” 
 
 But as Mr. Stewart prepares to take his final bow after 16 years as host of his late-night show, Arby’s is among the many well-known brands lining up to bid him farewell. The company bought two ads in the penultimate episode that will air Wednesday. 
 
 That Arby’s would want to partake in the sendoff bonanza despite Mr. Stewart’s merciless lampooning is a testament to the allure of the “Daily Show” to marketers of all stripes, even as the show has aged. It doesn't have a huge audience – it is averaging about 1.2 million viewers this season – but its brand of political (and commercial) satire remains a cultural force, especially with young, affluent people. 
 
 “For this generation of kids he speaks gospel and he is their source of news,” said Tim Brooks, a TV historian. 
 
 Advertisers including T-Mobile, Bud Light and several movie companies such as Weinstein Co. have bought time in Thursday’s finale, according to people familiar with the matter. 
 
 Spots aren’t coming cheap. Marketers are forking over roughly $230,000 for 30 seconds of time in addition to agreeing to make a broader ad buy with channels owned by Comedy Central’s parent company, Viacom Inc., ad buyers said. The finale prices are up significantly from the average ad rates during the second quarter, which were roughly $46,200 for a 30-second spot, according to SQAD, a research company that tracks ad prices. Finale ad prices were first reported by the New York Post. Arby’s declined to comment on how much it paid for its ads in Wednesday’s program. 
 
 The final show will run longer than typical half-hour episodes, though the company says it still hasn’t finalized the exact length. 
 
 Advertisers nowadays are salivating at any sort of major “TV event” like Mr. Stewart’s finale, because they promise big audiences at a time when ratings are plunging across the dial and offer rare opportunities to catch viewers in real-time, when they can’t skip or avoid commercials via their DVR or on-demand services. Viacom is guaranteeing advertisers that ratings for the finale will be up about 80% from the show’s average ratings, ad buyers said. 
 
 Viacom, which reports quarterly earnings Thursday, has sustained some of the biggest rating declines across the industry on its major networks. 
 
 Increased ad dollars from the “Daily Show” won’t change the overall trajectory of Viacom’s ad business, analysts say. Todd Juenger, an analyst at Bernstein is forecasting that ad revenue for Viacom will decline 4% for the year. 
 
 The finale will have a “positive effect on the entire channel,” Jeff Lucas, head of Viacom’s ad sales. “In terms of how we sell and the exact amount, that can be up for debate but it’s definitely a plus,” he added. 
 
 Though Mr. Stewart is best known for send-ups of politicians and media outlets like Fox News, he has given no quarter to corporate America in his comedy. He was ruthless toward financial-services companies after the economic downturn, and has regularly ribbed McDonald’s Corp. and Wal-Mart Stores Inc. 
 
 Arby’s decided it was better to embrace the discussion of its brand by one of television’s icons than to put out a defensive message. The free exposure was welcome, given the company’s relatively meager $120 million ad budget, which pales in comparison to rival fast-food chains. 
 
 Two years ago, “everyone knew what Arby’s was but nobody really talked about Arby’s,” said Rob Lynch, chief marketing officer of Arby’s Restaurant Group Inc., which is owned by private-equity firms led by Roark Capital Group Inc. “We are back in the conversation.” 
 
 When Mr. Stewart announced his retirement from the program in February, Arby’s offered him a job via a tweet, which got retweeted almost 2,000 times, Arby’s said. Mr. Stewart then spent a few minutes during his show ridiculing the company over the tweet. 
 
 Arby’s said the negative comments have not hurt its brand and the resulting online chatter has been largely positive. “Collectively, what is going on has resulted in uplift of business performance,” said Paul Brown, Arby’s chief executive, pointing out that same-store sales were up 9.6% for the first quarter and up 7.6% in the second quarter. 
 
 Arby’s has created two new ads for Wednesday’s show, one that features a montage of the insults that Mr. Stewart has thrown at Arby’s as a version of “Thank You for Being a Friend” plays in the background. Its other ad highlights a new corned beef sandwich, “the Daily Deli,” the chain is naming after the show. The company also says that it will be part of Thursday’s finale in some way, but isn’t buying ad time on the show. 
 
 In part because of his provocative style, the “Daily Show” has been a bright spot among late night-properties, demonstrating an ability to attract “affluent and younger viewers,” said Jason Kanefsky, a media buyer at Havas Media. 
 
 Mr. Stewart’s audience has aged considerably from a median of 29 years in 2000, according to media buyer Horizon Media, to 46 now. But it is still much younger than other high-profile late-night programs. During the first six months of the year, the median age for ABC’s Jimmy Kimmel Live was 56 and NBC’s Tonight Show with Jimmy Fallon had a median age of 54, according to ad-buying and research firm MagnaGlobal. 
 
 The “Daily Show” also has the most affluent viewers among the late-night talk shows, with an average income of $79,500, Magna said. 
 
 The reach of the “Daily Show” on social media is an added attraction for marketers, who believe that when a TV show stimulates social chatter that means that consumers are more engaged and paying closer attention to the show and thus, the ads. 
 
 “If you have to pay a price premium to be part of that, it’s an investment that is justified,” said Alex Lambrecht, vice president of Bud Light.
– Over the past 16 years, Jon Stewart has slammed Arby's almost as much as the New York Mets. But despite jabs that the fast-food chain is "a dare for your colon" and "shock and awe for your bowels," per Time, Arby's apparently doesn't hold a grudge. In fact, it aired a minute-long "ad" during Stewart's penultimate hurrah last night in which it compiled all the bad things Stewart said about its brand over the years, set to "Thank You For Being a Friend," at a cost of about $460,000, according to the Wall Street Journal. "Not sure why, but we'll miss you," the final frame read.