git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] diff: add ruby funcname pattern
@ 2008-07-31  7:21 Giuseppe Bilotta
  2008-08-01  7:30 ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Giuseppe Bilotta @ 2008-07-31  7:21 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Giuseppe Bilotta

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-08-02 15:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31  7:21 [PATCH] diff: add ruby funcname pattern Giuseppe Bilotta
2008-08-01  7:30 ` Junio C Hamano
2008-08-01  8:11   ` Giuseppe Bilotta
2008-08-01  8:20     ` Junio C Hamano
2008-08-01  8:39       ` Giuseppe Bilotta
2008-08-01 14:41       ` Jeff King
2008-08-02  0:31       ` Kevin Ballard
2008-08-02  3:50         ` Junio C Hamano
2008-08-02  5:41         ` Giuseppe Bilotta
2008-08-02  5:47           ` Kevin Ballard
2008-08-02  6:06             ` Giuseppe Bilotta
2008-08-02 11:39               ` Johannes Schindelin
2008-08-02 11:50                 ` Giuseppe Bilotta
2008-08-02 15:37             ` Lee Marlow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).