language-ruby icon indicating copy to clipboard operation
language-ruby copied to clipboard

Not recognizing #gsub! as a keyword

Open ninoM opened this issue 7 years ago • 1 comments

Description

Ruby recognizes gsub as a keyword and lights up but does not recognize gsub! as one. Sample Image

Versions

Version 1.13.0

ninoM avatar Jan 18 '17 17:01 ninoM

gsub! not a method on Kernel as of Ruby 1.8.7, which is quite old. Check out the list of methods on Kernel.

It's worth pointing out that this grammar optimistically highlights kernel method names even if they're not called in the Kernel namespace, so "foo".gsub highlights gsub even though String#gsub != Kernel.gsub. There is no easy solution to this, since this is just a syntax highlighter.

stevenpetryk avatar Sep 25 '17 16:09 stevenpetryk