From: Giuseppe Bilotta Date: Thu, 31 Jul 2008 07:21:48 +0000 (+0200) Subject: diff: add ruby funcname pattern X-Git-Tag: v1.6.0-rc2~35 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ad8c1d92600da963692d57c213979e638c357f1a;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index cbf25473c..c253015c5 100644 --- a/diff.c +++ b/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)