According to Jeroen:
This is not just def in Ruby. It's all highlighting based on keywords. Keywords preceeded by characters works okay, but keywords followed by
OK.
IMO keywords should only be highlighted if they are not followed by alphanumeric characters or '_'.
Could be language dependent but something close to that yes.
While I'm in the Ruby mode, folding works only for def..end pairs, not class..end, module..end or if..then..else..end.