Remove unnecessary non-capture statement and add look-behind to the Ruby `end` rules.