EMACS with ruby-mode

I'm using EMACS' ruby-mode, and with the following code, "x += 3" gets
highlighted as if it was a string.

  puts %{it's annoying}
  x = 3 + 5

Does anyone know a quick workaround/solution? Is there some Ruby mode
for EMACS that doesn't have this problem?

···

--
Felix E. Klee
Jabber/Google Talk: feklee@jabber.org, SIP: 9779619@sipgate.de
ICQ: 158124695, Yahoo!: feklee, AIM: felix.klee@inka.de
Gizmo: felixklee, Skype: felix.klee

I've found there are a number of syntax highlighting quirks with Ruby mode. I'd love to hear a solution as well. I haven't yet dug into the code myself.

Michael Glaesemann
grzm seespotcode net

···

On Jul 30, 2007, at 8:05 , Felix E. Klee wrote:

I'm using EMACS' ruby-mode, and with the following code, "x += 3" gets
highlighted as if it was a string.

  puts %{it's annoying}
  x = 3 + 5

As a workaround, I now do:

  a = "'"
  puts %{it#{a}s annoying}
  x = 3 + 5

It's not nice, but the broken syntax highlighting is worse, especially
when one uses %{...} all over the place.

···

At Mon, 30 Jul 2007 15:04:19 +0200, Felix E. Klee wrote:

Does anyone know a quick workaround/solution?

--
Felix E. Klee
Jabber/Google Talk: feklee@jabber.org, SIP: 9779619@sipgate.de
ICQ: 158124695, Yahoo!: feklee, AIM: felix.klee@inka.de
Gizmo: felixklee, Skype: felix.klee

Felix E. Klee wrote the following on 30.07.2007 15:05 :

I'm using EMACS' ruby-mode, and with the following code, "x += 3" gets
highlighted as if it was a string.

  puts %{it's annoying}
  x = 3 + 5

Does anyone know a quick workaround/solution? Is there some Ruby mode
for EMACS that doesn't have this problem?
  
None that I'm aware of, but you can try:

puts %{it's annoying} #' yes it is

puts %{it\'s annoying}
x = 3 + 5

or Lionel's suggestion:

puts %{it's annoying} # '
x = 3 + 5

If my elisp-fu were stronger, I'd fix it, but I'm not so good on the emacs syntax table side of things. Especially a monster like ruby.

···

On Jul 30, 2007, at 06:05 , Felix E. Klee wrote:

I'm using EMACS' ruby-mode, and with the following code, "x += 3" gets
highlighted as if it was a string.

  puts %{it's annoying}
  x = 3 + 5

I like that - thanks for the suggestion!

···

At Wed, 1 Aug 2007 01:46:26 +0900, Ryan Davis wrote:

puts %{it\'s annoying}

--
Felix E. Klee
Jabber/Google Talk: feklee@jabber.org, SIP: 9779619@sipgate.de
ICQ: 158124695, Yahoo!: feklee, AIM: felix.klee@inka.de
Gizmo: felixklee, Skype: felix.klee