Sublime Forum

Ruby syntax highlighting for endless methods

#1

In Ruby 3.1 there is a new supported syntax for “endless methods” - which are methods without end.

So, this method:

def monthly_min
  monthly_change[:change].min
end

can be written like this:

def monthly_min = monthly_change[:change].min

The syntax highlighting in Sublime text does not handle the new syntax properly.
Notice that in some cases it knows what to do, but not in others - as can be seen in teh below screenshot.

0 Likes

#2

There’s an issue for this on the official tracker: https://github.com/sublimehq/Packages/issues/3223

1 Like

#3

Excellent, thanks - I was looking for the correct repo to submit this issue.

0 Likes