Created
February 10, 2012 00:38
-
-
Save paulv/1784825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-mode 1.1 indents the following code like this | |
if true | |
val = string.split(/=/) | |
puts val | |
end | |
The puts line should be indented so that it matches the val line. | |
If you look at line 522 of ruby-mode.el (version 1.1, from elpa, I suspect other versions have the same code at possibly different line numbers) it says | |
((looking-at "/=") | |
(goto-char pnt)) | |
if you change that to | |
((and (looking-at "/=") (not (looking-at "/=/")) | |
(goto-char pnt))) | |
the above example is indented correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment