1
0
mirror of https://github.com/git/git.git synced 2024-11-20 14:34:03 +01:00

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>
This commit is contained in:
Giuseppe Bilotta 2008-07-31 09:21:48 +02:00 committed by Junio C Hamano
parent 5cbef01aab
commit ad8c1d9260

1
diff.c

@ -1381,6 +1381,7 @@ static struct builtin_funcname_pattern {
"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
"[ ]*([^;]*\\)$" },
{ "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
};
static const char *diff_funcname_pattern(struct diff_filespec *one)