blob: 934dba19ea897b2b624ab26aefd1d878e96c795a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# simple method definitions
def method param1, param2
# code
end
def method(args, *rest, &block)
# code
end
def
method(param1, param2)
# code
end
def \
method(param1, param2)
# code
end
def # comment
method(param1, param2)
# code
end
def [];end
def def;end
def end?;end
def a(*) end
def !; end # Ruby 1.9
# singleton methods
def Class.method
end
def self.method
end
def object.method
end
def $~.method
end
def nil.method
end
def true.method
end
def false.method
end
def __FILE__.method
end
def __LINE__.method
end
def __ENCODING__.method
end
def __ENCODING__.method
end
def @instance_variable.method
end
def @class_variable.method
end
def (Module::Class).method
end
def (complex.expression).method
end
def (complex.expression + another(complex(expression))).method
end
# crazy
def (class Foo
def initialize(args)
def yet_another_method; end
end
end).method(args, *rest, &block)
end
# wrong
def foo.bar.quux
end
|