diff: add ruby funcname pattern
Provide a regexp that catches class, module and method definitions in Ruby scripts, since the built-in default only finds classes. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Giuseppe Bilotta committed
Jul 31, 2008 at 09:21 UTC
ad8c1d92600da963692d57c213979e638c357f1a
1 file changed
+1
diff.c
+1
@@ -1381,6 +1381,7 @@ static struct builtin_funcname_pattern {
1381
"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
1382
"[ ]*([^;]*\\)$" },
1383
{ "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
1384
+ { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
1385
};
1386
1387
static const char *diff_funcname_pattern(struct diff_filespec *one)