jacott / Enhanced-Ruby-Mode

An enhanced ruby-mode for Emacs that uses Ripper in ruby 1.9.2 to highlight and indent the source code
Other
53 stars 64 forks source link

ruby-end-of-defun does not work #9

Closed Jell closed 12 years ago

Jell commented 12 years ago

If I run M-x ruby-end-of-defun in this file, where | is the position of the cursor:

def te|st
  "test"
end

The cursor ends up here:

def test
  "test"
|end

Instead of here:

def test
  "test"
end|

Even worse, if I run it at this position:

def test
  "test"
e|nd

Then the CPU usage goes up to 100% and emacs is frozen in an infinite loop.

jacott commented 12 years ago

Fixed. Also fixed bug in ruby-beginning-of-defun.