]> code.delx.au - gnu-emacs/blob - test/manual/etags/ruby-src/test.rb
; Merge from origin/emacs-25
[gnu-emacs] / test / manual / etags / ruby-src / test.rb
1 module ModuleExample
2 class ClassExample
3 def instance_method
4 puts "in instane_method"
5 end
6 def ClassExample.class_method
7 puts "in class_method"
8 end
9 def instance_method_exclamation!
10 puts "in instance_method_exclamation!"
11 end
12 def instance_method_question?
13 puts "in instance_method_question?"
14 end
15 def instance_method_equals=
16 puts "in instance_method_equals="
17 end
18 def `(command)
19 return "just testing a backquote override"
20 end
21 def +(y)
22 @x + y
23 end
24 def [](y)
25 @ary[y]
26 end
27 def []=(y, val)
28 @ary[y] = val
29 end
30 def <<(y)
31 @x << y
32 end
33 def ==(y)
34 @ary.length == y.ary.length
35 end
36 def <=(y)
37 '@ary.length < y.ary.length'
38 end
39 def <=>(y)
40 nil
41 end
42 def ===(y)
43 self == y
44 end
45 end
46 def module_instance_method
47 puts "in module_instance_method"
48 end
49 def ModuleExample.module_class_method
50 puts "in module_class_method"
51 end
52 end
53
54 ModuleExample::ClassExample.class_method
55
56 # Local Variables:
57 # ruby-indent-level: 4
58 # End: