ruby-mode has a number of shortcomings in terms of dealing with ruby
syntax correctly, some of them rather serious.
1) Here-strings aren't handled at all.
2) As far as I can tell, regexp literals aren't even recognized, leading
to a number of serious issues.
3) General delimited input forms of literals are not handled.
4) Expression substitution inside strings doesn't parse the expression
as ruby code, instead just setting it all to one color, making it harder
to read, which also leads to issues 5 and 6.
5) Expression substitutions which contain nested curly brackets are
shown as ending at the first '}' encountered, rather than at the correct
nesting level.
6) Multiline expression substitutions in a string don't work.
7) Expression substitutions are highlighted as such inside single-quoted
strings and =begin/=end blocks, where they shouldn't be.
8) Text between =begin and =end lines still gets indented like it was
ruby code.
9) Lines ending with a '\' don't indent the following line. (as happens
with other situations where the newline won't be considered a statement
end)
10) Empty argument lists in blocks (such as "2.times do || \n stuff \n
end") cause incorrect indentation (they are interpreted as the '||'
operator, I expect).
11) 'BEGIN','END', and 'defined?' should be treated as keywords
See http://www.ruby-doc.org/docs/ruby-doc-bundle/Manual/man-
1.4/syntax.html for a helpful complete description of ruby syntax.
|