textmate / ruby.tmbundle

TextMate support for Ruby
178 stars 91 forks source link

Incorrect highlighting after method definition with end of line comment #103

Closed noniq closed 8 years ago

noniq commented 8 years ago

Example to reproduce:

def foo(_) #
  ["a", "b"]
end

Screenshot: bildschirmfoto 2016-08-08 um 19 12 36

Does not happen if the comment sign is removed, if there are no parens around the method argument, or if there are no method arguments at all.

noniq commented 8 years ago

It seems this can be fixed by changing the regexp for matching the end of the argument list (line 158) from (?=,|\)\s*$) to (?=,|\)\s*($|#)), but not sure if this causes unwanted side effects.

infininight commented 8 years ago

Fixed, thanks for the report!