summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-02-06 11:08:20 +0200
committerEli Zaretskii <eliz@gnu.org>2016-02-06 11:08:20 +0200
commit87ae21858adc173c129ff8dfec8ce74cd82e77be (patch)
tree4f1bb96cf27a38ed387746d1bc6e5d6e5bfd3678 /lib-src
parentaa35257118a09ff8c90d5dc364e8dc65e2fbd6dd (diff)
downloademacs-87ae21858adc173c129ff8dfec8ce74cd82e77be.tar.gz
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.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c6
1 files changed, 5 insertions, 1 deletions
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;