Ah, thanks. I scanned those so many times but I never caught it. I think I'm used to not reading the header because, as this points out, it isn't always useful.
I use these a lot when someone sends a patch, I'll use `vim -t <function>` to jump to the definition of <function> to better understand the change. (Where <function> is from the header of the hunk.)
In the first diff after the @@ there's a reference to the enclosing class, in the second diff it's a reference to the enclosing method.
Which could help perhaps if the methods are moved?
The second one shows the changed lines' context as a method definition "def tickets_as_html" instead of the mostly-useless "class TicketPdf".
What this really needed was a diff for their own example
The second diff identifies the target of the changes more precisely - method vs class