What is the comparison of irony between "The Gift of the Magi" and "The Ransom of Red Chief" by O. Henry?
Clearly both of these stories are ironic, at least in the sense of things not turning out the way you would expect them to. So in that sense, they're similiar -- they both have surprise endings.
What's different about the two is the nature of the irony. In "The Gift of the Magi," the irony is bittersweet. It makes us feel sorry for the main characters. In the other story, the irony is much more amusing. I suppose you could feel sorry for the kidnappers, but really, they were criminals and got what they deserved. It's more natural to laugh at them for getting into that predicament.
So the two stories are very different since the ironic endings provoke very different responses in the reader.