diff options
| author | Eli Zaretskii | 2016-01-30 14:16:36 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-30 14:16:36 +0200 |
| commit | 25b79d7bc71079cd6ebb2700623e7e3b76b03287 (patch) | |
| tree | 1654109110b07b8ebf8fd9b9196e73f2d4553972 | |
| parent | ccc3b3cd68312e1d69d9f9af943ee2b9a9d88198 (diff) | |
| download | emacs-25b79d7bc71079cd6ebb2700623e7e3b76b03287.tar.gz emacs-25b79d7bc71079cd6ebb2700623e7e3b76b03287.zip | |
Improve Ruby support in 'etags'
* lib-src/etags.c (Ruby_functions): Tag constants. Don't tag
singleton classes. Remove class qualifiers from tags generated
for method and constant names. (Bug#22241)
* doc/emacs/maintaining.texi (Tag Syntax): Mention that constants
are tagged by etags in Ruby.
* etc/NEWS: Mention that constants are tagged by etags in Ruby.
* test/etags/ruby-src/test1.ruby: Add more tests.
* 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 the changes in etags and in Ruby
tests.
| -rw-r--r-- | doc/emacs/maintaining.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lib-src/etags.c | 58 | ||||
| -rw-r--r-- | test/etags/CTAGS.good | 11 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_1 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_2 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_3 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_4 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_5 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_6 | 15 | ||||
| -rw-r--r-- | test/etags/ruby-src/test1.ruby | 22 |
11 files changed, 154 insertions, 33 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 471a16b57de..7039de63e53 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -2264,7 +2264,7 @@ generate a tag. | |||
| 2264 | 2264 | ||
| 2265 | @item | 2265 | @item |
| 2266 | In Ruby code, @code{def} or @code{class} or @code{module} at the | 2266 | In Ruby code, @code{def} or @code{class} or @code{module} at the |
| 2267 | beginning of a line generate a tag. | 2267 | beginning of a line generate a tag. Constants also generate tags. |
| 2268 | @end itemize | 2268 | @end itemize |
| 2269 | 2269 | ||
| 2270 | You can also generate tags based on regexp matching (@pxref{Etags | 2270 | You can also generate tags based on regexp matching (@pxref{Etags |
| @@ -1830,8 +1830,8 @@ qualified names by hand. | |||
| 1830 | +++ | 1830 | +++ |
| 1831 | *** New language Ruby | 1831 | *** New language Ruby |
| 1832 | 1832 | ||
| 1833 | Names of modules, classes, methods, and functions are tagged. | 1833 | Names of modules, classes, methods, functions, and constants are |
| 1834 | Overloaded operators are also tagged. | 1834 | tagged. Overloaded operators are also tagged. |
| 1835 | 1835 | ||
| 1836 | +++ | 1836 | +++ |
| 1837 | *** Improved support for Lua | 1837 | *** Improved support for Lua |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 54ed1b428e9..adc08a23678 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -4550,18 +4550,68 @@ Ruby_functions (FILE *inf) | |||
| 4550 | 4550 | ||
| 4551 | LOOP_ON_INPUT_LINES (inf, lb, cp) | 4551 | LOOP_ON_INPUT_LINES (inf, lb, cp) |
| 4552 | { | 4552 | { |
| 4553 | bool is_class = false; | ||
| 4554 | bool is_method = false; | ||
| 4555 | char *name; | ||
| 4556 | |||
| 4553 | cp = skip_spaces (cp); | 4557 | cp = skip_spaces (cp); |
| 4554 | if (LOOKING_AT (cp, "def") | 4558 | if (c_isalpha (*cp) && c_isupper (*cp)) /* constants */ |
| 4555 | || LOOKING_AT (cp, "class") | ||
| 4556 | || LOOKING_AT (cp, "module")) | ||
| 4557 | { | 4559 | { |
| 4558 | char *name = cp; | 4560 | char *bp, *colon = NULL; |
| 4561 | |||
| 4562 | name = cp; | ||
| 4563 | |||
| 4564 | for (cp++; c_isalnum (*cp) || *cp == '_' || *cp == ':'; cp++) | ||
| 4565 | { | ||
| 4566 | if (*cp == ':') | ||
| 4567 | colon = cp; | ||
| 4568 | } | ||
| 4569 | if (cp > name + 1) | ||
| 4570 | { | ||
| 4571 | bp = skip_spaces (cp); | ||
| 4572 | if (*bp == '=' && c_isspace (bp[1])) | ||
| 4573 | { | ||
| 4574 | if (colon && !c_isspace (colon[1])) | ||
| 4575 | name = colon + 1; | ||
| 4576 | make_tag (name, cp - name, false, | ||
| 4577 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | ||
| 4578 | } | ||
| 4579 | } | ||
| 4580 | } | ||
| 4581 | else if ((is_method = LOOKING_AT (cp, "def")) /* module/class/method */ | ||
| 4582 | || (is_class = LOOKING_AT (cp, "class")) | ||
| 4583 | || LOOKING_AT (cp, "module")) | ||
| 4584 | { | ||
| 4585 | const char self_name[] = "self."; | ||
| 4586 | const size_t self_size1 = sizeof ("self.") - 1; | ||
| 4587 | |||
| 4588 | name = cp; | ||
| 4559 | 4589 | ||
| 4560 | /* Ruby method names can end in a '='. Also, operator overloading can | 4590 | /* Ruby method names can end in a '='. Also, operator overloading can |
| 4561 | define operators whose names include '='. */ | 4591 | define operators whose names include '='. */ |
| 4562 | while (!notinname (*cp) || *cp == '=') | 4592 | while (!notinname (*cp) || *cp == '=') |
| 4563 | cp++; | 4593 | cp++; |
| 4564 | 4594 | ||
| 4595 | /* Remove "self." from the method name. */ | ||
| 4596 | if (cp - name > self_size1 | ||
| 4597 | && strneq (name, self_name, self_size1)) | ||
| 4598 | name += self_size1; | ||
| 4599 | |||
| 4600 | /* Remove the class/module qualifiers from method names. */ | ||
| 4601 | if (is_method) | ||
| 4602 | { | ||
| 4603 | char *q; | ||
| 4604 | |||
| 4605 | for (q = name; q < cp && *q != '.'; q++) | ||
| 4606 | ; | ||
| 4607 | if (q < cp - 1) /* punt if we see just "FOO." */ | ||
| 4608 | name = q + 1; | ||
| 4609 | } | ||
| 4610 | |||
| 4611 | /* Don't tag singleton classes. */ | ||
| 4612 | if (is_class && strneq (name, "<<", 2) && cp == name + 2) | ||
| 4613 | continue; | ||
| 4614 | |||
| 4565 | make_tag (name, cp - name, true, | 4615 | make_tag (name, cp - name, true, |
| 4566 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4616 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4567 | } | 4617 | } |
diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index 1c494d64277..86eb9f85cf3 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good | |||
| @@ -227,6 +227,8 @@ A cp-src/c.C 117 | |||
| 227 | A cp-src/fail.C 7 | 227 | A cp-src/fail.C 7 |
| 228 | A cp-src/fail.C 23 | 228 | A cp-src/fail.C 23 |
| 229 | A ruby-src/test1.ruby /^class A$/ | 229 | A ruby-src/test1.ruby /^class A$/ |
| 230 | A ruby-src/test1.ruby /^module A$/ | ||
| 231 | ABC ruby-src/test1.ruby 11 | ||
| 230 | ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/ | 232 | ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/ |
| 231 | ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378 | 233 | ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378 |
| 232 | ALLOCATED_BEFORE_DUMPING c-src/emacs/src/gmalloc.c /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/ | 234 | ALLOCATED_BEFORE_DUMPING c-src/emacs/src/gmalloc.c /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/ |
| @@ -289,6 +291,7 @@ B cp-src/c.C /^void B::B() {}$/ | |||
| 289 | B cp-src/c.C 122 | 291 | B cp-src/c.C 122 |
| 290 | B cp-src/fail.C 8 | 292 | B cp-src/fail.C 8 |
| 291 | B cp-src/fail.C 24 | 293 | B cp-src/fail.C 24 |
| 294 | B ruby-src/test1.ruby /^ class B$/ | ||
| 292 | BE_Node cp-src/c.C /^void BE_Node::BE_Node() {}$/ | 295 | BE_Node cp-src/c.C /^void BE_Node::BE_Node() {}$/ |
| 293 | BE_Node cp-src/c.C 77 | 296 | BE_Node cp-src/c.C 77 |
| 294 | BITS_PER_BITS_WORD c-src/emacs/src/lisp.h 125 | 297 | BITS_PER_BITS_WORD c-src/emacs/src/lisp.h 125 |
| @@ -438,7 +441,6 @@ Cjava_entries c-src/etags.c /^Cjava_entries (FILE *inf)$/ | |||
| 438 | Cjava_help c-src/etags.c 551 | 441 | Cjava_help c-src/etags.c 551 |
| 439 | Cjava_suffixes c-src/etags.c 549 | 442 | Cjava_suffixes c-src/etags.c 549 |
| 440 | ClassExample ruby-src/test.rb /^ class ClassExample$/ | 443 | ClassExample ruby-src/test.rb /^ class ClassExample$/ |
| 441 | ClassExample.class_method ruby-src/test.rb /^ def ClassExample.class_method$/ | ||
| 442 | Clear/p ada-src/2ataspri.adb /^ procedure Clear (Cell : in out TAS_Cell) is$/ | 444 | Clear/p ada-src/2ataspri.adb /^ procedure Clear (Cell : in out TAS_Cell) is$/ |
| 443 | Clear/p ada-src/2ataspri.ads /^ procedure Clear (Cell : in out TAS_Cell)/ | 445 | Clear/p ada-src/2ataspri.ads /^ procedure Clear (Cell : in out TAS_Cell)/ |
| 444 | Cobol_help c-src/etags.c 558 | 446 | Cobol_help c-src/etags.c 558 |
| @@ -458,6 +460,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat | |||
| 458 | Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ | 460 | Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ |
| 459 | Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ | 461 | Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ |
| 460 | ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ | 462 | ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ |
| 463 | Constant ruby-src/test1.ruby 26 | ||
| 461 | ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ | 464 | ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ |
| 462 | Controls pyt-src/server.py /^class Controls:$/ | 465 | Controls pyt-src/server.py /^class Controls:$/ |
| 463 | CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ | 466 | CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ |
| @@ -939,7 +942,6 @@ Metags c-src/etags.c /^main (int argc, char **argv)$/ | |||
| 939 | Mfail cp-src/fail.C /^main()$/ | 942 | Mfail cp-src/fail.C /^main()$/ |
| 940 | Mkai-test.pl perl-src/kai-test.pl /^package main;$/ | 943 | Mkai-test.pl perl-src/kai-test.pl /^package main;$/ |
| 941 | ModuleExample ruby-src/test.rb /^module ModuleExample$/ | 944 | ModuleExample ruby-src/test.rb /^module ModuleExample$/ |
| 942 | ModuleExample.module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/ | ||
| 943 | More_Lisp_Bits c-src/emacs/src/lisp.h 801 | 945 | More_Lisp_Bits c-src/emacs/src/lisp.h 801 |
| 944 | MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/ | 946 | MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/ |
| 945 | MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ | 947 | MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ |
| @@ -2351,6 +2353,7 @@ __str__ pyt-src/server.py /^ def __str__(self):$/ | |||
| 2351 | __up c.c 160 | 2353 | __up c.c 160 |
| 2352 | _aligned_blocks c-src/emacs/src/gmalloc.c 1004 | 2354 | _aligned_blocks c-src/emacs/src/gmalloc.c 1004 |
| 2353 | _aligned_blocks_mutex c-src/emacs/src/gmalloc.c 518 | 2355 | _aligned_blocks_mutex c-src/emacs/src/gmalloc.c 518 |
| 2356 | _bar? ruby-src/test1.ruby /^ def self._bar?(abc)$/ | ||
| 2354 | _bytes_free c-src/emacs/src/gmalloc.c 376 | 2357 | _bytes_free c-src/emacs/src/gmalloc.c 376 |
| 2355 | _bytes_used c-src/emacs/src/gmalloc.c 374 | 2358 | _bytes_used c-src/emacs/src/gmalloc.c 374 |
| 2356 | _chunks_free c-src/emacs/src/gmalloc.c 375 | 2359 | _chunks_free c-src/emacs/src/gmalloc.c 375 |
| @@ -2620,6 +2623,7 @@ childDidExit objc-src/Subprocess.m /^- childDidExit$/ | |||
| 2620 | chunks_free c-src/emacs/src/gmalloc.c 313 | 2623 | chunks_free c-src/emacs/src/gmalloc.c 313 |
| 2621 | chunks_used c-src/emacs/src/gmalloc.c 311 | 2624 | chunks_used c-src/emacs/src/gmalloc.c 311 |
| 2622 | cjava c-src/etags.c 2936 | 2625 | cjava c-src/etags.c 2936 |
| 2626 | class_method ruby-src/test.rb /^ def ClassExample.class_method$/ | ||
| 2623 | classifyLine php-src/lce_functions.php /^ function classifyLine($line)$/ | 2627 | classifyLine php-src/lce_functions.php /^ function classifyLine($line)$/ |
| 2624 | clear cp-src/conway.hpp /^ void clear(void) { alive = 0; }$/ | 2628 | clear cp-src/conway.hpp /^ void clear(void) { alive = 0; }$/ |
| 2625 | clear-abbrev-table c-src/abbrev.c /^DEFUN ("clear-abbrev-table", Fclear_abbrev_table, / | 2629 | clear-abbrev-table c-src/abbrev.c /^DEFUN ("clear-abbrev-table", Fclear_abbrev_table, / |
| @@ -2952,6 +2956,7 @@ foo f-src/entry.for /^ character*(*) function foo()$/ | |||
| 2952 | foo f-src/entry.strange_suffix /^ character*(*) function foo()$/ | 2956 | foo f-src/entry.strange_suffix /^ character*(*) function foo()$/ |
| 2953 | foo f-src/entry.strange /^ character*(*) function foo()$/ | 2957 | foo f-src/entry.strange /^ character*(*) function foo()$/ |
| 2954 | foo php-src/ptest.php /^foo()$/ | 2958 | foo php-src/ptest.php /^foo()$/ |
| 2959 | foo! ruby-src/test1.ruby /^ def foo!$/ | ||
| 2955 | foobar c-src/c.c /^int foobar() {;}$/ | 2960 | foobar c-src/c.c /^int foobar() {;}$/ |
| 2956 | foobar c.c /^extern void foobar (void) __attribute__ ((section / | 2961 | foobar c.c /^extern void foobar (void) __attribute__ ((section / |
| 2957 | foobar2 c-src/h.h 20 | 2962 | foobar2 c-src/h.h 20 |
| @@ -3450,6 +3455,7 @@ miti html-src/softwarelibero.html /^Sfatiamo alcuni miti$/ | |||
| 3450 | modifier_names c-src/emacs/src/keyboard.c 6319 | 3455 | modifier_names c-src/emacs/src/keyboard.c 6319 |
| 3451 | modifier_symbols c-src/emacs/src/keyboard.c 6327 | 3456 | modifier_symbols c-src/emacs/src/keyboard.c 6327 |
| 3452 | modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ | 3457 | modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ |
| 3458 | module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/ | ||
| 3453 | module_instance_method ruby-src/test.rb /^ def module_instance_method$/ | 3459 | module_instance_method ruby-src/test.rb /^ def module_instance_method$/ |
| 3454 | more_aligned_int c.c 165 | 3460 | more_aligned_int c.c 165 |
| 3455 | morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ | 3461 | morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ |
| @@ -3812,6 +3818,7 @@ quantizing html-src/algrthms.html /^Quantizing the Received$/ | |||
| 3812 | questo ../c/c.web 34 | 3818 | questo ../c/c.web 34 |
| 3813 | quit_char c-src/emacs/src/keyboard.c 192 | 3819 | quit_char c-src/emacs/src/keyboard.c 192 |
| 3814 | quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ | 3820 | quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ |
| 3821 | qux= ruby-src/test1.ruby /^ def qux=(tee)$/ | ||
| 3815 | r0 c-src/sysdep.h 54 | 3822 | r0 c-src/sysdep.h 54 |
| 3816 | r1 c-src/sysdep.h 55 | 3823 | r1 c-src/sysdep.h 55 |
| 3817 | r_alloc c-src/emacs/src/lisp.h /^extern void *r_alloc (void **, size_t) ATTRIBUTE_A/ | 3824 | r_alloc c-src/emacs/src/lisp.h /^extern void *r_alloc (void **, size_t) ATTRIBUTE_A/ |
diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 52ded46e28a..44ac091066b 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 | |||
| @@ -2977,11 +2977,11 @@ class Configure(760,24879 | |||
| 2977 | def save(797,26022 | 2977 | def save(797,26022 |
| 2978 | def nosave(807,26310 | 2978 | def nosave(807,26310 |
| 2979 | 2979 | ||
| 2980 | ruby-src/test.rb,604 | 2980 | ruby-src/test.rb,637 |
| 2981 | module ModuleExample1,0 | 2981 | module ModuleExample1,0 |
| 2982 | class ClassExample2,21 | 2982 | class ClassExample2,21 |
| 2983 | def instance_method3,44 | 2983 | def instance_method3,44 |
| 2984 | def ClassExample.class_method6,121 | 2984 | def ClassExample.class_methodclass_method6,121 |
| 2985 | def instance_method_exclamation!9,206 | 2985 | def instance_method_exclamation!9,206 |
| 2986 | def instance_method_question?12,310 | 2986 | def instance_method_question?12,310 |
| 2987 | def instance_method_equals=instance_method_equals=15,408 | 2987 | def instance_method_equals=instance_method_equals=15,408 |
| @@ -2995,12 +2995,19 @@ module ModuleExample1,0 | |||
| 2995 | def <=>(<=>39,943 | 2995 | def <=>(<=>39,943 |
| 2996 | def ===(===42,990 | 2996 | def ===(===42,990 |
| 2997 | def module_instance_method46,1051 | 2997 | def module_instance_method46,1051 |
| 2998 | def ModuleExample.module_class_method49,1131 | 2998 | def ModuleExample.module_class_methodmodule_class_method49,1131 |
| 2999 | 2999 | ||
| 3000 | ruby-src/test1.ruby,37 | 3000 | ruby-src/test1.ruby,191 |
| 3001 | class A1,0 | 3001 | class A1,0 |
| 3002 | def a(2,8 | 3002 | def a(2,8 |
| 3003 | def b(5,38 | 3003 | def b(5,38 |
| 3004 | module A9,57 | ||
| 3005 | class B10,66 | ||
| 3006 | ABC 11,76 | ||
| 3007 | def foo!13,89 | ||
| 3008 | def self._bar?(_bar?16,111 | ||
| 3009 | def qux=(qux=20,162 | ||
| 3010 | A::Constant Constant26,211 | ||
| 3004 | 3011 | ||
| 3005 | tex-src/testenv.tex,52 | 3012 | tex-src/testenv.tex,52 |
| 3006 | \newcommand{\nm}\nm4,77 | 3013 | \newcommand{\nm}\nm4,77 |
diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index ea10012669c..8a93e3b0656 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 | |||
| @@ -3548,11 +3548,11 @@ class Configure(760,24879 | |||
| 3548 | def save(797,26022 | 3548 | def save(797,26022 |
| 3549 | def nosave(807,26310 | 3549 | def nosave(807,26310 |
| 3550 | 3550 | ||
| 3551 | ruby-src/test.rb,604 | 3551 | ruby-src/test.rb,637 |
| 3552 | module ModuleExample1,0 | 3552 | module ModuleExample1,0 |
| 3553 | class ClassExample2,21 | 3553 | class ClassExample2,21 |
| 3554 | def instance_method3,44 | 3554 | def instance_method3,44 |
| 3555 | def ClassExample.class_method6,121 | 3555 | def ClassExample.class_methodclass_method6,121 |
| 3556 | def instance_method_exclamation!9,206 | 3556 | def instance_method_exclamation!9,206 |
| 3557 | def instance_method_question?12,310 | 3557 | def instance_method_question?12,310 |
| 3558 | def instance_method_equals=instance_method_equals=15,408 | 3558 | def instance_method_equals=instance_method_equals=15,408 |
| @@ -3566,12 +3566,19 @@ module ModuleExample1,0 | |||
| 3566 | def <=>(<=>39,943 | 3566 | def <=>(<=>39,943 |
| 3567 | def ===(===42,990 | 3567 | def ===(===42,990 |
| 3568 | def module_instance_method46,1051 | 3568 | def module_instance_method46,1051 |
| 3569 | def ModuleExample.module_class_method49,1131 | 3569 | def ModuleExample.module_class_methodmodule_class_method49,1131 |
| 3570 | 3570 | ||
| 3571 | ruby-src/test1.ruby,37 | 3571 | ruby-src/test1.ruby,191 |
| 3572 | class A1,0 | 3572 | class A1,0 |
| 3573 | def a(2,8 | 3573 | def a(2,8 |
| 3574 | def b(5,38 | 3574 | def b(5,38 |
| 3575 | module A9,57 | ||
| 3576 | class B10,66 | ||
| 3577 | ABC 11,76 | ||
| 3578 | def foo!13,89 | ||
| 3579 | def self._bar?(_bar?16,111 | ||
| 3580 | def qux=(qux=20,162 | ||
| 3581 | A::Constant Constant26,211 | ||
| 3575 | 3582 | ||
| 3576 | tex-src/testenv.tex,52 | 3583 | tex-src/testenv.tex,52 |
| 3577 | \newcommand{\nm}\nm4,77 | 3584 | \newcommand{\nm}\nm4,77 |
diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 3b3650f8fa8..e575b40ab0d 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 | |||
| @@ -3321,11 +3321,11 @@ class Configure(760,24879 | |||
| 3321 | def save(797,26022 | 3321 | def save(797,26022 |
| 3322 | def nosave(807,26310 | 3322 | def nosave(807,26310 |
| 3323 | 3323 | ||
| 3324 | ruby-src/test.rb,604 | 3324 | ruby-src/test.rb,637 |
| 3325 | module ModuleExample1,0 | 3325 | module ModuleExample1,0 |
| 3326 | class ClassExample2,21 | 3326 | class ClassExample2,21 |
| 3327 | def instance_method3,44 | 3327 | def instance_method3,44 |
| 3328 | def ClassExample.class_method6,121 | 3328 | def ClassExample.class_methodclass_method6,121 |
| 3329 | def instance_method_exclamation!9,206 | 3329 | def instance_method_exclamation!9,206 |
| 3330 | def instance_method_question?12,310 | 3330 | def instance_method_question?12,310 |
| 3331 | def instance_method_equals=instance_method_equals=15,408 | 3331 | def instance_method_equals=instance_method_equals=15,408 |
| @@ -3339,12 +3339,19 @@ module ModuleExample1,0 | |||
| 3339 | def <=>(<=>39,943 | 3339 | def <=>(<=>39,943 |
| 3340 | def ===(===42,990 | 3340 | def ===(===42,990 |
| 3341 | def module_instance_method46,1051 | 3341 | def module_instance_method46,1051 |
| 3342 | def ModuleExample.module_class_method49,1131 | 3342 | def ModuleExample.module_class_methodmodule_class_method49,1131 |
| 3343 | 3343 | ||
| 3344 | ruby-src/test1.ruby,37 | 3344 | ruby-src/test1.ruby,191 |
| 3345 | class A1,0 | 3345 | class A1,0 |
| 3346 | def a(2,8 | 3346 | def a(2,8 |
| 3347 | def b(5,38 | 3347 | def b(5,38 |
| 3348 | module A9,57 | ||
| 3349 | class B10,66 | ||
| 3350 | ABC 11,76 | ||
| 3351 | def foo!13,89 | ||
| 3352 | def self._bar?(_bar?16,111 | ||
| 3353 | def qux=(qux=20,162 | ||
| 3354 | A::Constant Constant26,211 | ||
| 3348 | 3355 | ||
| 3349 | tex-src/testenv.tex,52 | 3356 | tex-src/testenv.tex,52 |
| 3350 | \newcommand{\nm}\nm4,77 | 3357 | \newcommand{\nm}\nm4,77 |
diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 0415c17bff3..28258060517 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 | |||
| @@ -3141,11 +3141,11 @@ class Configure(760,24879 | |||
| 3141 | def save(797,26022 | 3141 | def save(797,26022 |
| 3142 | def nosave(807,26310 | 3142 | def nosave(807,26310 |
| 3143 | 3143 | ||
| 3144 | ruby-src/test.rb,604 | 3144 | ruby-src/test.rb,637 |
| 3145 | module ModuleExample1,0 | 3145 | module ModuleExample1,0 |
| 3146 | class ClassExample2,21 | 3146 | class ClassExample2,21 |
| 3147 | def instance_method3,44 | 3147 | def instance_method3,44 |
| 3148 | def ClassExample.class_method6,121 | 3148 | def ClassExample.class_methodclass_method6,121 |
| 3149 | def instance_method_exclamation!9,206 | 3149 | def instance_method_exclamation!9,206 |
| 3150 | def instance_method_question?12,310 | 3150 | def instance_method_question?12,310 |
| 3151 | def instance_method_equals=instance_method_equals=15,408 | 3151 | def instance_method_equals=instance_method_equals=15,408 |
| @@ -3159,12 +3159,19 @@ module ModuleExample1,0 | |||
| 3159 | def <=>(<=>39,943 | 3159 | def <=>(<=>39,943 |
| 3160 | def ===(===42,990 | 3160 | def ===(===42,990 |
| 3161 | def module_instance_method46,1051 | 3161 | def module_instance_method46,1051 |
| 3162 | def ModuleExample.module_class_method49,1131 | 3162 | def ModuleExample.module_class_methodmodule_class_method49,1131 |
| 3163 | 3163 | ||
| 3164 | ruby-src/test1.ruby,37 | 3164 | ruby-src/test1.ruby,191 |
| 3165 | class A1,0 | 3165 | class A1,0 |
| 3166 | def a(2,8 | 3166 | def a(2,8 |
| 3167 | def b(5,38 | 3167 | def b(5,38 |
| 3168 | module A9,57 | ||
| 3169 | class B10,66 | ||
| 3170 | ABC 11,76 | ||
| 3171 | def foo!13,89 | ||
| 3172 | def self._bar?(_bar?16,111 | ||
| 3173 | def qux=(qux=20,162 | ||
| 3174 | A::Constant Constant26,211 | ||
| 3168 | 3175 | ||
| 3169 | tex-src/testenv.tex,52 | 3176 | tex-src/testenv.tex,52 |
| 3170 | \newcommand{\nm}\nm4,77 | 3177 | \newcommand{\nm}\nm4,77 |
diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 8dc814e5ac8..35bb353c767 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 | |||
| @@ -4056,11 +4056,11 @@ class Configure(760,24879 | |||
| 4056 | def save(797,26022 | 4056 | def save(797,26022 |
| 4057 | def nosave(807,26310 | 4057 | def nosave(807,26310 |
| 4058 | 4058 | ||
| 4059 | ruby-src/test.rb,604 | 4059 | ruby-src/test.rb,637 |
| 4060 | module ModuleExample1,0 | 4060 | module ModuleExample1,0 |
| 4061 | class ClassExample2,21 | 4061 | class ClassExample2,21 |
| 4062 | def instance_method3,44 | 4062 | def instance_method3,44 |
| 4063 | def ClassExample.class_method6,121 | 4063 | def ClassExample.class_methodclass_method6,121 |
| 4064 | def instance_method_exclamation!9,206 | 4064 | def instance_method_exclamation!9,206 |
| 4065 | def instance_method_question?12,310 | 4065 | def instance_method_question?12,310 |
| 4066 | def instance_method_equals=instance_method_equals=15,408 | 4066 | def instance_method_equals=instance_method_equals=15,408 |
| @@ -4074,12 +4074,19 @@ module ModuleExample1,0 | |||
| 4074 | def <=>(<=>39,943 | 4074 | def <=>(<=>39,943 |
| 4075 | def ===(===42,990 | 4075 | def ===(===42,990 |
| 4076 | def module_instance_method46,1051 | 4076 | def module_instance_method46,1051 |
| 4077 | def ModuleExample.module_class_method49,1131 | 4077 | def ModuleExample.module_class_methodmodule_class_method49,1131 |
| 4078 | 4078 | ||
| 4079 | ruby-src/test1.ruby,37 | 4079 | ruby-src/test1.ruby,191 |
| 4080 | class A1,0 | 4080 | class A1,0 |
| 4081 | def a(2,8 | 4081 | def a(2,8 |
| 4082 | def b(5,38 | 4082 | def b(5,38 |
| 4083 | module A9,57 | ||
| 4084 | class B10,66 | ||
| 4085 | ABC 11,76 | ||
| 4086 | def foo!13,89 | ||
| 4087 | def self._bar?(_bar?16,111 | ||
| 4088 | def qux=(qux=20,162 | ||
| 4089 | A::Constant Constant26,211 | ||
| 4083 | 4090 | ||
| 4084 | tex-src/testenv.tex,52 | 4091 | tex-src/testenv.tex,52 |
| 4085 | \newcommand{\nm}\nm4,77 | 4092 | \newcommand{\nm}\nm4,77 |
diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 322c1651984..8add300784f 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 | |||
| @@ -4056,11 +4056,11 @@ class Configure(760,24879 | |||
| 4056 | def save(797,26022 | 4056 | def save(797,26022 |
| 4057 | def nosave(807,26310 | 4057 | def nosave(807,26310 |
| 4058 | 4058 | ||
| 4059 | ruby-src/test.rb,604 | 4059 | ruby-src/test.rb,637 |
| 4060 | module ModuleExample1,0 | 4060 | module ModuleExample1,0 |
| 4061 | class ClassExample2,21 | 4061 | class ClassExample2,21 |
| 4062 | def instance_method3,44 | 4062 | def instance_method3,44 |
| 4063 | def ClassExample.class_method6,121 | 4063 | def ClassExample.class_methodclass_method6,121 |
| 4064 | def instance_method_exclamation!9,206 | 4064 | def instance_method_exclamation!9,206 |
| 4065 | def instance_method_question?12,310 | 4065 | def instance_method_question?12,310 |
| 4066 | def instance_method_equals=instance_method_equals=15,408 | 4066 | def instance_method_equals=instance_method_equals=15,408 |
| @@ -4074,12 +4074,19 @@ module ModuleExample1,0 | |||
| 4074 | def <=>(<=>39,943 | 4074 | def <=>(<=>39,943 |
| 4075 | def ===(===42,990 | 4075 | def ===(===42,990 |
| 4076 | def module_instance_method46,1051 | 4076 | def module_instance_method46,1051 |
| 4077 | def ModuleExample.module_class_method49,1131 | 4077 | def ModuleExample.module_class_methodmodule_class_method49,1131 |
| 4078 | 4078 | ||
| 4079 | ruby-src/test1.ruby,37 | 4079 | ruby-src/test1.ruby,191 |
| 4080 | class A1,0 | 4080 | class A1,0 |
| 4081 | def a(2,8 | 4081 | def a(2,8 |
| 4082 | def b(5,38 | 4082 | def b(5,38 |
| 4083 | module A9,57 | ||
| 4084 | class B10,66 | ||
| 4085 | ABC 11,76 | ||
| 4086 | def foo!13,89 | ||
| 4087 | def self._bar?(_bar?16,111 | ||
| 4088 | def qux=(qux=20,162 | ||
| 4089 | A::Constant Constant26,211 | ||
| 4083 | 4090 | ||
| 4084 | tex-src/testenv.tex,52 | 4091 | tex-src/testenv.tex,52 |
| 4085 | \newcommand{\nm}\nm4,77 | 4092 | \newcommand{\nm}\nm4,77 |
diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby index 43b1a14b95e..26b7d538b64 100644 --- a/test/etags/ruby-src/test1.ruby +++ b/test/etags/ruby-src/test1.ruby | |||
| @@ -5,3 +5,25 @@ class A | |||
| 5 | def b() | 5 | def b() |
| 6 | end | 6 | end |
| 7 | end | 7 | end |
| 8 | |||
| 9 | module A | ||
| 10 | class B | ||
| 11 | ABC = 4 | ||
| 12 | |||
| 13 | def foo! | ||
| 14 | end | ||
| 15 | |||
| 16 | def self._bar?(abc) | ||
| 17 | end | ||
| 18 | |||
| 19 | class << self | ||
| 20 | def qux=(tee) | ||
| 21 | end | ||
| 22 | end | ||
| 23 | end | ||
| 24 | end | ||
| 25 | |||
| 26 | A::Constant = 5 | ||
| 27 | |||
| 28 | # def foo_in_comment | ||
| 29 | # end | ||