ruby-lint 1.0.0.pre.preview1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +15 -0
- data/MANIFEST +93 -0
- data/checksum/ruby-lint-1.0.0.pre.preview1.gem.sha512 +1 -0
- data/doc/changelog.md +40 -0
- data/lib/ruby-lint.rb +1 -1
- data/lib/ruby-lint/definitions/core/abbrev.rb +18 -0
- data/lib/ruby-lint/definitions/core/base64.rb +37 -0
- data/lib/ruby-lint/definitions/core/basic_socket.rb +685 -0
- data/lib/ruby-lint/definitions/core/benchmark.rb +41 -0
- data/lib/ruby-lint/definitions/core/cgi.rb +93 -0
- data/lib/ruby-lint/definitions/core/common_headers.rb +555 -0
- data/lib/ruby-lint/definitions/core/common_libs.rb +428 -0
- data/lib/ruby-lint/definitions/core/config.rb +325 -0
- data/lib/ruby-lint/definitions/core/conftest_c.rb +555 -0
- data/lib/ruby-lint/definitions/core/coutflag.rb +555 -0
- data/lib/ruby-lint/definitions/core/csv.rb +488 -0
- data/lib/ruby-lint/definitions/core/delegator.rb +73 -0
- data/lib/ruby-lint/definitions/core/drb.rb +69 -0
- data/lib/ruby-lint/definitions/core/drb_id_conv.rb +27 -0
- data/lib/ruby-lint/definitions/core/drb_object.rb +81 -0
- data/lib/ruby-lint/definitions/core/drb_undumped.rb +17 -0
- data/lib/ruby-lint/definitions/core/exception_for_matrix.rb +57 -0
- data/lib/ruby-lint/definitions/core/export_prefix.rb +23 -0
- data/lib/ruby-lint/definitions/core/failed_message.rb +555 -0
- data/lib/ruby-lint/definitions/core/fcntl.rb +13 -0
- data/lib/ruby-lint/definitions/core/find.rb +19 -0
- data/lib/ruby-lint/definitions/core/forwardable.rb +47 -0
- data/lib/ruby-lint/definitions/core/getopt_long.rb +60 -0
- data/lib/ruby-lint/definitions/core/gserver.rb +92 -0
- data/lib/ruby-lint/definitions/core/hdr_ext.rb +428 -0
- data/lib/ruby-lint/definitions/core/install_dirs.rb +428 -0
- data/lib/ruby-lint/definitions/core/ipaddr.rb +140 -0
- data/lib/ruby-lint/definitions/core/ipsocket.rb +696 -0
- data/lib/ruby-lint/definitions/core/irb.rb +64 -0
- data/lib/ruby-lint/definitions/core/json.rb +128 -0
- data/lib/ruby-lint/definitions/core/kconv.rb +67 -0
- data/lib/ruby-lint/definitions/core/libarg.rb +555 -0
- data/lib/ruby-lint/definitions/core/libpathflag.rb +555 -0
- data/lib/ruby-lint/definitions/core/link_so.rb +555 -0
- data/lib/ruby-lint/definitions/core/logger.rb +105 -0
- data/lib/ruby-lint/definitions/core/logging.rb +33 -0
- data/lib/ruby-lint/definitions/core/make_makefile.rb +495 -0
- data/lib/ruby-lint/definitions/core/matrix.rb +455 -0
- data/lib/ruby-lint/definitions/core/md5.rb +80 -0
- data/lib/ruby-lint/definitions/core/mutex_m.rb +43 -0
- data/lib/ruby-lint/definitions/core/nkf.rb +17 -0
- data/lib/ruby-lint/definitions/core/observable.rb +36 -0
- data/lib/ruby-lint/definitions/core/open3.rb +67 -0
- data/lib/ruby-lint/definitions/core/open_ssl.rb +25 -0
- data/lib/ruby-lint/definitions/core/open_uri.rb +43 -0
- data/lib/ruby-lint/definitions/core/orig_libpath.rb +39 -0
- data/lib/ruby-lint/definitions/core/outflag.rb +555 -0
- data/lib/ruby-lint/definitions/core/pathname.rb +287 -0
- data/lib/ruby-lint/definitions/core/pp.rb +154 -0
- data/lib/ruby-lint/definitions/core/pretty_print.rb +87 -0
- data/lib/ruby-lint/definitions/core/prime.rb +369 -0
- data/lib/ruby-lint/definitions/core/profiler__.rb +25 -0
- data/lib/ruby-lint/definitions/core/pstore.rb +61 -0
- data/lib/ruby-lint/definitions/core/psych.rb +139 -0
- data/lib/ruby-lint/definitions/core/rdoc.rb +15 -0
- data/lib/ruby-lint/definitions/core/readline.rb +79 -0
- data/lib/ruby-lint/definitions/core/resolv.rb +71 -0
- data/lib/ruby-lint/definitions/core/rexml.rb +13 -0
- data/lib/ruby-lint/definitions/core/rpathflag.rb +555 -0
- data/lib/ruby-lint/definitions/core/rss.rb +13 -0
- data/lib/ruby-lint/definitions/core/ruby_revision.rb +253 -0
- data/lib/ruby-lint/definitions/core/scanf.rb +13 -0
- data/lib/ruby-lint/definitions/core/secure_random.rb +38 -0
- data/lib/ruby-lint/definitions/core/set.rb +584 -0
- data/lib/ruby-lint/definitions/core/sha1.rb +80 -0
- data/lib/ruby-lint/definitions/core/simple_delegator.rb +37 -0
- data/lib/ruby-lint/definitions/core/single_forwardable.rb +43 -0
- data/lib/ruby-lint/definitions/core/socket.rb +777 -0
- data/lib/ruby-lint/definitions/core/socket_error.rb +61 -0
- data/lib/ruby-lint/definitions/core/sorted_set.rb +296 -0
- data/lib/ruby-lint/definitions/core/src_ext.rb +428 -0
- data/lib/ruby-lint/definitions/core/tcpserver.rb +707 -0
- data/lib/ruby-lint/definitions/core/tcpsocket.rb +707 -0
- data/lib/ruby-lint/definitions/core/tempfile.rb +860 -0
- data/lib/ruby-lint/definitions/core/th_wait.rb +89 -0
- data/lib/ruby-lint/definitions/core/threads_wait.rb +89 -0
- data/lib/ruby-lint/definitions/core/timeout.rb +25 -0
- data/lib/ruby-lint/definitions/core/timeout_error.rb +61 -0
- data/lib/ruby-lint/definitions/core/try_link.rb +555 -0
- data/lib/ruby-lint/definitions/core/tsort.rb +33 -0
- data/lib/ruby-lint/definitions/core/udpsocket.rb +712 -0
- data/lib/ruby-lint/definitions/core/universal_ints.rb +428 -0
- data/lib/ruby-lint/definitions/core/unixserver.rb +710 -0
- data/lib/ruby-lint/definitions/core/unixsocket.rb +702 -0
- data/lib/ruby-lint/definitions/core/uri.rb +71 -0
- data/lib/ruby-lint/definitions/core/vector.rb +323 -0
- data/lib/ruby-lint/definitions/core/webrick.rb +13 -0
- data/lib/ruby-lint/definitions/core/xmlrpc.rb +13 -0
- data/lib/ruby-lint/version.rb +1 -1
- data/misc/stdlib.rb +66 -0
- data/ruby-lint.gemspec +1 -1
- data/spec/fixtures/deeply/nested/file.rb +1 -0
- data/spec/ruby-lint/virtual_machine/assignments/range_spec.rb +28 -0
- data/task/build.rake +1 -1
- data/task/tag.rake +1 -1
- metadata +101 -8
@@ -0,0 +1,61 @@
|
|
1
|
+
# This file was automatically generated, any manual changes will be lost the
|
2
|
+
# next time this file is generated.
|
3
|
+
#
|
4
|
+
# Created: 2013-11-11 20:49:50 +0100
|
5
|
+
# Platform: rbx 2.1.1
|
6
|
+
|
7
|
+
RubyLint::GlobalScope.definitions.define_constant('SocketError') do |klass|
|
8
|
+
klass.inherits(RubyLint::GlobalScope.constant_proxy('StandardError'))
|
9
|
+
|
10
|
+
klass.define_method('exception') do |method|
|
11
|
+
method.define_rest_argument('args')
|
12
|
+
end
|
13
|
+
|
14
|
+
klass.define_instance_method('__initialize__') do |method|
|
15
|
+
method.define_optional_argument('message')
|
16
|
+
end
|
17
|
+
|
18
|
+
klass.define_instance_method('awesome_backtrace')
|
19
|
+
|
20
|
+
klass.define_instance_method('backtrace')
|
21
|
+
|
22
|
+
klass.define_instance_method('backtrace?')
|
23
|
+
|
24
|
+
klass.define_instance_method('capture_backtrace!') do |method|
|
25
|
+
method.define_optional_argument('offset')
|
26
|
+
end
|
27
|
+
|
28
|
+
klass.define_instance_method('exception') do |method|
|
29
|
+
method.define_optional_argument('message')
|
30
|
+
end
|
31
|
+
|
32
|
+
klass.define_instance_method('initialize') do |method|
|
33
|
+
method.define_optional_argument('message')
|
34
|
+
end
|
35
|
+
|
36
|
+
klass.define_instance_method('location')
|
37
|
+
|
38
|
+
klass.define_instance_method('locations')
|
39
|
+
|
40
|
+
klass.define_instance_method('locations=')
|
41
|
+
|
42
|
+
klass.define_instance_method('parent')
|
43
|
+
|
44
|
+
klass.define_instance_method('parent=')
|
45
|
+
|
46
|
+
klass.define_instance_method('render') do |method|
|
47
|
+
method.define_optional_argument('header')
|
48
|
+
method.define_optional_argument('io')
|
49
|
+
method.define_optional_argument('color')
|
50
|
+
end
|
51
|
+
|
52
|
+
klass.define_instance_method('set_backtrace') do |method|
|
53
|
+
method.define_argument('bt')
|
54
|
+
end
|
55
|
+
|
56
|
+
klass.define_instance_method('set_context') do |method|
|
57
|
+
method.define_argument('ctx')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
RubyLint::GlobalScope.definitions.lookup(:const, 'SocketError').deep_freeze
|
@@ -0,0 +1,296 @@
|
|
1
|
+
# This file was automatically generated, any manual changes will be lost the
|
2
|
+
# next time this file is generated.
|
3
|
+
#
|
4
|
+
# Created: 2013-11-11 20:10:55 +0100
|
5
|
+
# Platform: rbx 2.1.1
|
6
|
+
|
7
|
+
RubyLint::GlobalScope.definitions.define_constant('SortedSet') do |klass|
|
8
|
+
klass.inherits(RubyLint::GlobalScope.constant_proxy('Set'))
|
9
|
+
|
10
|
+
klass.inherits(RubyLint::GlobalScope.constant_proxy('Enumerable'))
|
11
|
+
|
12
|
+
klass.define_method('[]') do |method|
|
13
|
+
method.define_rest_argument('ary')
|
14
|
+
end
|
15
|
+
|
16
|
+
klass.define_method('setup')
|
17
|
+
|
18
|
+
klass.define_instance_method('&') do |method|
|
19
|
+
method.define_argument('enum')
|
20
|
+
end
|
21
|
+
|
22
|
+
klass.define_instance_method('+') do |method|
|
23
|
+
method.define_argument('enum')
|
24
|
+
end
|
25
|
+
|
26
|
+
klass.define_instance_method('-') do |method|
|
27
|
+
method.define_argument('enum')
|
28
|
+
end
|
29
|
+
|
30
|
+
klass.define_instance_method('<<') do |method|
|
31
|
+
method.define_argument('o')
|
32
|
+
end
|
33
|
+
|
34
|
+
klass.define_instance_method('^') do |method|
|
35
|
+
method.define_argument('enum')
|
36
|
+
end
|
37
|
+
|
38
|
+
klass.define_instance_method('add') do |method|
|
39
|
+
method.define_argument('o')
|
40
|
+
end
|
41
|
+
|
42
|
+
klass.define_instance_method('add?') do |method|
|
43
|
+
method.define_argument('o')
|
44
|
+
end
|
45
|
+
|
46
|
+
klass.define_instance_method('all?')
|
47
|
+
|
48
|
+
klass.define_instance_method('any?')
|
49
|
+
|
50
|
+
klass.define_instance_method('chunk') do |method|
|
51
|
+
method.define_optional_argument('initial_state')
|
52
|
+
end
|
53
|
+
|
54
|
+
klass.define_instance_method('classify')
|
55
|
+
|
56
|
+
klass.define_instance_method('clear')
|
57
|
+
|
58
|
+
klass.define_instance_method('collect')
|
59
|
+
|
60
|
+
klass.define_instance_method('collect!')
|
61
|
+
|
62
|
+
klass.define_instance_method('collect_concat')
|
63
|
+
|
64
|
+
klass.define_instance_method('count') do |method|
|
65
|
+
method.define_optional_argument('item')
|
66
|
+
end
|
67
|
+
|
68
|
+
klass.define_instance_method('cycle') do |method|
|
69
|
+
method.define_optional_argument('many')
|
70
|
+
end
|
71
|
+
|
72
|
+
klass.define_instance_method('delete') do |method|
|
73
|
+
method.define_argument('o')
|
74
|
+
end
|
75
|
+
|
76
|
+
klass.define_instance_method('delete?') do |method|
|
77
|
+
method.define_argument('o')
|
78
|
+
end
|
79
|
+
|
80
|
+
klass.define_instance_method('delete_if')
|
81
|
+
|
82
|
+
klass.define_instance_method('detect') do |method|
|
83
|
+
method.define_optional_argument('ifnone')
|
84
|
+
end
|
85
|
+
|
86
|
+
klass.define_instance_method('difference') do |method|
|
87
|
+
method.define_argument('enum')
|
88
|
+
end
|
89
|
+
|
90
|
+
klass.define_instance_method('divide') do |method|
|
91
|
+
method.define_block_argument('func')
|
92
|
+
end
|
93
|
+
|
94
|
+
klass.define_instance_method('drop') do |method|
|
95
|
+
method.define_argument('n')
|
96
|
+
end
|
97
|
+
|
98
|
+
klass.define_instance_method('drop_while')
|
99
|
+
|
100
|
+
klass.define_instance_method('each')
|
101
|
+
|
102
|
+
klass.define_instance_method('each_cons') do |method|
|
103
|
+
method.define_argument('num')
|
104
|
+
end
|
105
|
+
|
106
|
+
klass.define_instance_method('each_entry') do |method|
|
107
|
+
method.define_rest_argument('pass')
|
108
|
+
end
|
109
|
+
|
110
|
+
klass.define_instance_method('each_slice') do |method|
|
111
|
+
method.define_argument('slice_size')
|
112
|
+
end
|
113
|
+
|
114
|
+
klass.define_instance_method('each_with_index') do |method|
|
115
|
+
method.define_rest_argument('args')
|
116
|
+
end
|
117
|
+
|
118
|
+
klass.define_instance_method('each_with_object') do |method|
|
119
|
+
method.define_argument('memo')
|
120
|
+
end
|
121
|
+
|
122
|
+
klass.define_instance_method('empty?')
|
123
|
+
|
124
|
+
klass.define_instance_method('entries') do |method|
|
125
|
+
method.define_rest_argument('arg')
|
126
|
+
end
|
127
|
+
|
128
|
+
klass.define_instance_method('find') do |method|
|
129
|
+
method.define_optional_argument('ifnone')
|
130
|
+
end
|
131
|
+
|
132
|
+
klass.define_instance_method('find_all')
|
133
|
+
|
134
|
+
klass.define_instance_method('find_index') do |method|
|
135
|
+
method.define_optional_argument('value')
|
136
|
+
end
|
137
|
+
|
138
|
+
klass.define_instance_method('first') do |method|
|
139
|
+
method.define_optional_argument('n')
|
140
|
+
end
|
141
|
+
|
142
|
+
klass.define_instance_method('flat_map')
|
143
|
+
|
144
|
+
klass.define_instance_method('flatten')
|
145
|
+
|
146
|
+
klass.define_instance_method('flatten!')
|
147
|
+
|
148
|
+
klass.define_instance_method('flatten_merge') do |method|
|
149
|
+
method.define_argument('set')
|
150
|
+
method.define_optional_argument('seen')
|
151
|
+
end
|
152
|
+
|
153
|
+
klass.define_instance_method('grep') do |method|
|
154
|
+
method.define_argument('pattern')
|
155
|
+
end
|
156
|
+
|
157
|
+
klass.define_instance_method('group_by')
|
158
|
+
|
159
|
+
klass.define_instance_method('include?') do |method|
|
160
|
+
method.define_argument('o')
|
161
|
+
end
|
162
|
+
|
163
|
+
klass.define_instance_method('inject') do |method|
|
164
|
+
method.define_optional_argument('initial')
|
165
|
+
method.define_optional_argument('sym')
|
166
|
+
end
|
167
|
+
|
168
|
+
klass.define_instance_method('intersection') do |method|
|
169
|
+
method.define_argument('enum')
|
170
|
+
end
|
171
|
+
|
172
|
+
klass.define_instance_method('keep_if')
|
173
|
+
|
174
|
+
klass.define_instance_method('lazy')
|
175
|
+
|
176
|
+
klass.define_instance_method('length')
|
177
|
+
|
178
|
+
klass.define_instance_method('map')
|
179
|
+
|
180
|
+
klass.define_instance_method('map!')
|
181
|
+
|
182
|
+
klass.define_instance_method('max')
|
183
|
+
|
184
|
+
klass.define_instance_method('max_by')
|
185
|
+
|
186
|
+
klass.define_instance_method('member?') do |method|
|
187
|
+
method.define_argument('o')
|
188
|
+
end
|
189
|
+
|
190
|
+
klass.define_instance_method('merge') do |method|
|
191
|
+
method.define_argument('enum')
|
192
|
+
end
|
193
|
+
|
194
|
+
klass.define_instance_method('min')
|
195
|
+
|
196
|
+
klass.define_instance_method('min_by')
|
197
|
+
|
198
|
+
klass.define_instance_method('minmax')
|
199
|
+
|
200
|
+
klass.define_instance_method('minmax_by')
|
201
|
+
|
202
|
+
klass.define_instance_method('none?')
|
203
|
+
|
204
|
+
klass.define_instance_method('one?')
|
205
|
+
|
206
|
+
klass.define_instance_method('partition')
|
207
|
+
|
208
|
+
klass.define_instance_method('pretty_print') do |method|
|
209
|
+
method.define_argument('pp')
|
210
|
+
end
|
211
|
+
|
212
|
+
klass.define_instance_method('pretty_print_cycle') do |method|
|
213
|
+
method.define_argument('pp')
|
214
|
+
end
|
215
|
+
|
216
|
+
klass.define_instance_method('proper_subset?') do |method|
|
217
|
+
method.define_argument('set')
|
218
|
+
end
|
219
|
+
|
220
|
+
klass.define_instance_method('proper_superset?') do |method|
|
221
|
+
method.define_argument('set')
|
222
|
+
end
|
223
|
+
|
224
|
+
klass.define_instance_method('reduce') do |method|
|
225
|
+
method.define_optional_argument('initial')
|
226
|
+
method.define_optional_argument('sym')
|
227
|
+
end
|
228
|
+
|
229
|
+
klass.define_instance_method('reject')
|
230
|
+
|
231
|
+
klass.define_instance_method('reject!')
|
232
|
+
|
233
|
+
klass.define_instance_method('replace') do |method|
|
234
|
+
method.define_argument('enum')
|
235
|
+
end
|
236
|
+
|
237
|
+
klass.define_instance_method('reverse_each')
|
238
|
+
|
239
|
+
klass.define_instance_method('select')
|
240
|
+
|
241
|
+
klass.define_instance_method('select!')
|
242
|
+
|
243
|
+
klass.define_instance_method('size')
|
244
|
+
|
245
|
+
klass.define_instance_method('slice_before') do |method|
|
246
|
+
method.define_optional_argument('arg')
|
247
|
+
end
|
248
|
+
|
249
|
+
klass.define_instance_method('sort')
|
250
|
+
|
251
|
+
klass.define_instance_method('sort_by')
|
252
|
+
|
253
|
+
klass.define_instance_method('subset?') do |method|
|
254
|
+
method.define_argument('set')
|
255
|
+
end
|
256
|
+
|
257
|
+
klass.define_instance_method('subtract') do |method|
|
258
|
+
method.define_argument('enum')
|
259
|
+
end
|
260
|
+
|
261
|
+
klass.define_instance_method('superset?') do |method|
|
262
|
+
method.define_argument('set')
|
263
|
+
end
|
264
|
+
|
265
|
+
klass.define_instance_method('take') do |method|
|
266
|
+
method.define_argument('n')
|
267
|
+
end
|
268
|
+
|
269
|
+
klass.define_instance_method('take_while')
|
270
|
+
|
271
|
+
klass.define_instance_method('to_a')
|
272
|
+
|
273
|
+
klass.define_instance_method('to_set') do |method|
|
274
|
+
method.define_optional_argument('klass')
|
275
|
+
method.define_rest_argument('args')
|
276
|
+
method.define_block_argument('block')
|
277
|
+
end
|
278
|
+
|
279
|
+
klass.define_instance_method('union') do |method|
|
280
|
+
method.define_argument('enum')
|
281
|
+
end
|
282
|
+
|
283
|
+
klass.define_instance_method('with_object') do |method|
|
284
|
+
method.define_argument('memo')
|
285
|
+
end
|
286
|
+
|
287
|
+
klass.define_instance_method('zip') do |method|
|
288
|
+
method.define_rest_argument('args')
|
289
|
+
end
|
290
|
+
|
291
|
+
klass.define_instance_method('|') do |method|
|
292
|
+
method.define_argument('enum')
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
RubyLint::GlobalScope.definitions.lookup(:const, 'SortedSet').deep_freeze
|
@@ -0,0 +1,428 @@
|
|
1
|
+
# This file was automatically generated, any manual changes will be lost the
|
2
|
+
# next time this file is generated.
|
3
|
+
#
|
4
|
+
# Created: 2013-11-11 20:49:50 +0100
|
5
|
+
# Platform: rbx 2.1.1
|
6
|
+
|
7
|
+
RubyLint::GlobalScope.definitions.define_constant('SRC_EXT') do |klass|
|
8
|
+
klass.inherits(RubyLint::GlobalScope.constant_proxy('Object'))
|
9
|
+
|
10
|
+
klass.define_method('&') do |method|
|
11
|
+
method.define_argument('other')
|
12
|
+
end
|
13
|
+
|
14
|
+
klass.define_method('*') do |method|
|
15
|
+
method.define_argument('multiplier')
|
16
|
+
end
|
17
|
+
|
18
|
+
klass.define_method('+') do |method|
|
19
|
+
method.define_argument('other')
|
20
|
+
end
|
21
|
+
|
22
|
+
klass.define_method('-') do |method|
|
23
|
+
method.define_argument('other')
|
24
|
+
end
|
25
|
+
|
26
|
+
klass.define_method('<<') do |method|
|
27
|
+
method.define_argument('obj')
|
28
|
+
end
|
29
|
+
|
30
|
+
klass.define_method('[]') do |method|
|
31
|
+
method.define_argument('arg1')
|
32
|
+
method.define_optional_argument('arg2')
|
33
|
+
end
|
34
|
+
|
35
|
+
klass.define_method('[]=') do |method|
|
36
|
+
method.define_argument('index')
|
37
|
+
method.define_argument('ent')
|
38
|
+
method.define_optional_argument('fin')
|
39
|
+
end
|
40
|
+
|
41
|
+
klass.define_method('__append__') do |method|
|
42
|
+
method.define_argument('obj')
|
43
|
+
end
|
44
|
+
|
45
|
+
klass.define_method('__rescue_match__') do |method|
|
46
|
+
method.define_argument('exception')
|
47
|
+
end
|
48
|
+
|
49
|
+
klass.define_method('abbrev') do |method|
|
50
|
+
method.define_optional_argument('pattern')
|
51
|
+
end
|
52
|
+
|
53
|
+
klass.define_method('all?')
|
54
|
+
|
55
|
+
klass.define_method('any?')
|
56
|
+
|
57
|
+
klass.define_method('assoc') do |method|
|
58
|
+
method.define_argument('obj')
|
59
|
+
end
|
60
|
+
|
61
|
+
klass.define_method('at') do |method|
|
62
|
+
method.define_argument('idx')
|
63
|
+
end
|
64
|
+
|
65
|
+
klass.define_method('chunk') do |method|
|
66
|
+
method.define_optional_argument('initial_state')
|
67
|
+
end
|
68
|
+
|
69
|
+
klass.define_method('clear')
|
70
|
+
|
71
|
+
klass.define_method('collect')
|
72
|
+
|
73
|
+
klass.define_method('collect!')
|
74
|
+
|
75
|
+
klass.define_method('collect_concat')
|
76
|
+
|
77
|
+
klass.define_method('combination') do |method|
|
78
|
+
method.define_argument('num')
|
79
|
+
end
|
80
|
+
|
81
|
+
klass.define_method('compact')
|
82
|
+
|
83
|
+
klass.define_method('compact!')
|
84
|
+
|
85
|
+
klass.define_method('concat') do |method|
|
86
|
+
method.define_argument('other')
|
87
|
+
end
|
88
|
+
|
89
|
+
klass.define_method('count') do |method|
|
90
|
+
method.define_optional_argument('item')
|
91
|
+
end
|
92
|
+
|
93
|
+
klass.define_method('cycle') do |method|
|
94
|
+
method.define_optional_argument('n')
|
95
|
+
end
|
96
|
+
|
97
|
+
klass.define_method('delete') do |method|
|
98
|
+
method.define_argument('obj')
|
99
|
+
end
|
100
|
+
|
101
|
+
klass.define_method('delete_at') do |method|
|
102
|
+
method.define_argument('idx')
|
103
|
+
end
|
104
|
+
|
105
|
+
klass.define_method('delete_if')
|
106
|
+
|
107
|
+
klass.define_method('detect') do |method|
|
108
|
+
method.define_optional_argument('ifnone')
|
109
|
+
end
|
110
|
+
|
111
|
+
klass.define_method('drop') do |method|
|
112
|
+
method.define_argument('n')
|
113
|
+
end
|
114
|
+
|
115
|
+
klass.define_method('drop_while')
|
116
|
+
|
117
|
+
klass.define_method('each')
|
118
|
+
|
119
|
+
klass.define_method('each_cons') do |method|
|
120
|
+
method.define_argument('num')
|
121
|
+
end
|
122
|
+
|
123
|
+
klass.define_method('each_entry') do |method|
|
124
|
+
method.define_rest_argument('pass')
|
125
|
+
end
|
126
|
+
|
127
|
+
klass.define_method('each_index')
|
128
|
+
|
129
|
+
klass.define_method('each_slice') do |method|
|
130
|
+
method.define_argument('slice_size')
|
131
|
+
end
|
132
|
+
|
133
|
+
klass.define_method('each_with_index') do |method|
|
134
|
+
method.define_rest_argument('args')
|
135
|
+
end
|
136
|
+
|
137
|
+
klass.define_method('each_with_object') do |method|
|
138
|
+
method.define_argument('memo')
|
139
|
+
end
|
140
|
+
|
141
|
+
klass.define_method('empty?')
|
142
|
+
|
143
|
+
klass.define_method('entries') do |method|
|
144
|
+
method.define_rest_argument('arg')
|
145
|
+
end
|
146
|
+
|
147
|
+
klass.define_method('fetch') do |method|
|
148
|
+
method.define_argument('idx')
|
149
|
+
method.define_optional_argument('default')
|
150
|
+
end
|
151
|
+
|
152
|
+
klass.define_method('fill') do |method|
|
153
|
+
method.define_optional_argument('a')
|
154
|
+
method.define_optional_argument('b')
|
155
|
+
method.define_optional_argument('c')
|
156
|
+
end
|
157
|
+
|
158
|
+
klass.define_method('find') do |method|
|
159
|
+
method.define_optional_argument('ifnone')
|
160
|
+
end
|
161
|
+
|
162
|
+
klass.define_method('find_all')
|
163
|
+
|
164
|
+
klass.define_method('find_index') do |method|
|
165
|
+
method.define_optional_argument('obj')
|
166
|
+
end
|
167
|
+
|
168
|
+
klass.define_method('first') do |method|
|
169
|
+
method.define_optional_argument('n')
|
170
|
+
end
|
171
|
+
|
172
|
+
klass.define_method('flat_map')
|
173
|
+
|
174
|
+
klass.define_method('flatten') do |method|
|
175
|
+
method.define_optional_argument('level')
|
176
|
+
end
|
177
|
+
|
178
|
+
klass.define_method('flatten!') do |method|
|
179
|
+
method.define_optional_argument('level')
|
180
|
+
end
|
181
|
+
|
182
|
+
klass.define_method('grep') do |method|
|
183
|
+
method.define_argument('pattern')
|
184
|
+
end
|
185
|
+
|
186
|
+
klass.define_method('group_by')
|
187
|
+
|
188
|
+
klass.define_method('index') do |method|
|
189
|
+
method.define_optional_argument('obj')
|
190
|
+
end
|
191
|
+
|
192
|
+
klass.define_method('inject') do |method|
|
193
|
+
method.define_optional_argument('initial')
|
194
|
+
method.define_optional_argument('sym')
|
195
|
+
end
|
196
|
+
|
197
|
+
klass.define_method('insert') do |method|
|
198
|
+
method.define_argument('idx')
|
199
|
+
method.define_rest_argument('items')
|
200
|
+
end
|
201
|
+
|
202
|
+
klass.define_method('join') do |method|
|
203
|
+
method.define_optional_argument('sep')
|
204
|
+
end
|
205
|
+
|
206
|
+
klass.define_method('keep_if')
|
207
|
+
|
208
|
+
klass.define_method('last') do |method|
|
209
|
+
method.define_optional_argument('n')
|
210
|
+
end
|
211
|
+
|
212
|
+
klass.define_method('lazy')
|
213
|
+
|
214
|
+
klass.define_method('length')
|
215
|
+
|
216
|
+
klass.define_method('map')
|
217
|
+
|
218
|
+
klass.define_method('map!')
|
219
|
+
|
220
|
+
klass.define_method('max')
|
221
|
+
|
222
|
+
klass.define_method('max_by')
|
223
|
+
|
224
|
+
klass.define_method('member?') do |method|
|
225
|
+
method.define_argument('obj')
|
226
|
+
end
|
227
|
+
|
228
|
+
klass.define_method('min')
|
229
|
+
|
230
|
+
klass.define_method('min_by')
|
231
|
+
|
232
|
+
klass.define_method('minmax')
|
233
|
+
|
234
|
+
klass.define_method('minmax_by')
|
235
|
+
|
236
|
+
klass.define_method('new_range') do |method|
|
237
|
+
method.define_argument('start')
|
238
|
+
method.define_argument('count')
|
239
|
+
end
|
240
|
+
|
241
|
+
klass.define_method('new_reserved') do |method|
|
242
|
+
method.define_argument('count')
|
243
|
+
end
|
244
|
+
|
245
|
+
klass.define_method('nitems')
|
246
|
+
|
247
|
+
klass.define_method('none?')
|
248
|
+
|
249
|
+
klass.define_method('one?')
|
250
|
+
|
251
|
+
klass.define_method('pack') do |method|
|
252
|
+
method.define_argument('directives')
|
253
|
+
end
|
254
|
+
|
255
|
+
klass.define_method('partition')
|
256
|
+
|
257
|
+
klass.define_method('permutation') do |method|
|
258
|
+
method.define_optional_argument('num')
|
259
|
+
end
|
260
|
+
|
261
|
+
klass.define_method('pop') do |method|
|
262
|
+
method.define_optional_argument('many')
|
263
|
+
end
|
264
|
+
|
265
|
+
klass.define_method('product') do |method|
|
266
|
+
method.define_rest_argument('args')
|
267
|
+
end
|
268
|
+
|
269
|
+
klass.define_method('push') do |method|
|
270
|
+
method.define_rest_argument('args')
|
271
|
+
end
|
272
|
+
|
273
|
+
klass.define_method('quote')
|
274
|
+
|
275
|
+
klass.define_method('rassoc') do |method|
|
276
|
+
method.define_argument('obj')
|
277
|
+
end
|
278
|
+
|
279
|
+
klass.define_method('reduce') do |method|
|
280
|
+
method.define_optional_argument('initial')
|
281
|
+
method.define_optional_argument('sym')
|
282
|
+
end
|
283
|
+
|
284
|
+
klass.define_method('reject')
|
285
|
+
|
286
|
+
klass.define_method('reject!')
|
287
|
+
|
288
|
+
klass.define_method('repeated_combination') do |method|
|
289
|
+
method.define_argument('combination_size')
|
290
|
+
end
|
291
|
+
|
292
|
+
klass.define_method('repeated_permutation') do |method|
|
293
|
+
method.define_argument('combination_size')
|
294
|
+
end
|
295
|
+
|
296
|
+
klass.define_method('replace') do |method|
|
297
|
+
method.define_argument('other')
|
298
|
+
end
|
299
|
+
|
300
|
+
klass.define_method('reverse')
|
301
|
+
|
302
|
+
klass.define_method('reverse!')
|
303
|
+
|
304
|
+
klass.define_method('reverse_each')
|
305
|
+
|
306
|
+
klass.define_method('rindex') do |method|
|
307
|
+
method.define_optional_argument('obj')
|
308
|
+
end
|
309
|
+
|
310
|
+
klass.define_method('rotate') do |method|
|
311
|
+
method.define_optional_argument('n')
|
312
|
+
end
|
313
|
+
|
314
|
+
klass.define_method('rotate!') do |method|
|
315
|
+
method.define_optional_argument('cnt')
|
316
|
+
end
|
317
|
+
|
318
|
+
klass.define_method('sample') do |method|
|
319
|
+
method.define_optional_argument('count')
|
320
|
+
method.define_optional_argument('options')
|
321
|
+
end
|
322
|
+
|
323
|
+
klass.define_method('select')
|
324
|
+
|
325
|
+
klass.define_method('select!')
|
326
|
+
|
327
|
+
klass.define_method('shelljoin')
|
328
|
+
|
329
|
+
klass.define_method('shift') do |method|
|
330
|
+
method.define_optional_argument('n')
|
331
|
+
end
|
332
|
+
|
333
|
+
klass.define_method('shuffle') do |method|
|
334
|
+
method.define_optional_argument('options')
|
335
|
+
end
|
336
|
+
|
337
|
+
klass.define_method('shuffle!') do |method|
|
338
|
+
method.define_optional_argument('options')
|
339
|
+
end
|
340
|
+
|
341
|
+
klass.define_method('size')
|
342
|
+
|
343
|
+
klass.define_method('slice') do |method|
|
344
|
+
method.define_argument('arg1')
|
345
|
+
method.define_optional_argument('arg2')
|
346
|
+
end
|
347
|
+
|
348
|
+
klass.define_method('slice!') do |method|
|
349
|
+
method.define_argument('start')
|
350
|
+
method.define_optional_argument('length')
|
351
|
+
end
|
352
|
+
|
353
|
+
klass.define_method('slice_before') do |method|
|
354
|
+
method.define_optional_argument('arg')
|
355
|
+
end
|
356
|
+
|
357
|
+
klass.define_method('sort')
|
358
|
+
|
359
|
+
klass.define_method('sort!')
|
360
|
+
|
361
|
+
klass.define_method('sort_by')
|
362
|
+
|
363
|
+
klass.define_method('sort_by!')
|
364
|
+
|
365
|
+
klass.define_method('sort_inplace')
|
366
|
+
|
367
|
+
klass.define_method('start')
|
368
|
+
|
369
|
+
klass.define_method('start=')
|
370
|
+
|
371
|
+
klass.define_method('take') do |method|
|
372
|
+
method.define_argument('n')
|
373
|
+
end
|
374
|
+
|
375
|
+
klass.define_method('take_while')
|
376
|
+
|
377
|
+
klass.define_method('to_a')
|
378
|
+
|
379
|
+
klass.define_method('to_ary')
|
380
|
+
|
381
|
+
klass.define_method('to_csv') do |method|
|
382
|
+
method.define_optional_argument('options')
|
383
|
+
end
|
384
|
+
|
385
|
+
klass.define_method('to_set') do |method|
|
386
|
+
method.define_optional_argument('klass')
|
387
|
+
method.define_rest_argument('args')
|
388
|
+
method.define_block_argument('block')
|
389
|
+
end
|
390
|
+
|
391
|
+
klass.define_method('to_tuple')
|
392
|
+
|
393
|
+
klass.define_method('total')
|
394
|
+
|
395
|
+
klass.define_method('total=')
|
396
|
+
|
397
|
+
klass.define_method('transpose')
|
398
|
+
|
399
|
+
klass.define_method('tuple')
|
400
|
+
|
401
|
+
klass.define_method('tuple=')
|
402
|
+
|
403
|
+
klass.define_method('uniq')
|
404
|
+
|
405
|
+
klass.define_method('uniq!')
|
406
|
+
|
407
|
+
klass.define_method('unshift') do |method|
|
408
|
+
method.define_rest_argument('values')
|
409
|
+
end
|
410
|
+
|
411
|
+
klass.define_method('values_at') do |method|
|
412
|
+
method.define_rest_argument('args')
|
413
|
+
end
|
414
|
+
|
415
|
+
klass.define_method('with_object') do |method|
|
416
|
+
method.define_argument('memo')
|
417
|
+
end
|
418
|
+
|
419
|
+
klass.define_method('zip') do |method|
|
420
|
+
method.define_rest_argument('others')
|
421
|
+
end
|
422
|
+
|
423
|
+
klass.define_method('|') do |method|
|
424
|
+
method.define_argument('other')
|
425
|
+
end
|
426
|
+
end
|
427
|
+
|
428
|
+
RubyLint::GlobalScope.definitions.lookup(:const, 'SRC_EXT').deep_freeze
|