]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve and document Ruby support in 'etags'
authorEli Zaretskii <eliz@gnu.org>
Fri, 11 Dec 2015 09:17:31 +0000 (11:17 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 11 Dec 2015 09:17:31 +0000 (11:17 +0200)
* lib-src/etags.c (Ruby_suffixes): Add ".ruby".
(Ruby_functions): Support "module" and overloaded operators.
(Ruby_help): Mention "module".

* test/etags/ruby-src/test.rb:
* test/etags/ruby-src/test1.ruby: New files.
* test/etags/Makefile (RBSRC): New tests.
(SRCS): Add ${RBSRC}.
* 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 new Ruby tests.

* doc/man/etags.1: Mention Ruby support.
* etc/NEWS: Mention Ruby support.

13 files changed:
doc/man/etags.1
etc/NEWS
lib-src/etags.c
test/etags/CTAGS.good
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/Makefile
test/etags/ruby-src/test.rb [new file with mode: 0644]
test/etags/ruby-src/test1.ruby [new file with mode: 0644]

index fab8901427dcf987e20fd9e222e5733119707ee5..7cb6b6cb6ab9101ae9e96ceb79ba81e97672e828 100644 (file)
@@ -51,7 +51,7 @@ format understood by
 \&.  Both forms of the program understand
 the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang,
 Forth, HTML, LaTeX, Emacs Lisp/Common Lisp, Lua, Makefile, Pascal, Perl,
-PHP, PostScript, Python, Prolog, Scheme and
+Ruby, PHP, PostScript, Python, Prolog, Scheme and
 most assembler\-like syntaxes.
 Both forms read the files specified on the command line, and write a tag
 table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for
index 4bcf32658c7c221803185c18e4a6bea6213b6ad7..0c9296acab4b3a7cc230b131a311d0d4d3dc3e57 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1444,9 +1444,10 @@ is strongly dedicated to its buffer.
 ** Tearoff menus and detachable toolbars for Gtk+ has been removed.
 Those features have been deprecated in Gtk+ for a long time.
 
-** Miscellaneous
+** Etags
 
 *** etags no longer qualifies class members by default.
+
 By default, `etags' will not qualify class members for C-like
 object-oriented languages with their class names and namespaces, and
 will remove qualifications used explicitly in the code from the tag
@@ -1460,6 +1461,11 @@ using -Q might make some class members become "unknown" to `M-.'
 (`xref-find-definitions'); if so, you can use `C-u M-.' to specify the
 qualified names by hand.
 
+*** New language Ruby
+
+Names of modules, classes, methods, and functions are tagged.
+Overloaded operators are also tagged.
+
 \f
 * Changes in Emacs 25.1 on Non-Free Operating Systems
 
index c91cef40bfa9d06e914ab574a2289e91404f3779..cd49f7199baca7013d0de79c10987fbdbb2739a6 100644 (file)
@@ -724,10 +724,10 @@ static const char Python_help [] =
 generate a tag.";
 
 static const char *Ruby_suffixes [] =
-  { "rb", NULL };
+  { "rb", "ruby", NULL };
 static const char Ruby_help [] =
-  "In Ruby code, 'def' or 'class' at the beginning of a line\n\
-generate a tag.";
+  "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\
+a line generate a tag.";
 
 /* Can't do the `SCM' or `scm' prefix with a version number. */
 static const char *Scheme_suffixes [] =
@@ -4552,15 +4552,19 @@ Ruby_functions (FILE *inf)
   LOOP_ON_INPUT_LINES (inf, lb, cp)
     {
       cp = skip_spaces (cp);
-      if (LOOKING_AT (cp, "def") || LOOKING_AT (cp, "class"))
+      if (LOOKING_AT (cp, "def")
+         || LOOKING_AT (cp, "class")
+         || LOOKING_AT (cp, "module"))
        {
          char *name = cp;
 
-         while (!notinname (*cp))
+        /* Ruby method names can end in a '='.  Also, operator overloading can
+           define operators whose names include '='.  */
+         while (!notinname (*cp) || *cp == '=')
            cp++;
 
-         make_tag(name, cp -name, true,
-                  lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+         make_tag (name, cp - name, true,
+                   lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
        }
     }
 }
index c98e1388d3ffa462dda5eefd88549e6512a14b7a..3186ff667e22fad0be822f41af0299d3040acd10 100644 (file)
@@ -46,6 +46,7 @@ $user_comment_lc      php-src/lce_functions.php       115
 ($string,$flag,@string,@temp,@last     perl-src/yagrip.pl      40
 (a-forth-constant      forth-src/test-forth.fth        /^constant (a-forth-constant$/
 (another-forth-word    forth-src/test-forth.fth        /^: (another-forth-word) ( -- )$/
++      ruby-src/test.rb        /^        def +(y)$/
 +      tex-src/texinfo.tex     /^\\def+{{\\tt \\char 43}}$/
 /.notdef       ps-src/rfc1245.ps       /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/
 /.notdef       ps-src/rfc1245.ps       /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/
@@ -177,6 +178,9 @@ $user_comment_lc    php-src/lce_functions.php       115
 /yen   ps-src/rfc1245.ps       /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef /
 :a-forth-dictionary-entry      forth-src/test-forth.fth        /^create :a-forth-dictionary-entry$/
 <      tex-src/texinfo.tex     /^\\def<{{\\tt \\less}}$/
+<<     ruby-src/test.rb        /^        def <<(y)$/
+<=     ruby-src/test.rb        /^        def <=(y)$/
+<=>    ruby-src/test.rb        /^        def <=>(y)$/
 =      tex-src/texinfo.tex     /^\\global\\let\\section = \\numberedsec$/
 =      tex-src/texinfo.tex     /^\\global\\let\\subsection = \\numberedsubsec$/
 =      tex-src/texinfo.tex     /^\\global\\let\\subsubsection = \\numberedsubsubsec$/
@@ -191,6 +195,8 @@ $user_comment_lc    php-src/lce_functions.php       115
 =      tex-src/texinfo.tex     /^\\global\\let\\subsubsection = \\numberedsubsubsec$/
 =      tex-src/texinfo.tex     /^\\global\\def={{\\tt \\char 61}}}$/
 =/f    ada-src/etags-test-for.ada      /^   function "=" (L, R : System.Address) return Boo/
+==     ruby-src/test.rb        /^        def ==(y)$/
+===    ruby-src/test.rb        /^        def ===(y)$/
 =\indexdummyfont       tex-src/texinfo.tex     /^\\let\\cite=\\indexdummyfont$/
 =\relax        tex-src/texinfo.tex     /^\\let\\chapter=\\relax$/
 =\relax        tex-src/texinfo.tex     /^\\let\\section=\\relax$/
@@ -220,6 +226,7 @@ A   cp-src/c.C      73
 A      cp-src/c.C      117
 A      cp-src/fail.C   7
 A      cp-src/fail.C   23
+A      ruby-src/test1.ruby     /^class A$/
 ADDRESS        c-src/emacs/src/gmalloc.c       /^#define ADDRESS(B)    ((void *) (((B) - 1) * BLOCKSIZ/
 ALIGNOF_STRUCT_LISP_VECTOR     c-src/emacs/src/lisp.h  1378
 ALLOCATED_BEFORE_DUMPING       c-src/emacs/src/gmalloc.c       /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/
@@ -430,6 +437,8 @@ Circle.getPos       lua-src/test.lua        /^function Circle.getPos ()$/
 Cjava_entries  c-src/etags.c   /^Cjava_entries (FILE *inf)$/
 Cjava_help     c-src/etags.c   551
 Cjava_suffixes c-src/etags.c   549
+ClassExample   ruby-src/test.rb        /^    class ClassExample$/
+ClassExample.singleton_class_method    ruby-src/test.rb        /^        def ClassExample.singleton_class_method$/
 Clear/p        ada-src/2ataspri.adb    /^   procedure Clear (Cell : in out TAS_Cell) is$/
 Clear/p        ada-src/2ataspri.ads    /^   procedure Clear        (Cell : in out TAS_Cell)/
 Cobol_help     c-src/etags.c   558
@@ -929,6 +938,8 @@ Mconway.cpp cp-src/conway.cpp       /^void main(void)$/
 Metags c-src/etags.c   /^main (int argc, char **argv)$/
 Mfail  cp-src/fail.C   /^main()$/
 Mkai-test.pl   perl-src/kai-test.pl    /^package main;$/
+ModuleExample  ruby-src/test.rb        /^module ModuleExample$/
+ModuleExample.singleton_module_method  ruby-src/test.rb        /^    def ModuleExample.singleton_module_method$/
 More_Lisp_Bits c-src/emacs/src/lisp.h  801
 MoveLayerAfter lua-src/allegro.lua     /^function MoveLayerAfter (this_one)$/
 MoveLayerBefore        lua-src/allegro.lua     /^function MoveLayerBefore (this_one)$/
@@ -1652,6 +1663,8 @@ Yacc_entries      c-src/etags.c   /^Yacc_entries (FILE *inf)$/
 Yacc_help      c-src/etags.c   693
 Yacc_suffixes  c-src/etags.c   691
 Z      c-src/h.h       100
+[]     ruby-src/test.rb        /^        def [](y)$/
+[]=    ruby-src/test.rb        /^        def []=(y, val)$/
 \      tex-src/texinfo.tex     /^\\def\\ {{\\fontdimen2\\font=\\tclosesave{} }}%$/
 \      tex-src/texinfo.tex     /^\\gdef\\sepspaces{\\def {\\ }}}$/
 \'     tex-src/texinfo.tex     /^\\def\\'{{'}}$/
@@ -2358,6 +2371,7 @@ _malloc_thread_enabled_p  c-src/emacs/src/gmalloc.c       519
 _realloc       c-src/emacs/src/gmalloc.c       /^_realloc (void *ptr, size_t size)$/
 _realloc_internal      c-src/emacs/src/gmalloc.c       /^_realloc_internal (void *ptr, size_t size)$/
 _realloc_internal_nolock       c-src/emacs/src/gmalloc.c       /^_realloc_internal_nolock (void *ptr, size_t size)$/
+`      ruby-src/test.rb        /^        def `(command)$/
 a      c.c     152
 a      c.c     180
 a      c.c     /^a()$/
@@ -2365,6 +2379,7 @@ a c.c     /^a ()$/
 a      c-src/h.h       40
 a      c-src/h.h       103
 a      cp-src/c.C      132
+a      ruby-src/test1.ruby     /^ def a()$/
 a-forth-constant!      forth-src/test-forth.fth        /^99 constant a-forth-constant!$/
 a-forth-value? forth-src/test-forth.fth        /^55 value a-forth-value?$/
 a-forth-word   forth-src/test-forth.fth        /^: a-forth-word ( a b c -- a*b+c )  + * ;$/
@@ -2489,6 +2504,7 @@ b c-src/h.h       41
 b      c-src/h.h       103
 b      c-src/h.h       104
 b      cp-src/c.C      132
+b      ruby-src/test1.ruby     /^ def b()$/
 backslash=0    tex-src/texinfo.tex     /^\\let\\indexbackslash=0  %overridden during \\printin/
 bar    c-src/c.c       /^void bar() {while(0) {}}$/
 bar    c.c     143
@@ -2604,6 +2620,10 @@ childDidExit     objc-src/Subprocess.m   /^- childDidExit$/
 chunks_free    c-src/emacs/src/gmalloc.c       313
 chunks_used    c-src/emacs/src/gmalloc.c       311
 cjava  c-src/etags.c   2936
+class_method   ruby-src/test.rb        /^        def class_method$/
+class_method_equals=   ruby-src/test.rb        /^        def class_method_equals=$/
+class_method_exclamation!      ruby-src/test.rb        /^        def class_method_exclamation!$/
+class_method_question? ruby-src/test.rb        /^        def class_method_question?$/
 classifyLine   php-src/lce_functions.php       /^      function classifyLine($line)$/
 clear  cp-src/conway.hpp       /^    void clear(void) { alive = 0; }$/
 clear-abbrev-table     c-src/abbrev.c  /^DEFUN ("clear-abbrev-table", Fclear_abbrev_table, /
@@ -3428,6 +3448,7 @@ miti      html-src/softwarelibero.html    /^Sfatiamo alcuni miti$/
 modifier_names c-src/emacs/src/keyboard.c      6319
 modifier_symbols       c-src/emacs/src/keyboard.c      6327
 modify_event_symbol    c-src/emacs/src/keyboard.c      /^modify_event_symbol (ptrdiff_t symbol_num, int mod/
+module_method  ruby-src/test.rb        /^    def module_method$/
 more_aligned_int       c.c     165
 morecore_nolock        c-src/emacs/src/gmalloc.c       /^morecore_nolock (size_t size)$/
 morecore_recursing     c-src/emacs/src/gmalloc.c       604
index 5a5e5d2c3c95d0c5119e9ee1720f3a443204c93d..1c4664d47a86da59676eb4b40d5abba5f145f636 100644 (file)
@@ -2973,6 +2973,31 @@ class Configure(\7f760,24879
     def save(\7f797,26022
     def nosave(\7f807,26310
 \f
+ruby-src/test.rb,594
+module ModuleExample\7f1,0
+    class ClassExample\7f2,21
+        def class_method\7f3,44
+        def ClassExample.singleton_class_method\7f6,116
+        def class_method_exclamation!\7f9,221
+        def class_method_question?\7f12,319
+        def class_method_equals=\7fclass_method_equals=\ 115,411
+        def `(\7f18,499
+        def +(\7f21,589
+        def [](\7f24,637
+        def []=(\7f[]=\ 127,687
+        def <<(\7f30,749
+        def ==(\7f==\ 133,799
+        def <=(\7f<=\ 136,869
+        def <=>(\7f<=>\ 139,940
+        def ===(\7f===\ 142,987
+    def module_method\7f46,1048
+    def ModuleExample.singleton_module_method\7f49,1110
+\f
+ruby-src/test1.ruby,37
+class A\7f1,0
+ def a(\7f2,8
+ def b(\7f5,38
+\f
 tex-src/testenv.tex,52
 \newcommand{\nm}\7f\nm\ 14,77
 \section{blah}\7fblah\ 18,139
index 3e5285af1cc015d98518bb72a1af2c3e8d89bd9d..5f82e8c6b1c61c74a721dc7d2c71dbfcf677583e 100644 (file)
@@ -3544,6 +3544,31 @@ class Configure(\7f760,24879
     def save(\7f797,26022
     def nosave(\7f807,26310
 \f
+ruby-src/test.rb,594
+module ModuleExample\7f1,0
+    class ClassExample\7f2,21
+        def class_method\7f3,44
+        def ClassExample.singleton_class_method\7f6,116
+        def class_method_exclamation!\7f9,221
+        def class_method_question?\7f12,319
+        def class_method_equals=\7fclass_method_equals=\ 115,411
+        def `(\7f18,499
+        def +(\7f21,589
+        def [](\7f24,637
+        def []=(\7f[]=\ 127,687
+        def <<(\7f30,749
+        def ==(\7f==\ 133,799
+        def <=(\7f<=\ 136,869
+        def <=>(\7f<=>\ 139,940
+        def ===(\7f===\ 142,987
+    def module_method\7f46,1048
+    def ModuleExample.singleton_module_method\7f49,1110
+\f
+ruby-src/test1.ruby,37
+class A\7f1,0
+ def a(\7f2,8
+ def b(\7f5,38
+\f
 tex-src/testenv.tex,52
 \newcommand{\nm}\7f\nm\ 14,77
 \section{blah}\7fblah\ 18,139
index 2f91126e1d125f4e45bb746b0f9e6806c63a4541..8ab9dc374827fff11bdf1aaf35fcc7412396c1f6 100644 (file)
@@ -3317,6 +3317,31 @@ class Configure(\7f760,24879
     def save(\7f797,26022
     def nosave(\7f807,26310
 \f
+ruby-src/test.rb,594
+module ModuleExample\7f1,0
+    class ClassExample\7f2,21
+        def class_method\7f3,44
+        def ClassExample.singleton_class_method\7f6,116
+        def class_method_exclamation!\7f9,221
+        def class_method_question?\7f12,319
+        def class_method_equals=\7fclass_method_equals=\ 115,411
+        def `(\7f18,499
+        def +(\7f21,589
+        def [](\7f24,637
+        def []=(\7f[]=\ 127,687
+        def <<(\7f30,749
+        def ==(\7f==\ 133,799
+        def <=(\7f<=\ 136,869
+        def <=>(\7f<=>\ 139,940
+        def ===(\7f===\ 142,987
+    def module_method\7f46,1048
+    def ModuleExample.singleton_module_method\7f49,1110
+\f
+ruby-src/test1.ruby,37
+class A\7f1,0
+ def a(\7f2,8
+ def b(\7f5,38
+\f
 tex-src/testenv.tex,52
 \newcommand{\nm}\7f\nm\ 14,77
 \section{blah}\7fblah\ 18,139
index 71fc2cbda89e50e9191d2dacf59eee6668146dda..39a2f6efe7467af7182839a962f1c231957de7fd 100644 (file)
@@ -3137,6 +3137,31 @@ class Configure(\7f760,24879
     def save(\7f797,26022
     def nosave(\7f807,26310
 \f
+ruby-src/test.rb,594
+module ModuleExample\7f1,0
+    class ClassExample\7f2,21
+        def class_method\7f3,44
+        def ClassExample.singleton_class_method\7f6,116
+        def class_method_exclamation!\7f9,221
+        def class_method_question?\7f12,319
+        def class_method_equals=\7fclass_method_equals=\ 115,411
+        def `(\7f18,499
+        def +(\7f21,589
+        def [](\7f24,637
+        def []=(\7f[]=\ 127,687
+        def <<(\7f30,749
+        def ==(\7f==\ 133,799
+        def <=(\7f<=\ 136,869
+        def <=>(\7f<=>\ 139,940
+        def ===(\7f===\ 142,987
+    def module_method\7f46,1048
+    def ModuleExample.singleton_module_method\7f49,1110
+\f
+ruby-src/test1.ruby,37
+class A\7f1,0
+ def a(\7f2,8
+ def b(\7f5,38
+\f
 tex-src/testenv.tex,52
 \newcommand{\nm}\7f\nm\ 14,77
 \section{blah}\7fblah\ 18,139
index ca55b3b0ad75ae15b6e338b690679bfadca34577..a820d81208aa5ca98a245dc5c7cd494391fc3a6e 100644 (file)
@@ -4052,6 +4052,31 @@ class Configure(\7f760,24879
     def save(\7f797,26022
     def nosave(\7f807,26310
 \f
+ruby-src/test.rb,594
+module ModuleExample\7f1,0
+    class ClassExample\7f2,21
+        def class_method\7f3,44
+        def ClassExample.singleton_class_method\7f6,116
+        def class_method_exclamation!\7f9,221
+        def class_method_question?\7f12,319
+        def class_method_equals=\7fclass_method_equals=\ 115,411
+        def `(\7f18,499
+        def +(\7f21,589
+        def [](\7f24,637
+        def []=(\7f[]=\ 127,687
+        def <<(\7f30,749
+        def ==(\7f==\ 133,799
+        def <=(\7f<=\ 136,869
+        def <=>(\7f<=>\ 139,940
+        def ===(\7f===\ 142,987
+    def module_method\7f46,1048
+    def ModuleExample.singleton_module_method\7f49,1110
+\f
+ruby-src/test1.ruby,37
+class A\7f1,0
+ def a(\7f2,8
+ def b(\7f5,38
+\f
 tex-src/testenv.tex,52
 \newcommand{\nm}\7f\nm\ 14,77
 \section{blah}\7fblah\ 18,139
index 1ec846334ea15d0d59f2a332ad61e898d8b807d9..c305147044129d115678c9fa90cd57786741bea2 100644 (file)
@@ -4052,6 +4052,31 @@ class Configure(\7f760,24879
     def save(\7f797,26022
     def nosave(\7f807,26310
 \f
+ruby-src/test.rb,594
+module ModuleExample\7f1,0
+    class ClassExample\7f2,21
+        def class_method\7f3,44
+        def ClassExample.singleton_class_method\7f6,116
+        def class_method_exclamation!\7f9,221
+        def class_method_question?\7f12,319
+        def class_method_equals=\7fclass_method_equals=\ 115,411
+        def `(\7f18,499
+        def +(\7f21,589
+        def [](\7f24,637
+        def []=(\7f[]=\ 127,687
+        def <<(\7f30,749
+        def ==(\7f==\ 133,799
+        def <=(\7f<=\ 136,869
+        def <=>(\7f<=>\ 139,940
+        def ===(\7f===\ 142,987
+    def module_method\7f46,1048
+    def ModuleExample.singleton_module_method\7f49,1110
+\f
+ruby-src/test1.ruby,37
+class A\7f1,0
+ def a(\7f2,8
+ def b(\7f5,38
+\f
 tex-src/testenv.tex,52
 \newcommand{\nm}\7f\nm\ 14,77
 \section{blah}\7fblah\ 18,139
index 1c50f72597133762cea5ab6e41d4e375a30cab34..00d5b9f52b215be1a30bf268c0e0dd9359e30db1 100644 (file)
@@ -23,12 +23,13 @@ PHPSRC=$(addprefix ./php-src/,lce_functions.php ptest.php sendmail.php)
 PSSRC=$(addprefix ./ps-src/,rfc1245.ps)
 PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog)
 PYTSRC=$(addprefix ./pyt-src/,server.py)
+RBSRC=$(addprefix ./ruby-src/,test.rb test1.ruby)
 TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex)
 YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y)
 SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\
      ${FORTHSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC} ${OBJCSRC}\
      ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC} ${PROLSRC} ${PYTSRC}\
-     ${TEXSRC} ${YSRC}
+     ${RBSRC} ${TEXSRC} ${YSRC}
 NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz
 
 ETAGS_PROG=../../lib-src/etags
diff --git a/test/etags/ruby-src/test.rb b/test/etags/ruby-src/test.rb
new file mode 100644 (file)
index 0000000..9254c5b
--- /dev/null
@@ -0,0 +1,54 @@
+module ModuleExample
+    class ClassExample
+        def class_method
+            puts "in class_method"
+        end
+        def ClassExample.singleton_class_method
+            puts "in singleton_class_method"
+        end
+        def class_method_exclamation!
+            puts "in class_method_exclamation!"
+        end
+        def class_method_question?
+            puts "in class_method_question?"
+        end
+        def class_method_equals=
+            puts "in class_method_equals="
+        end
+        def `(command)
+            return "just testing a backquote override"
+        end
+        def +(y)
+            @x + y
+        end
+        def [](y)
+            @ary[y]
+        end
+        def []=(y, val)
+            @ary[y] = val
+        end
+        def <<(y)
+            @x << y
+        end
+        def ==(y)
+            @ary.length == y.ary.length
+        end
+        def <=(y)
+            '@ary.length < y.ary.length'
+        end
+        def <=>(y)
+            nil
+        end
+        def ===(y)
+            self == y
+        end
+    end
+    def module_method
+        puts "in module_method"
+    end
+    def ModuleExample.singleton_module_method
+        puts "in singleton_module_method"
+    end
+end
+
+ModuleExample::ClassExample.singleton_class_method
diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby
new file mode 100644 (file)
index 0000000..43b1a14
--- /dev/null
@@ -0,0 +1,7 @@
+class A
+ def a()
+  super(" do ")
+ end
+ def b()
+ end
+end