From 87ae21858adc173c129ff8dfec8ce74cd82e77be Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 Feb 2016 11:08:20 +0200 Subject: Extend etags Ruby support for accessors * lib-src/etags.c (Ruby_functions): Support accessors defined with parentheses. (Bug#22563) * test/etags/ruby-src/test1.ru (A::B): Add tests for accessors defined with parentheses. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tests. --- lib-src/etags.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/etags.c b/lib-src/etags.c index 0f5bfa3a951..182cb4cc876 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4730,8 +4730,12 @@ Ruby_functions (FILE *inf) if (reader || writer || alias) { do { - char *np = cp; + char *np; + cp = skip_spaces (cp); + if (*cp == '(') + cp = skip_spaces (cp + 1); + np = cp; cp = skip_name (cp); if (*np != ':') continue; -- cgit v1.2.1