“PBS Kids programs are designed to reflect the diversity of communities across the nation,” Maria Vera Whelan, the senior director of marketing, communications and social media for children’s media and education at PBS, said in a statement. “We believe it is important to represent the wide array of adults in the lives of children who look to PBS Kids every day.”

In the episode, the students start to play matchmaker when they suspect that Mr. Ratburn might be marrying Patty, a woman they think is ill-suited for him. (She’s actually his sister.)

They try to set him up with a librarian, but it doesn’t work out. On the day of the wedding, Mr. Ratburn walks down the aisle arm in arm with Patrick, his partner. They smile at each other, and Patrick winks at Arthur in the crowd. Afterward, the students eat cake (Mr. Ratburn’s favorite), which was shown earlier in the episode with two toppers that resemble Mr. Ratburn and Patrick.

“Arthur” isn’t the only animated children’s show to recently feature same-sex weddings or relationships. Last summer the Cartoon Network series “Steven Universe” depicted a same-sex wedding in which the main character, Steven, officiated the nuptials of two female characters, Ruby and Sapphire. Another Cartoon Network series, “Adventure Time,” established a same-sex relationship when two main characters, Princess Bubblegum and Marceline the Vampire Queen, kissed.

“Sesame Street,” a PBS mainstay, has also tried to become inclusive. In 2017, the show introduced Julia, a female muppet who has autism. In September, the internet exploded over the possibility that Bert and Ernie might be partners. In December, the show introduced Lily, a muppet who is homeless and living in shelters and on friends’ couches.