3

Interesting bug in ruby-mode. When a variable called index is followed by a slash /, syntax highlighting breaks.

Here's a screenshot to show you what I mean:

fun syntax highlighting bug in ruby-mode

I'm not really sure how to file a ticket on the ruby-mode repo since I've never used SVN. Anyone know where to go from here?

4
  • 1
    To report a bug in ruby-mode, you should M-x report-emacs-bug. ruby-mode is distributed with Emacs. I can reproduce the problem, but the way to fix it is non-obvious, and it doesn't seem inappropriate to have that discussion in StackExchange. Thanks.
    – Dmitry
    Commented Jun 7, 2016 at 21:14
  • it doesn't seem inappropriate to have that discussion in StackExchange. Was that an intentional double-negative? Are you saying it is appropriate to have that discussion here?
    – harumph
    Commented Jun 7, 2016 at 21:50
  • Right, sorry. It was a result of a sloppy edit.
    – Dmitry
    Commented Jun 7, 2016 at 22:39
  • Interestingly it only happens with index, if you change the var's name is goes ok. Commented Apr 9, 2020 at 13:07

2 Answers 2

3

Good news everyone!

This is now fixed upstream, and will be in the next Emacs release (29.2).

14
  • I'm not sure I understand why distinguishing between a method on a string and a variable name is ambiguous. Wouldn't any variable name that also happens to be a method on a literal be problematic, in that case?
    – harumph
    Commented Jun 7, 2016 at 23:00
  • Also, I am going to submit a bug report.
    – harumph
    Commented Jun 7, 2016 at 23:01
  • The ambiguity I'm referring to here is between regexp delimiters and division.
    – Dmitry
    Commented Jun 7, 2016 at 23:05
  • Upvotes are nice and all, but would somebody file the bug?
    – Dmitry
    Commented Jun 15, 2016 at 12:20
  • 1
    Just want to add that I couldn't find the bug report if you did add it, and sent one in myself: debbugs.gnu.org/cgi/bugreport.cgi?bug=67569
    – mjhoy
    Commented Dec 1, 2023 at 16:01
0

FWIW, if you use enh-ruby-mode, that problem doesn't occur.

https://github.com/zenspider/enhanced-ruby-mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.