[PATCH] diff: add ruby funcname pattern
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Jul 31, 2008, 07:21 UTC
- Message-ID
- <1217488908-19692-1-git-send-email-giuseppe.bilotta@gmail.com>
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> --- diff.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/diff.c b/diff.c index cbf2547..c253015 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)
-- 1.5.6.3