aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-01-30 14:16:36 +0200
committerEli Zaretskii2016-01-30 14:16:36 +0200
commit25b79d7bc71079cd6ebb2700623e7e3b76b03287 (patch)
tree1654109110b07b8ebf8fd9b9196e73f2d4553972
parentccc3b3cd68312e1d69d9f9af943ee2b9a9d88198 (diff)
downloademacs-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.texi2
-rw-r--r--etc/NEWS4
-rw-r--r--lib-src/etags.c58
-rw-r--r--test/etags/CTAGS.good11
-rw-r--r--test/etags/ETAGS.good_115
-rw-r--r--test/etags/ETAGS.good_215
-rw-r--r--test/etags/ETAGS.good_315
-rw-r--r--test/etags/ETAGS.good_415
-rw-r--r--test/etags/ETAGS.good_515
-rw-r--r--test/etags/ETAGS.good_615
-rw-r--r--test/etags/ruby-src/test1.ruby22
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
2266In Ruby code, @code{def} or @code{class} or @code{module} at the 2266In Ruby code, @code{def} or @code{class} or @code{module} at the
2267beginning of a line generate a tag. 2267beginning 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
diff --git a/etc/NEWS b/etc/NEWS
index af2dee931f3..78dce166b43 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1830,8 +1830,8 @@ qualified names by hand.
1830+++ 1830+++
1831*** New language Ruby 1831*** New language Ruby
1832 1832
1833Names of modules, classes, methods, and functions are tagged. 1833Names of modules, classes, methods, functions, and constants are
1834Overloaded operators are also tagged. 1834tagged. 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
227A cp-src/fail.C 7 227A cp-src/fail.C 7
228A cp-src/fail.C 23 228A cp-src/fail.C 23
229A ruby-src/test1.ruby /^class A$/ 229A ruby-src/test1.ruby /^class A$/
230A ruby-src/test1.ruby /^module A$/
231ABC ruby-src/test1.ruby 11
230ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/ 232ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/
231ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378 233ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378
232ALLOCATED_BEFORE_DUMPING c-src/emacs/src/gmalloc.c /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/ 234ALLOCATED_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() {}$/
289B cp-src/c.C 122 291B cp-src/c.C 122
290B cp-src/fail.C 8 292B cp-src/fail.C 8
291B cp-src/fail.C 24 293B cp-src/fail.C 24
294B ruby-src/test1.ruby /^ class B$/
292BE_Node cp-src/c.C /^void BE_Node::BE_Node() {}$/ 295BE_Node cp-src/c.C /^void BE_Node::BE_Node() {}$/
293BE_Node cp-src/c.C 77 296BE_Node cp-src/c.C 77
294BITS_PER_BITS_WORD c-src/emacs/src/lisp.h 125 297BITS_PER_BITS_WORD c-src/emacs/src/lisp.h 125
@@ -438,7 +441,6 @@ Cjava_entries c-src/etags.c /^Cjava_entries (FILE *inf)$/
438Cjava_help c-src/etags.c 551 441Cjava_help c-src/etags.c 551
439Cjava_suffixes c-src/etags.c 549 442Cjava_suffixes c-src/etags.c 549
440ClassExample ruby-src/test.rb /^ class ClassExample$/ 443ClassExample ruby-src/test.rb /^ class ClassExample$/
441ClassExample.class_method ruby-src/test.rb /^ def ClassExample.class_method$/
442Clear/p ada-src/2ataspri.adb /^ procedure Clear (Cell : in out TAS_Cell) is$/ 444Clear/p ada-src/2ataspri.adb /^ procedure Clear (Cell : in out TAS_Cell) is$/
443Clear/p ada-src/2ataspri.ads /^ procedure Clear (Cell : in out TAS_Cell)/ 445Clear/p ada-src/2ataspri.ads /^ procedure Clear (Cell : in out TAS_Cell)/
444Cobol_help c-src/etags.c 558 446Cobol_help c-src/etags.c 558
@@ -458,6 +460,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat
458Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ 460Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/
459Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ 461Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/
460ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ 462ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/
463Constant ruby-src/test1.ruby 26
461ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ 464ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/
462Controls pyt-src/server.py /^class Controls:$/ 465Controls pyt-src/server.py /^class Controls:$/
463CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ 466CopyTextString pas-src/common.pas /^function CopyTextString;(*($/
@@ -939,7 +942,6 @@ Metags c-src/etags.c /^main (int argc, char **argv)$/
939Mfail cp-src/fail.C /^main()$/ 942Mfail cp-src/fail.C /^main()$/
940Mkai-test.pl perl-src/kai-test.pl /^package main;$/ 943Mkai-test.pl perl-src/kai-test.pl /^package main;$/
941ModuleExample ruby-src/test.rb /^module ModuleExample$/ 944ModuleExample ruby-src/test.rb /^module ModuleExample$/
942ModuleExample.module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/
943More_Lisp_Bits c-src/emacs/src/lisp.h 801 945More_Lisp_Bits c-src/emacs/src/lisp.h 801
944MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/ 946MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/
945MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ 947MoveLayerBefore 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$/
2620chunks_free c-src/emacs/src/gmalloc.c 313 2623chunks_free c-src/emacs/src/gmalloc.c 313
2621chunks_used c-src/emacs/src/gmalloc.c 311 2624chunks_used c-src/emacs/src/gmalloc.c 311
2622cjava c-src/etags.c 2936 2625cjava c-src/etags.c 2936
2626class_method ruby-src/test.rb /^ def ClassExample.class_method$/
2623classifyLine php-src/lce_functions.php /^ function classifyLine($line)$/ 2627classifyLine php-src/lce_functions.php /^ function classifyLine($line)$/
2624clear cp-src/conway.hpp /^ void clear(void) { alive = 0; }$/ 2628clear cp-src/conway.hpp /^ void clear(void) { alive = 0; }$/
2625clear-abbrev-table c-src/abbrev.c /^DEFUN ("clear-abbrev-table", Fclear_abbrev_table, / 2629clear-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()$/
2952foo f-src/entry.strange_suffix /^ character*(*) function foo()$/ 2956foo f-src/entry.strange_suffix /^ character*(*) function foo()$/
2953foo f-src/entry.strange /^ character*(*) function foo()$/ 2957foo f-src/entry.strange /^ character*(*) function foo()$/
2954foo php-src/ptest.php /^foo()$/ 2958foo php-src/ptest.php /^foo()$/
2959foo! ruby-src/test1.ruby /^ def foo!$/
2955foobar c-src/c.c /^int foobar() {;}$/ 2960foobar c-src/c.c /^int foobar() {;}$/
2956foobar c.c /^extern void foobar (void) __attribute__ ((section / 2961foobar c.c /^extern void foobar (void) __attribute__ ((section /
2957foobar2 c-src/h.h 20 2962foobar2 c-src/h.h 20
@@ -3450,6 +3455,7 @@ miti html-src/softwarelibero.html /^Sfatiamo alcuni miti$/
3450modifier_names c-src/emacs/src/keyboard.c 6319 3455modifier_names c-src/emacs/src/keyboard.c 6319
3451modifier_symbols c-src/emacs/src/keyboard.c 6327 3456modifier_symbols c-src/emacs/src/keyboard.c 6327
3452modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ 3457modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/
3458module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/
3453module_instance_method ruby-src/test.rb /^ def module_instance_method$/ 3459module_instance_method ruby-src/test.rb /^ def module_instance_method$/
3454more_aligned_int c.c 165 3460more_aligned_int c.c 165
3455morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ 3461morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/
@@ -3812,6 +3818,7 @@ quantizing html-src/algrthms.html /^Quantizing the Received$/
3812questo ../c/c.web 34 3818questo ../c/c.web 34
3813quit_char c-src/emacs/src/keyboard.c 192 3819quit_char c-src/emacs/src/keyboard.c 192
3814quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ 3820quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/
3821qux= ruby-src/test1.ruby /^ def qux=(tee)$/
3815r0 c-src/sysdep.h 54 3822r0 c-src/sysdep.h 54
3816r1 c-src/sysdep.h 55 3823r1 c-src/sysdep.h 55
3817r_alloc c-src/emacs/src/lisp.h /^extern void *r_alloc (void **, size_t) ATTRIBUTE_A/ 3824r_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
2980ruby-src/test.rb,604 2980ruby-src/test.rb,637
2981module ModuleExample1,0 2981module 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
3000ruby-src/test1.ruby,37 3000ruby-src/test1.ruby,191
3001class A1,0 3001class A1,0
3002 def a(2,8 3002 def a(2,8
3003 def b(5,38 3003 def b(5,38
3004module 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
3010A::Constant Constant26,211
3004 3011
3005tex-src/testenv.tex,52 3012tex-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
3551ruby-src/test.rb,604 3551ruby-src/test.rb,637
3552module ModuleExample1,0 3552module 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
3571ruby-src/test1.ruby,37 3571ruby-src/test1.ruby,191
3572class A1,0 3572class A1,0
3573 def a(2,8 3573 def a(2,8
3574 def b(5,38 3574 def b(5,38
3575module 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
3581A::Constant Constant26,211
3575 3582
3576tex-src/testenv.tex,52 3583tex-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
3324ruby-src/test.rb,604 3324ruby-src/test.rb,637
3325module ModuleExample1,0 3325module 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
3344ruby-src/test1.ruby,37 3344ruby-src/test1.ruby,191
3345class A1,0 3345class A1,0
3346 def a(2,8 3346 def a(2,8
3347 def b(5,38 3347 def b(5,38
3348module 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
3354A::Constant Constant26,211
3348 3355
3349tex-src/testenv.tex,52 3356tex-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
3144ruby-src/test.rb,604 3144ruby-src/test.rb,637
3145module ModuleExample1,0 3145module 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
3164ruby-src/test1.ruby,37 3164ruby-src/test1.ruby,191
3165class A1,0 3165class A1,0
3166 def a(2,8 3166 def a(2,8
3167 def b(5,38 3167 def b(5,38
3168module 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
3174A::Constant Constant26,211
3168 3175
3169tex-src/testenv.tex,52 3176tex-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
4059ruby-src/test.rb,604 4059ruby-src/test.rb,637
4060module ModuleExample1,0 4060module 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
4079ruby-src/test1.ruby,37 4079ruby-src/test1.ruby,191
4080class A1,0 4080class A1,0
4081 def a(2,8 4081 def a(2,8
4082 def b(5,38 4082 def b(5,38
4083module 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
4089A::Constant Constant26,211
4083 4090
4084tex-src/testenv.tex,52 4091tex-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
4059ruby-src/test.rb,604 4059ruby-src/test.rb,637
4060module ModuleExample1,0 4060module 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
4079ruby-src/test1.ruby,37 4079ruby-src/test1.ruby,191
4080class A1,0 4080class A1,0
4081 def a(2,8 4081 def a(2,8
4082 def b(5,38 4082 def b(5,38
4083module 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
4089A::Constant Constant26,211
4083 4090
4084tex-src/testenv.tex,52 4091tex-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
7end 7end
8
9module 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
24end
25
26A::Constant = 5
27
28# def foo_in_comment
29# end