- assigned_to: nobody --> elliotth
- summary: ctags5.6 can't parse Ruby's singleton class definition --> ctags5.6 can\'t parse Ruby\'s singleton class definition
ctags5.6 can't parse Ruby's singleton class
definition.
For example, if there is following script,
class << expression
end
We expect following result.
expression example.rb /^class <<
expression$/;" c
But ctags5.6 doesn't output anything.
This is because parseIdentifier in ruby.c returns
K_UNDEFINED,
when it find "<<" after "class" + SPs.
It doesn't parse SPs + "expression".
Anyway, a patch is below.
--- ruby_orig.c Tue Aug 29 09:54:41 2006
+++ ruby.c Tue Aug 29 09:54:56 2006
@@ -186,7 +186,8 @@
/* Check for an anonymous (singleton) class
such as "class << HTTP". */
if (kind == K_CLASS && **cp == '<' && *(*cp +
1) == '<')
{
- return K_UNDEFINED;
+ *cp += 2;
+ skipWhitespace (cp);
}
/* Check for operators such as "def []=(key,
val)". */