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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +15 -0
  3. data/MANIFEST +93 -0
  4. data/checksum/ruby-lint-1.0.0.pre.preview1.gem.sha512 +1 -0
  5. data/doc/changelog.md +40 -0
  6. data/lib/ruby-lint.rb +1 -1
  7. data/lib/ruby-lint/definitions/core/abbrev.rb +18 -0
  8. data/lib/ruby-lint/definitions/core/base64.rb +37 -0
  9. data/lib/ruby-lint/definitions/core/basic_socket.rb +685 -0
  10. data/lib/ruby-lint/definitions/core/benchmark.rb +41 -0
  11. data/lib/ruby-lint/definitions/core/cgi.rb +93 -0
  12. data/lib/ruby-lint/definitions/core/common_headers.rb +555 -0
  13. data/lib/ruby-lint/definitions/core/common_libs.rb +428 -0
  14. data/lib/ruby-lint/definitions/core/config.rb +325 -0
  15. data/lib/ruby-lint/definitions/core/conftest_c.rb +555 -0
  16. data/lib/ruby-lint/definitions/core/coutflag.rb +555 -0
  17. data/lib/ruby-lint/definitions/core/csv.rb +488 -0
  18. data/lib/ruby-lint/definitions/core/delegator.rb +73 -0
  19. data/lib/ruby-lint/definitions/core/drb.rb +69 -0
  20. data/lib/ruby-lint/definitions/core/drb_id_conv.rb +27 -0
  21. data/lib/ruby-lint/definitions/core/drb_object.rb +81 -0
  22. data/lib/ruby-lint/definitions/core/drb_undumped.rb +17 -0
  23. data/lib/ruby-lint/definitions/core/exception_for_matrix.rb +57 -0
  24. data/lib/ruby-lint/definitions/core/export_prefix.rb +23 -0
  25. data/lib/ruby-lint/definitions/core/failed_message.rb +555 -0
  26. data/lib/ruby-lint/definitions/core/fcntl.rb +13 -0
  27. data/lib/ruby-lint/definitions/core/find.rb +19 -0
  28. data/lib/ruby-lint/definitions/core/forwardable.rb +47 -0
  29. data/lib/ruby-lint/definitions/core/getopt_long.rb +60 -0
  30. data/lib/ruby-lint/definitions/core/gserver.rb +92 -0
  31. data/lib/ruby-lint/definitions/core/hdr_ext.rb +428 -0
  32. data/lib/ruby-lint/definitions/core/install_dirs.rb +428 -0
  33. data/lib/ruby-lint/definitions/core/ipaddr.rb +140 -0
  34. data/lib/ruby-lint/definitions/core/ipsocket.rb +696 -0
  35. data/lib/ruby-lint/definitions/core/irb.rb +64 -0
  36. data/lib/ruby-lint/definitions/core/json.rb +128 -0
  37. data/lib/ruby-lint/definitions/core/kconv.rb +67 -0
  38. data/lib/ruby-lint/definitions/core/libarg.rb +555 -0
  39. data/lib/ruby-lint/definitions/core/libpathflag.rb +555 -0
  40. data/lib/ruby-lint/definitions/core/link_so.rb +555 -0
  41. data/lib/ruby-lint/definitions/core/logger.rb +105 -0
  42. data/lib/ruby-lint/definitions/core/logging.rb +33 -0
  43. data/lib/ruby-lint/definitions/core/make_makefile.rb +495 -0
  44. data/lib/ruby-lint/definitions/core/matrix.rb +455 -0
  45. data/lib/ruby-lint/definitions/core/md5.rb +80 -0
  46. data/lib/ruby-lint/definitions/core/mutex_m.rb +43 -0
  47. data/lib/ruby-lint/definitions/core/nkf.rb +17 -0
  48. data/lib/ruby-lint/definitions/core/observable.rb +36 -0
  49. data/lib/ruby-lint/definitions/core/open3.rb +67 -0
  50. data/lib/ruby-lint/definitions/core/open_ssl.rb +25 -0
  51. data/lib/ruby-lint/definitions/core/open_uri.rb +43 -0
  52. data/lib/ruby-lint/definitions/core/orig_libpath.rb +39 -0
  53. data/lib/ruby-lint/definitions/core/outflag.rb +555 -0
  54. data/lib/ruby-lint/definitions/core/pathname.rb +287 -0
  55. data/lib/ruby-lint/definitions/core/pp.rb +154 -0
  56. data/lib/ruby-lint/definitions/core/pretty_print.rb +87 -0
  57. data/lib/ruby-lint/definitions/core/prime.rb +369 -0
  58. data/lib/ruby-lint/definitions/core/profiler__.rb +25 -0
  59. data/lib/ruby-lint/definitions/core/pstore.rb +61 -0
  60. data/lib/ruby-lint/definitions/core/psych.rb +139 -0
  61. data/lib/ruby-lint/definitions/core/rdoc.rb +15 -0
  62. data/lib/ruby-lint/definitions/core/readline.rb +79 -0
  63. data/lib/ruby-lint/definitions/core/resolv.rb +71 -0
  64. data/lib/ruby-lint/definitions/core/rexml.rb +13 -0
  65. data/lib/ruby-lint/definitions/core/rpathflag.rb +555 -0
  66. data/lib/ruby-lint/definitions/core/rss.rb +13 -0
  67. data/lib/ruby-lint/definitions/core/ruby_revision.rb +253 -0
  68. data/lib/ruby-lint/definitions/core/scanf.rb +13 -0
  69. data/lib/ruby-lint/definitions/core/secure_random.rb +38 -0
  70. data/lib/ruby-lint/definitions/core/set.rb +584 -0
  71. data/lib/ruby-lint/definitions/core/sha1.rb +80 -0
  72. data/lib/ruby-lint/definitions/core/simple_delegator.rb +37 -0
  73. data/lib/ruby-lint/definitions/core/single_forwardable.rb +43 -0
  74. data/lib/ruby-lint/definitions/core/socket.rb +777 -0
  75. data/lib/ruby-lint/definitions/core/socket_error.rb +61 -0
  76. data/lib/ruby-lint/definitions/core/sorted_set.rb +296 -0
  77. data/lib/ruby-lint/definitions/core/src_ext.rb +428 -0
  78. data/lib/ruby-lint/definitions/core/tcpserver.rb +707 -0
  79. data/lib/ruby-lint/definitions/core/tcpsocket.rb +707 -0
  80. data/lib/ruby-lint/definitions/core/tempfile.rb +860 -0
  81. data/lib/ruby-lint/definitions/core/th_wait.rb +89 -0
  82. data/lib/ruby-lint/definitions/core/threads_wait.rb +89 -0
  83. data/lib/ruby-lint/definitions/core/timeout.rb +25 -0
  84. data/lib/ruby-lint/definitions/core/timeout_error.rb +61 -0
  85. data/lib/ruby-lint/definitions/core/try_link.rb +555 -0
  86. data/lib/ruby-lint/definitions/core/tsort.rb +33 -0
  87. data/lib/ruby-lint/definitions/core/udpsocket.rb +712 -0
  88. data/lib/ruby-lint/definitions/core/universal_ints.rb +428 -0
  89. data/lib/ruby-lint/definitions/core/unixserver.rb +710 -0
  90. data/lib/ruby-lint/definitions/core/unixsocket.rb +702 -0
  91. data/lib/ruby-lint/definitions/core/uri.rb +71 -0
  92. data/lib/ruby-lint/definitions/core/vector.rb +323 -0
  93. data/lib/ruby-lint/definitions/core/webrick.rb +13 -0
  94. data/lib/ruby-lint/definitions/core/xmlrpc.rb +13 -0
  95. data/lib/ruby-lint/version.rb +1 -1
  96. data/misc/stdlib.rb +66 -0
  97. data/ruby-lint.gemspec +1 -1
  98. data/spec/fixtures/deeply/nested/file.rb +1 -0
  99. data/spec/ruby-lint/virtual_machine/assignments/range_spec.rb +28 -0
  100. data/task/build.rake +1 -1
  101. data/task/tag.rake +1 -1
  102. metadata +101 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24fc661993350c12969fcf32d98a88a3539a1f71
4
- data.tar.gz: 4ae7f0b1589d953aef60c3d027aa38e6de6dc17b
3
+ metadata.gz: 47ffb8ab07bc9826ae519c992503c8c51659d042
4
+ data.tar.gz: bf6192f271bcce9c7db189a62c6eae8771302d6f
5
5
  SHA512:
6
- metadata.gz: 053bc9734416821c16a410eef0b8b49bfcf16b84b29fb08f82a3d1ac73dfc41b5b144bc0695e681cc556a127e2af010abb501d4e45dfd5cbf3baecfcc725999d
7
- data.tar.gz: 61a61089a5f673979e0fc696e2e36e0595dfaea73c29b7aaba677ce9134ac0c6f77375d9ea3c67bfe5074eb21a7e2b5843fc957d507ba3834daa532fc01afbdf
6
+ metadata.gz: 1497ad0011b0afb381368bd0142cef4c89393a73dbbfd8d1586433c616e6fc5cb05b9309667d56fc79fb2df4e5e8d2b25a369483a358f99e538a3690557b3ab0
7
+ data.tar.gz: 3f96aff18f82c1d2814fd46b85f3d263323fb695638e29965fabcd7a046a8c27290e5d470da35247a08ab4df2298641fd7ef68f34310cb99da70bf57dc1f45ce
data/.editorconfig ADDED
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ indent_style = spaces
6
+ trim_trailing_whitespace = true
7
+
8
+ [*.{yml,yaml,rb}]
9
+ indent_size = 2
10
+
11
+ [*.md]
12
+ indent_size = 4
13
+
14
+ [*.css]
15
+ indent_size = 4
data/MANIFEST CHANGED
@@ -1,3 +1,4 @@
1
+ .editorconfig
1
2
  .gitignore
2
3
  .ruby-version
3
4
  .travis.yml
@@ -17,6 +18,7 @@ checksum/ruby-lint-0.0.4.gem.sha512
17
18
  checksum/ruby-lint-0.0.5.gem.sha512
18
19
  checksum/ruby-lint-0.9.0.gem.sha512
19
20
  checksum/ruby-lint-0.9.1.gem.sha512
21
+ checksum/ruby-lint-1.0.0.pre.preview1.gem.sha512
20
22
  doc/.gitkeep
21
23
  doc/DCO.md
22
24
  doc/architecture.md
@@ -63,26 +65,42 @@ lib/ruby-lint/definition_builder/ruby_method.rb
63
65
  lib/ruby-lint/definition_builder/ruby_module.rb
64
66
  lib/ruby-lint/definition_generator.rb
65
67
  lib/ruby-lint/definitions/core.rb
68
+ lib/ruby-lint/definitions/core/abbrev.rb
66
69
  lib/ruby-lint/definitions/core/arg0.rb
67
70
  lib/ruby-lint/definitions/core/argf.rb
68
71
  lib/ruby-lint/definitions/core/argument_error.rb
69
72
  lib/ruby-lint/definitions/core/argv.rb
70
73
  lib/ruby-lint/definitions/core/array.rb
71
74
  lib/ruby-lint/definitions/core/autoload.rb
75
+ lib/ruby-lint/definitions/core/base64.rb
72
76
  lib/ruby-lint/definitions/core/basic_object.rb
77
+ lib/ruby-lint/definitions/core/basic_socket.rb
78
+ lib/ruby-lint/definitions/core/benchmark.rb
73
79
  lib/ruby-lint/definitions/core/bignum.rb
74
80
  lib/ruby-lint/definitions/core/binding.rb
81
+ lib/ruby-lint/definitions/core/cgi.rb
75
82
  lib/ruby-lint/definitions/core/class.rb
83
+ lib/ruby-lint/definitions/core/common_headers.rb
84
+ lib/ruby-lint/definitions/core/common_libs.rb
76
85
  lib/ruby-lint/definitions/core/comparable.rb
77
86
  lib/ruby-lint/definitions/core/complex.rb
78
87
  lib/ruby-lint/definitions/core/condition_variable.rb
88
+ lib/ruby-lint/definitions/core/config.rb
89
+ lib/ruby-lint/definitions/core/conftest_c.rb
79
90
  lib/ruby-lint/definitions/core/continuation.rb
91
+ lib/ruby-lint/definitions/core/coutflag.rb
92
+ lib/ruby-lint/definitions/core/csv.rb
80
93
  lib/ruby-lint/definitions/core/data.rb
81
94
  lib/ruby-lint/definitions/core/date.rb
82
95
  lib/ruby-lint/definitions/core/date_time.rb
83
96
  lib/ruby-lint/definitions/core/default_record_separator.rb
97
+ lib/ruby-lint/definitions/core/delegator.rb
84
98
  lib/ruby-lint/definitions/core/digest.rb
85
99
  lib/ruby-lint/definitions/core/dir.rb
100
+ lib/ruby-lint/definitions/core/drb.rb
101
+ lib/ruby-lint/definitions/core/drb_id_conv.rb
102
+ lib/ruby-lint/definitions/core/drb_object.rb
103
+ lib/ruby-lint/definitions/core/drb_undumped.rb
86
104
  lib/ruby-lint/definitions/core/encoding.rb
87
105
  lib/ruby-lint/definitions/core/encoding_error.rb
88
106
  lib/ruby-lint/definitions/core/enumerable.rb
@@ -93,55 +111,93 @@ lib/ruby-lint/definitions/core/erb.rb
93
111
  lib/ruby-lint/definitions/core/errno.rb
94
112
  lib/ruby-lint/definitions/core/etc.rb
95
113
  lib/ruby-lint/definitions/core/exception.rb
114
+ lib/ruby-lint/definitions/core/exception_for_matrix.rb
115
+ lib/ruby-lint/definitions/core/export_prefix.rb
116
+ lib/ruby-lint/definitions/core/failed_message.rb
96
117
  lib/ruby-lint/definitions/core/false.rb
97
118
  lib/ruby-lint/definitions/core/false_class.rb
98
119
  lib/ruby-lint/definitions/core/fatal_error.rb
120
+ lib/ruby-lint/definitions/core/fcntl.rb
99
121
  lib/ruby-lint/definitions/core/fiber.rb
100
122
  lib/ruby-lint/definitions/core/fiber_error.rb
101
123
  lib/ruby-lint/definitions/core/file.rb
102
124
  lib/ruby-lint/definitions/core/file_list.rb
103
125
  lib/ruby-lint/definitions/core/file_test.rb
104
126
  lib/ruby-lint/definitions/core/file_utils.rb
127
+ lib/ruby-lint/definitions/core/find.rb
105
128
  lib/ruby-lint/definitions/core/fixnum.rb
106
129
  lib/ruby-lint/definitions/core/float.rb
107
130
  lib/ruby-lint/definitions/core/float_domain_error.rb
131
+ lib/ruby-lint/definitions/core/forwardable.rb
108
132
  lib/ruby-lint/definitions/core/gc.rb
109
133
  lib/ruby-lint/definitions/core/gem.rb
134
+ lib/ruby-lint/definitions/core/getopt_long.rb
135
+ lib/ruby-lint/definitions/core/gserver.rb
110
136
  lib/ruby-lint/definitions/core/hash.rb
137
+ lib/ruby-lint/definitions/core/hdr_ext.rb
111
138
  lib/ruby-lint/definitions/core/immediate_value.rb
112
139
  lib/ruby-lint/definitions/core/index_error.rb
140
+ lib/ruby-lint/definitions/core/install_dirs.rb
113
141
  lib/ruby-lint/definitions/core/integer.rb
114
142
  lib/ruby-lint/definitions/core/interrupt.rb
115
143
  lib/ruby-lint/definitions/core/io.rb
116
144
  lib/ruby-lint/definitions/core/ioerror.rb
145
+ lib/ruby-lint/definitions/core/ipaddr.rb
146
+ lib/ruby-lint/definitions/core/ipsocket.rb
147
+ lib/ruby-lint/definitions/core/irb.rb
148
+ lib/ruby-lint/definitions/core/json.rb
149
+ lib/ruby-lint/definitions/core/kconv.rb
117
150
  lib/ruby-lint/definitions/core/kernel.rb
118
151
  lib/ruby-lint/definitions/core/key_error.rb
152
+ lib/ruby-lint/definitions/core/libarg.rb
153
+ lib/ruby-lint/definitions/core/libpathflag.rb
154
+ lib/ruby-lint/definitions/core/link_so.rb
119
155
  lib/ruby-lint/definitions/core/load_error.rb
120
156
  lib/ruby-lint/definitions/core/local_jump_error.rb
157
+ lib/ruby-lint/definitions/core/logger.rb
158
+ lib/ruby-lint/definitions/core/logging.rb
159
+ lib/ruby-lint/definitions/core/make_makefile.rb
121
160
  lib/ruby-lint/definitions/core/marshal.rb
122
161
  lib/ruby-lint/definitions/core/match_data.rb
123
162
  lib/ruby-lint/definitions/core/math.rb
163
+ lib/ruby-lint/definitions/core/matrix.rb
164
+ lib/ruby-lint/definitions/core/md5.rb
124
165
  lib/ruby-lint/definitions/core/memory_segmention_error.rb
125
166
  lib/ruby-lint/definitions/core/method.rb
126
167
  lib/ruby-lint/definitions/core/module.rb
127
168
  lib/ruby-lint/definitions/core/monitor.rb
128
169
  lib/ruby-lint/definitions/core/monitor_mixin.rb
129
170
  lib/ruby-lint/definitions/core/mutex.rb
171
+ lib/ruby-lint/definitions/core/mutex_m.rb
130
172
  lib/ruby-lint/definitions/core/name_error.rb
131
173
  lib/ruby-lint/definitions/core/nil.rb
132
174
  lib/ruby-lint/definitions/core/nil_class.rb
175
+ lib/ruby-lint/definitions/core/nkf.rb
133
176
  lib/ruby-lint/definitions/core/no_memory_error.rb
134
177
  lib/ruby-lint/definitions/core/no_method_error.rb
135
178
  lib/ruby-lint/definitions/core/not_implemented_error.rb
136
179
  lib/ruby-lint/definitions/core/numeric.rb
137
180
  lib/ruby-lint/definitions/core/object.rb
138
181
  lib/ruby-lint/definitions/core/object_space.rb
182
+ lib/ruby-lint/definitions/core/observable.rb
183
+ lib/ruby-lint/definitions/core/open3.rb
184
+ lib/ruby-lint/definitions/core/open_ssl.rb
139
185
  lib/ruby-lint/definitions/core/open_struct.rb
186
+ lib/ruby-lint/definitions/core/open_uri.rb
140
187
  lib/ruby-lint/definitions/core/option_parser.rb
188
+ lib/ruby-lint/definitions/core/orig_libpath.rb
189
+ lib/ruby-lint/definitions/core/outflag.rb
190
+ lib/ruby-lint/definitions/core/pathname.rb
191
+ lib/ruby-lint/definitions/core/pp.rb
141
192
  lib/ruby-lint/definitions/core/precision.rb
193
+ lib/ruby-lint/definitions/core/pretty_print.rb
194
+ lib/ruby-lint/definitions/core/prime.rb
142
195
  lib/ruby-lint/definitions/core/primitive_failure.rb
143
196
  lib/ruby-lint/definitions/core/proc.rb
144
197
  lib/ruby-lint/definitions/core/process.rb
198
+ lib/ruby-lint/definitions/core/profiler__.rb
199
+ lib/ruby-lint/definitions/core/pstore.rb
200
+ lib/ruby-lint/definitions/core/psych.rb
145
201
  lib/ruby-lint/definitions/core/queue.rb
146
202
  lib/ruby-lint/definitions/core/rake.rb
147
203
  lib/ruby-lint/definitions/core/rake_file_utils.rb
@@ -151,24 +207,41 @@ lib/ruby-lint/definitions/core/range.rb
151
207
  lib/ruby-lint/definitions/core/range_error.rb
152
208
  lib/ruby-lint/definitions/core/rational.rb
153
209
  lib/ruby-lint/definitions/core/rb_config.rb
210
+ lib/ruby-lint/definitions/core/rdoc.rb
211
+ lib/ruby-lint/definitions/core/readline.rb
154
212
  lib/ruby-lint/definitions/core/regexp.rb
155
213
  lib/ruby-lint/definitions/core/regexp_error.rb
214
+ lib/ruby-lint/definitions/core/resolv.rb
215
+ lib/ruby-lint/definitions/core/rexml.rb
216
+ lib/ruby-lint/definitions/core/rpathflag.rb
217
+ lib/ruby-lint/definitions/core/rss.rb
156
218
  lib/ruby-lint/definitions/core/ruby_copyright.rb
157
219
  lib/ruby-lint/definitions/core/ruby_description.rb
158
220
  lib/ruby-lint/definitions/core/ruby_engine.rb
159
221
  lib/ruby-lint/definitions/core/ruby_patchlevel.rb
160
222
  lib/ruby-lint/definitions/core/ruby_platform.rb
161
223
  lib/ruby-lint/definitions/core/ruby_release_date.rb
224
+ lib/ruby-lint/definitions/core/ruby_revision.rb
162
225
  lib/ruby-lint/definitions/core/ruby_version.rb
163
226
  lib/ruby-lint/definitions/core/runtime_error.rb
164
227
  lib/ruby-lint/definitions/core/scan_error.rb
228
+ lib/ruby-lint/definitions/core/scanf.rb
165
229
  lib/ruby-lint/definitions/core/script_error.rb
230
+ lib/ruby-lint/definitions/core/secure_random.rb
166
231
  lib/ruby-lint/definitions/core/security_error.rb
232
+ lib/ruby-lint/definitions/core/set.rb
233
+ lib/ruby-lint/definitions/core/sha1.rb
167
234
  lib/ruby-lint/definitions/core/shellwords.rb
168
235
  lib/ruby-lint/definitions/core/signal.rb
169
236
  lib/ruby-lint/definitions/core/signal_exception.rb
237
+ lib/ruby-lint/definitions/core/simple_delegator.rb
238
+ lib/ruby-lint/definitions/core/single_forwardable.rb
170
239
  lib/ruby-lint/definitions/core/singleton.rb
171
240
  lib/ruby-lint/definitions/core/sized_queue.rb
241
+ lib/ruby-lint/definitions/core/socket.rb
242
+ lib/ruby-lint/definitions/core/socket_error.rb
243
+ lib/ruby-lint/definitions/core/sorted_set.rb
244
+ lib/ruby-lint/definitions/core/src_ext.rb
172
245
  lib/ruby-lint/definitions/core/standard_error.rb
173
246
  lib/ruby-lint/definitions/core/stderr.rb
174
247
  lib/ruby-lint/definitions/core/stdin.rb
@@ -184,18 +257,35 @@ lib/ruby-lint/definitions/core/syntax_error.rb
184
257
  lib/ruby-lint/definitions/core/system_call_error.rb
185
258
  lib/ruby-lint/definitions/core/system_exit.rb
186
259
  lib/ruby-lint/definitions/core/system_stack_error.rb
260
+ lib/ruby-lint/definitions/core/tcpserver.rb
261
+ lib/ruby-lint/definitions/core/tcpsocket.rb
262
+ lib/ruby-lint/definitions/core/tempfile.rb
263
+ lib/ruby-lint/definitions/core/th_wait.rb
187
264
  lib/ruby-lint/definitions/core/thread.rb
188
265
  lib/ruby-lint/definitions/core/thread_error.rb
189
266
  lib/ruby-lint/definitions/core/thread_group.rb
267
+ lib/ruby-lint/definitions/core/threads_wait.rb
190
268
  lib/ruby-lint/definitions/core/time.rb
269
+ lib/ruby-lint/definitions/core/timeout.rb
270
+ lib/ruby-lint/definitions/core/timeout_error.rb
191
271
  lib/ruby-lint/definitions/core/toplevel_binding.rb
192
272
  lib/ruby-lint/definitions/core/true.rb
193
273
  lib/ruby-lint/definitions/core/true_class.rb
274
+ lib/ruby-lint/definitions/core/try_link.rb
275
+ lib/ruby-lint/definitions/core/tsort.rb
194
276
  lib/ruby-lint/definitions/core/type_error.rb
277
+ lib/ruby-lint/definitions/core/udpsocket.rb
195
278
  lib/ruby-lint/definitions/core/unbound_method.rb
279
+ lib/ruby-lint/definitions/core/universal_ints.rb
280
+ lib/ruby-lint/definitions/core/unixserver.rb
281
+ lib/ruby-lint/definitions/core/unixsocket.rb
196
282
  lib/ruby-lint/definitions/core/unmarshalable.rb
197
283
  lib/ruby-lint/definitions/core/unsupported_library_error.rb
284
+ lib/ruby-lint/definitions/core/uri.rb
285
+ lib/ruby-lint/definitions/core/vector.rb
198
286
  lib/ruby-lint/definitions/core/weak_ref.rb
287
+ lib/ruby-lint/definitions/core/webrick.rb
288
+ lib/ruby-lint/definitions/core/xmlrpc.rb
199
289
  lib/ruby-lint/definitions/core/yaml.rb
200
290
  lib/ruby-lint/definitions/core/zero_division_error.rb
201
291
  lib/ruby-lint/definitions/core/zlib.rb
@@ -245,6 +335,7 @@ lib/ruby-lint/template/scope.rb
245
335
  lib/ruby-lint/variable_predicates.rb
246
336
  lib/ruby-lint/version.rb
247
337
  lib/ruby-lint/virtual_machine.rb
338
+ misc/stdlib.rb
248
339
  profiling/virtual_machine.rb
249
340
  ruby-lint.gemspec
250
341
  ruby-lint.yml
@@ -253,6 +344,7 @@ spec/fixtures/complex/rails/basic_controller.rb
253
344
  spec/fixtures/complex/rcap.rb
254
345
  spec/fixtures/complex/slop.rb
255
346
  spec/fixtures/config.yml
347
+ spec/fixtures/deeply/nested/file.rb
256
348
  spec/fixtures/file_scanner/lib/example/recursive/source.rb
257
349
  spec/fixtures/file_scanner/lib/example/recursive/target.rb
258
350
  spec/fixtures/file_scanner/lib/example/user.rb
@@ -313,6 +405,7 @@ spec/ruby-lint/virtual_machine/assignments/assignment_arguments_spec.rb
313
405
  spec/ruby-lint/virtual_machine/assignments/constants_spec.rb
314
406
  spec/ruby-lint/virtual_machine/assignments/hashes_spec.rb
315
407
  spec/ruby-lint/virtual_machine/assignments/optional_spec.rb
408
+ spec/ruby-lint/virtual_machine/assignments/range_spec.rb
316
409
  spec/ruby-lint/virtual_machine/assignments/return_values_spec.rb
317
410
  spec/ruby-lint/virtual_machine/assignments/variables_spec.rb
318
411
  spec/ruby-lint/virtual_machine/associate_nodes_spec.rb
@@ -0,0 +1 @@
1
+ c39ec49b709b5dea7e2e69bfd2a8cab6342847f0dfe3b38136a4da77489d7f2a44656591f3eeab67c07d71731cc44a47302d0b39d9d83be9bf381ab23e0e425b
data/doc/changelog.md CHANGED
@@ -5,6 +5,46 @@ This document contains a short summary of the various releases of ruby-lint.
5
5
  For a full list of commits included in each release see the corresponding Git
6
6
  tags (named after the versions).
7
7
 
8
+ ## 1.0.0 - 2013-12-01
9
+
10
+ The first stable release of ruby-lint. The 1.0 series will not introduce any
11
+ breaking API changes. The changes in this particular release are fairly small.
12
+ Initially I wanted to include the ability to skip analysis for certain
13
+ constants but I've decided to hold this off until the next release as I'm not
14
+ yet sure how I envision this feature.
15
+
16
+ Having said that, this release contains the following noteworthy changes:
17
+
18
+ * Column numbers now start from 1 instead of 0, something I completely
19
+ overlooked until now.
20
+ * Performance of `RubyLint::FileScanner#scan` has been improved significantly
21
+ (more on this below).
22
+ * ruby-lint can now run analysis on an entire directory instead of only
23
+ operating on individual files.
24
+ * Support for Range instances when building definitions.
25
+ * Various extra stdlib definitions have been added.
26
+ * Support for conditional code analysis (see below).
27
+
28
+ ### FileScanner Performance
29
+
30
+ The performance of `RubyLint::FileScanner#scan` has been improved
31
+ significantly. In previous versions a call to `Dir.glob` was made every time
32
+ ruby-lint tried to find a constant from the local file system. This process has
33
+ been improved by retrieving all Ruby files at once and caching the results.
34
+ When performing analysis on `lib/ruby-lint/virtual_machine.rb` this change lead
35
+ to a reduction in execution time of about 400 milliseconds.
36
+
37
+ See <http://git.io/Q5s8Lw> for a more detailed description of this change.
38
+
39
+ ### Conditional Code Analysis
40
+
41
+ This new feature allows analysis classes themselves to determine whether or not
42
+ they should be used. This can be used to write analysis code that only runs on
43
+ Rspec files for example.
44
+
45
+ Currently ruby-lint doesn't ship with any analysis classes that use this
46
+ feature but I plan to add these in the future.
47
+
8
48
  ## 0.9.1 - 2013-10-21
9
49
 
10
50
  A small release that only includes 3 changes:
data/lib/ruby-lint.rb CHANGED
@@ -1,4 +1,4 @@
1
- gem 'parser', '>= 2.0.0'
1
+ gem 'parser', '~> 2.0'
2
2
 
3
3
  require 'parser'
4
4
 
@@ -0,0 +1,18 @@
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('Abbrev') do |klass|
8
+ klass.inherits(RubyLint::GlobalScope.constant_proxy('Object'))
9
+
10
+ klass.define_method('abbrev') do |method|
11
+ method.define_argument('words')
12
+ method.define_optional_argument('pattern')
13
+ end
14
+
15
+ klass.define_method('initialize')
16
+ end
17
+
18
+ RubyLint::GlobalScope.definitions.lookup(:const, 'Abbrev').deep_freeze
@@ -0,0 +1,37 @@
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('Base64') do |klass|
8
+ klass.inherits(RubyLint::GlobalScope.constant_proxy('Object'))
9
+
10
+ klass.define_method('decode64') do |method|
11
+ method.define_argument('str')
12
+ end
13
+
14
+ klass.define_method('encode64') do |method|
15
+ method.define_argument('bin')
16
+ end
17
+
18
+ klass.define_method('initialize')
19
+
20
+ klass.define_method('strict_decode64') do |method|
21
+ method.define_argument('str')
22
+ end
23
+
24
+ klass.define_method('strict_encode64') do |method|
25
+ method.define_argument('bin')
26
+ end
27
+
28
+ klass.define_method('urlsafe_decode64') do |method|
29
+ method.define_argument('str')
30
+ end
31
+
32
+ klass.define_method('urlsafe_encode64') do |method|
33
+ method.define_argument('bin')
34
+ end
35
+ end
36
+
37
+ RubyLint::GlobalScope.definitions.lookup(:const, 'Base64').deep_freeze
@@ -0,0 +1,685 @@
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 21:14:28 +0100
5
+ # Platform: rbx 2.1.1
6
+
7
+ RubyLint::GlobalScope.definitions.define_constant('BasicSocket') do |klass|
8
+ klass.inherits(RubyLint::GlobalScope.constant_proxy('IO'))
9
+
10
+ klass.define_method('binread') do |method|
11
+ method.define_argument('file')
12
+ method.define_optional_argument('length')
13
+ method.define_optional_argument('offset')
14
+ end
15
+
16
+ klass.define_method('binwrite') do |method|
17
+ method.define_argument('file')
18
+ method.define_argument('string')
19
+ method.define_rest_argument('args')
20
+ end
21
+
22
+ klass.define_method('connect_pipe') do |method|
23
+ method.define_argument('lhs')
24
+ method.define_argument('rhs')
25
+ end
26
+
27
+ klass.define_method('copy_stream') do |method|
28
+ method.define_argument('from')
29
+ method.define_argument('to')
30
+ method.define_optional_argument('max_length')
31
+ method.define_optional_argument('offset')
32
+ end
33
+
34
+ klass.define_method('do_not_reverse_lookup')
35
+
36
+ klass.define_method('do_not_reverse_lookup=') do |method|
37
+ method.define_argument('setting')
38
+ end
39
+
40
+ klass.define_method('fnmatch') do |method|
41
+ method.define_argument('pattern')
42
+ method.define_argument('path')
43
+ method.define_argument('flags')
44
+ end
45
+
46
+ klass.define_method('for_fd') do |method|
47
+ method.define_argument('fixnum')
48
+ end
49
+
50
+ klass.define_method('foreach') do |method|
51
+ method.define_argument('name')
52
+ method.define_optional_argument('separator')
53
+ method.define_optional_argument('limit')
54
+ method.define_optional_argument('options')
55
+ end
56
+
57
+ klass.define_method('from_descriptor') do |method|
58
+ method.define_argument('fixnum')
59
+ end
60
+
61
+ klass.define_method('initialize') do |method|
62
+ method.define_optional_argument('sclass')
63
+ method.define_optional_argument('name')
64
+ method.define_optional_argument('under')
65
+ end
66
+
67
+ klass.define_method('max_open_fd')
68
+
69
+ klass.define_method('normalize_options') do |method|
70
+ method.define_argument('mode')
71
+ method.define_argument('options')
72
+ end
73
+
74
+ klass.define_method('open') do |method|
75
+ method.define_rest_argument('args')
76
+ end
77
+
78
+ klass.define_method('open_with_mode') do |method|
79
+ method.define_argument('path')
80
+ method.define_argument('mode')
81
+ method.define_argument('perm')
82
+ end
83
+
84
+ klass.define_method('parse_mode') do |method|
85
+ method.define_argument('mode')
86
+ end
87
+
88
+ klass.define_method('pipe') do |method|
89
+ method.define_optional_argument('external')
90
+ method.define_optional_argument('internal')
91
+ method.define_optional_argument('options')
92
+ end
93
+
94
+ klass.define_method('popen') do |method|
95
+ method.define_argument('str')
96
+ method.define_optional_argument('mode')
97
+ method.define_optional_argument('options')
98
+ end
99
+
100
+ klass.define_method('prim_truncate') do |method|
101
+ method.define_argument('name')
102
+ method.define_argument('offset')
103
+ end
104
+
105
+ klass.define_method('read') do |method|
106
+ method.define_argument('name')
107
+ method.define_optional_argument('length_or_options')
108
+ method.define_optional_argument('offset')
109
+ method.define_optional_argument('options')
110
+ end
111
+
112
+ klass.define_method('read_encode') do |method|
113
+ method.define_argument('io')
114
+ method.define_argument('str')
115
+ end
116
+
117
+ klass.define_method('readlines') do |method|
118
+ method.define_argument('name')
119
+ method.define_optional_argument('separator')
120
+ method.define_optional_argument('limit')
121
+ method.define_optional_argument('options')
122
+ end
123
+
124
+ klass.define_method('select') do |method|
125
+ method.define_optional_argument('readables')
126
+ method.define_optional_argument('writables')
127
+ method.define_optional_argument('errorables')
128
+ method.define_optional_argument('timeout')
129
+ end
130
+
131
+ klass.define_method('select_primitive') do |method|
132
+ method.define_argument('readables')
133
+ method.define_argument('writables')
134
+ method.define_argument('errorables')
135
+ method.define_argument('timeout')
136
+ end
137
+
138
+ klass.define_method('setup') do |method|
139
+ method.define_argument('io')
140
+ method.define_argument('fd')
141
+ method.define_optional_argument('mode')
142
+ method.define_optional_argument('sync')
143
+ end
144
+
145
+ klass.define_method('sysopen') do |method|
146
+ method.define_argument('path')
147
+ method.define_optional_argument('mode')
148
+ method.define_optional_argument('perm')
149
+ end
150
+
151
+ klass.define_method('try_convert') do |method|
152
+ method.define_argument('obj')
153
+ end
154
+
155
+ klass.define_method('write') do |method|
156
+ method.define_argument('file')
157
+ method.define_argument('string')
158
+ method.define_rest_argument('args')
159
+ end
160
+
161
+ klass.define_instance_method('<<') do |method|
162
+ method.define_argument('obj')
163
+ end
164
+
165
+ klass.define_instance_method('advise') do |method|
166
+ method.define_argument('advice')
167
+ method.define_optional_argument('offset')
168
+ method.define_optional_argument('len')
169
+ end
170
+
171
+ klass.define_instance_method('all?')
172
+
173
+ klass.define_instance_method('any?')
174
+
175
+ klass.define_instance_method('autoclose=') do |method|
176
+ method.define_argument('autoclose')
177
+ end
178
+
179
+ klass.define_instance_method('autoclose?')
180
+
181
+ klass.define_instance_method('binmode')
182
+
183
+ klass.define_instance_method('binmode?')
184
+
185
+ klass.define_instance_method('buffer_empty?')
186
+
187
+ klass.define_instance_method('bytes')
188
+
189
+ klass.define_instance_method('chars')
190
+
191
+ klass.define_instance_method('chunk') do |method|
192
+ method.define_optional_argument('initial_state')
193
+ end
194
+
195
+ klass.define_instance_method('close')
196
+
197
+ klass.define_instance_method('close_on_exec=') do |method|
198
+ method.define_argument('value')
199
+ end
200
+
201
+ klass.define_instance_method('close_on_exec?')
202
+
203
+ klass.define_instance_method('close_read')
204
+
205
+ klass.define_instance_method('close_write')
206
+
207
+ klass.define_instance_method('closed?')
208
+
209
+ klass.define_instance_method('codepoints')
210
+
211
+ klass.define_instance_method('collect')
212
+
213
+ klass.define_instance_method('collect_concat')
214
+
215
+ klass.define_instance_method('count') do |method|
216
+ method.define_optional_argument('item')
217
+ end
218
+
219
+ klass.define_instance_method('cycle') do |method|
220
+ method.define_optional_argument('many')
221
+ end
222
+
223
+ klass.define_instance_method('descriptor')
224
+
225
+ klass.define_instance_method('descriptor=')
226
+
227
+ klass.define_instance_method('detect') do |method|
228
+ method.define_optional_argument('ifnone')
229
+ end
230
+
231
+ klass.define_instance_method('do_not_reverse_lookup')
232
+
233
+ klass.define_instance_method('do_not_reverse_lookup=') do |method|
234
+ method.define_argument('setting')
235
+ end
236
+
237
+ klass.define_instance_method('drop') do |method|
238
+ method.define_argument('n')
239
+ end
240
+
241
+ klass.define_instance_method('drop_while')
242
+
243
+ klass.define_instance_method('each') do |method|
244
+ method.define_optional_argument('sep_or_limit')
245
+ method.define_optional_argument('limit')
246
+ end
247
+
248
+ klass.define_instance_method('each_byte')
249
+
250
+ klass.define_instance_method('each_char')
251
+
252
+ klass.define_instance_method('each_codepoint')
253
+
254
+ klass.define_instance_method('each_cons') do |method|
255
+ method.define_argument('num')
256
+ end
257
+
258
+ klass.define_instance_method('each_entry') do |method|
259
+ method.define_rest_argument('pass')
260
+ end
261
+
262
+ klass.define_instance_method('each_line') do |method|
263
+ method.define_optional_argument('sep_or_limit')
264
+ method.define_optional_argument('limit')
265
+ end
266
+
267
+ klass.define_instance_method('each_slice') do |method|
268
+ method.define_argument('slice_size')
269
+ end
270
+
271
+ klass.define_instance_method('each_with_index') do |method|
272
+ method.define_rest_argument('args')
273
+ end
274
+
275
+ klass.define_instance_method('each_with_object') do |method|
276
+ method.define_argument('memo')
277
+ end
278
+
279
+ klass.define_instance_method('ensure_open')
280
+
281
+ klass.define_instance_method('ensure_open_and_readable')
282
+
283
+ klass.define_instance_method('ensure_open_and_writable')
284
+
285
+ klass.define_instance_method('entries') do |method|
286
+ method.define_rest_argument('arg')
287
+ end
288
+
289
+ klass.define_instance_method('eof')
290
+
291
+ klass.define_instance_method('eof!')
292
+
293
+ klass.define_instance_method('eof?')
294
+
295
+ klass.define_instance_method('expect') do |method|
296
+ method.define_argument('pat')
297
+ method.define_optional_argument('timeout')
298
+ end
299
+
300
+ klass.define_instance_method('external')
301
+
302
+ klass.define_instance_method('external=')
303
+
304
+ klass.define_instance_method('external_encoding')
305
+
306
+ klass.define_instance_method('fcntl') do |method|
307
+ method.define_argument('command')
308
+ method.define_optional_argument('arg')
309
+ end
310
+
311
+ klass.define_instance_method('fileno')
312
+
313
+ klass.define_instance_method('find') do |method|
314
+ method.define_optional_argument('ifnone')
315
+ end
316
+
317
+ klass.define_instance_method('find_all')
318
+
319
+ klass.define_instance_method('find_index') do |method|
320
+ method.define_optional_argument('value')
321
+ end
322
+
323
+ klass.define_instance_method('first') do |method|
324
+ method.define_optional_argument('n')
325
+ end
326
+
327
+ klass.define_instance_method('flat_map')
328
+
329
+ klass.define_instance_method('flush')
330
+
331
+ klass.define_instance_method('from_descriptor') do |method|
332
+ method.define_argument('fixnum')
333
+ end
334
+
335
+ klass.define_instance_method('fsync')
336
+
337
+ klass.define_instance_method('getbyte')
338
+
339
+ klass.define_instance_method('getc')
340
+
341
+ klass.define_instance_method('getpeername')
342
+
343
+ klass.define_instance_method('gets') do |method|
344
+ method.define_optional_argument('sep_or_limit')
345
+ method.define_optional_argument('limit')
346
+ end
347
+
348
+ klass.define_instance_method('getsockname')
349
+
350
+ klass.define_instance_method('getsockopt') do |method|
351
+ method.define_argument('level')
352
+ method.define_argument('optname')
353
+ end
354
+
355
+ klass.define_instance_method('grep') do |method|
356
+ method.define_argument('pattern')
357
+ end
358
+
359
+ klass.define_instance_method('group_by')
360
+
361
+ klass.define_instance_method('include?') do |method|
362
+ method.define_argument('obj')
363
+ end
364
+
365
+ klass.define_instance_method('increment_lineno')
366
+
367
+ klass.define_instance_method('initialize') do |method|
368
+ method.define_argument('fd')
369
+ method.define_optional_argument('mode')
370
+ method.define_optional_argument('options')
371
+ end
372
+
373
+ klass.define_instance_method('inject') do |method|
374
+ method.define_optional_argument('initial')
375
+ method.define_optional_argument('sym')
376
+ end
377
+
378
+ klass.define_instance_method('internal')
379
+
380
+ klass.define_instance_method('internal=')
381
+
382
+ klass.define_instance_method('internal_encoding')
383
+
384
+ klass.define_instance_method('ioctl') do |method|
385
+ method.define_argument('command')
386
+ method.define_optional_argument('arg')
387
+ end
388
+
389
+ klass.define_instance_method('isatty')
390
+
391
+ klass.define_instance_method('lazy')
392
+
393
+ klass.define_instance_method('lineno')
394
+
395
+ klass.define_instance_method('lineno=') do |method|
396
+ method.define_argument('line_number')
397
+ end
398
+
399
+ klass.define_instance_method('lines') do |method|
400
+ method.define_rest_argument('args')
401
+ end
402
+
403
+ klass.define_instance_method('map')
404
+
405
+ klass.define_instance_method('max')
406
+
407
+ klass.define_instance_method('max_by')
408
+
409
+ klass.define_instance_method('member?') do |method|
410
+ method.define_argument('obj')
411
+ end
412
+
413
+ klass.define_instance_method('min')
414
+
415
+ klass.define_instance_method('min_by')
416
+
417
+ klass.define_instance_method('minmax')
418
+
419
+ klass.define_instance_method('minmax_by')
420
+
421
+ klass.define_instance_method('mode')
422
+
423
+ klass.define_instance_method('mode=')
424
+
425
+ klass.define_instance_method('none?')
426
+
427
+ klass.define_instance_method('one?')
428
+
429
+ klass.define_instance_method('partition')
430
+
431
+ klass.define_instance_method('pid')
432
+
433
+ klass.define_instance_method('pid=')
434
+
435
+ klass.define_instance_method('pipe=') do |method|
436
+ method.define_argument('v')
437
+ end
438
+
439
+ klass.define_instance_method('pipe?')
440
+
441
+ klass.define_instance_method('pos')
442
+
443
+ klass.define_instance_method('pos=') do |method|
444
+ method.define_argument('offset')
445
+ end
446
+
447
+ klass.define_instance_method('prim_close')
448
+
449
+ klass.define_instance_method('prim_ftruncate') do |method|
450
+ method.define_argument('offset')
451
+ end
452
+
453
+ klass.define_instance_method('prim_seek') do |method|
454
+ method.define_argument('amount')
455
+ method.define_argument('whence')
456
+ end
457
+
458
+ klass.define_instance_method('prim_write') do |method|
459
+ method.define_argument('str')
460
+ end
461
+
462
+ klass.define_instance_method('print') do |method|
463
+ method.define_rest_argument('args')
464
+ end
465
+
466
+ klass.define_instance_method('printf') do |method|
467
+ method.define_argument('fmt')
468
+ method.define_rest_argument('args')
469
+ end
470
+
471
+ klass.define_instance_method('putc') do |method|
472
+ method.define_argument('obj')
473
+ end
474
+
475
+ klass.define_instance_method('puts') do |method|
476
+ method.define_rest_argument('args')
477
+ end
478
+
479
+ klass.define_instance_method('query') do |method|
480
+ method.define_argument('which')
481
+ end
482
+
483
+ klass.define_instance_method('raw_write') do |method|
484
+ method.define_argument('str')
485
+ end
486
+
487
+ klass.define_instance_method('read') do |method|
488
+ method.define_optional_argument('length')
489
+ method.define_optional_argument('buffer')
490
+ end
491
+
492
+ klass.define_instance_method('read_bom_byte')
493
+
494
+ klass.define_instance_method('read_nonblock') do |method|
495
+ method.define_argument('size')
496
+ method.define_optional_argument('buffer')
497
+ end
498
+
499
+ klass.define_instance_method('read_primitive') do |method|
500
+ method.define_argument('number_of_bytes')
501
+ end
502
+
503
+ klass.define_instance_method('readbyte')
504
+
505
+ klass.define_instance_method('readchar')
506
+
507
+ klass.define_instance_method('readline') do |method|
508
+ method.define_optional_argument('sep')
509
+ end
510
+
511
+ klass.define_instance_method('readlines') do |method|
512
+ method.define_optional_argument('sep')
513
+ end
514
+
515
+ klass.define_instance_method('readpartial') do |method|
516
+ method.define_argument('size')
517
+ method.define_optional_argument('buffer')
518
+ end
519
+
520
+ klass.define_instance_method('recv') do |method|
521
+ method.define_argument('bytes_to_read')
522
+ method.define_optional_argument('flags')
523
+ end
524
+
525
+ klass.define_instance_method('recv_nonblock') do |method|
526
+ method.define_argument('bytes_to_read')
527
+ method.define_optional_argument('flags')
528
+ end
529
+
530
+ klass.define_instance_method('recvfrom') do |method|
531
+ method.define_argument('bytes_to_read')
532
+ method.define_optional_argument('flags')
533
+ end
534
+
535
+ klass.define_instance_method('reduce') do |method|
536
+ method.define_optional_argument('initial')
537
+ method.define_optional_argument('sym')
538
+ end
539
+
540
+ klass.define_instance_method('reject')
541
+
542
+ klass.define_instance_method('reopen') do |method|
543
+ method.define_argument('other')
544
+ method.define_optional_argument('mode')
545
+ end
546
+
547
+ klass.define_instance_method('reopen_io') do |method|
548
+ method.define_argument('other')
549
+ end
550
+
551
+ klass.define_instance_method('reopen_path') do |method|
552
+ method.define_argument('string')
553
+ method.define_argument('mode')
554
+ end
555
+
556
+ klass.define_instance_method('reset_buffering')
557
+
558
+ klass.define_instance_method('reverse_each')
559
+
560
+ klass.define_instance_method('rewind')
561
+
562
+ klass.define_instance_method('scanf') do |method|
563
+ method.define_argument('str')
564
+ method.define_block_argument('b')
565
+ end
566
+
567
+ klass.define_instance_method('seek') do |method|
568
+ method.define_argument('amount')
569
+ method.define_optional_argument('whence')
570
+ end
571
+
572
+ klass.define_instance_method('select')
573
+
574
+ klass.define_instance_method('send') do |method|
575
+ method.define_argument('message')
576
+ method.define_argument('flags')
577
+ method.define_optional_argument('to')
578
+ end
579
+
580
+ klass.define_instance_method('set_encoding') do |method|
581
+ method.define_argument('external')
582
+ method.define_optional_argument('internal')
583
+ method.define_optional_argument('options')
584
+ end
585
+
586
+ klass.define_instance_method('setsockopt') do |method|
587
+ method.define_argument('level_or_option')
588
+ method.define_optional_argument('optname')
589
+ method.define_optional_argument('optval')
590
+ end
591
+
592
+ klass.define_instance_method('shutdown') do |method|
593
+ method.define_optional_argument('how')
594
+ end
595
+
596
+ klass.define_instance_method('slice_before') do |method|
597
+ method.define_optional_argument('arg')
598
+ end
599
+
600
+ klass.define_instance_method('socket_recv') do |method|
601
+ method.define_argument('bytes')
602
+ method.define_argument('flags')
603
+ method.define_argument('type')
604
+ end
605
+
606
+ klass.define_instance_method('sort')
607
+
608
+ klass.define_instance_method('sort_by')
609
+
610
+ klass.define_instance_method('stat')
611
+
612
+ klass.define_instance_method('strip_bom')
613
+
614
+ klass.define_instance_method('sync')
615
+
616
+ klass.define_instance_method('sync=') do |method|
617
+ method.define_argument('v')
618
+ end
619
+
620
+ klass.define_instance_method('sysread') do |method|
621
+ method.define_argument('number_of_bytes')
622
+ method.define_optional_argument('buffer')
623
+ end
624
+
625
+ klass.define_instance_method('sysseek') do |method|
626
+ method.define_argument('amount')
627
+ method.define_optional_argument('whence')
628
+ end
629
+
630
+ klass.define_instance_method('syswrite') do |method|
631
+ method.define_argument('data')
632
+ end
633
+
634
+ klass.define_instance_method('take') do |method|
635
+ method.define_argument('n')
636
+ end
637
+
638
+ klass.define_instance_method('take_while')
639
+
640
+ klass.define_instance_method('tell')
641
+
642
+ klass.define_instance_method('to_a') do |method|
643
+ method.define_rest_argument('arg')
644
+ end
645
+
646
+ klass.define_instance_method('to_i')
647
+
648
+ klass.define_instance_method('to_io')
649
+
650
+ klass.define_instance_method('to_set') do |method|
651
+ method.define_optional_argument('klass')
652
+ method.define_rest_argument('args')
653
+ method.define_block_argument('block')
654
+ end
655
+
656
+ klass.define_instance_method('tty?')
657
+
658
+ klass.define_instance_method('ttyname')
659
+
660
+ klass.define_instance_method('ungetbyte') do |method|
661
+ method.define_argument('obj')
662
+ end
663
+
664
+ klass.define_instance_method('ungetc') do |method|
665
+ method.define_argument('obj')
666
+ end
667
+
668
+ klass.define_instance_method('with_object') do |method|
669
+ method.define_argument('memo')
670
+ end
671
+
672
+ klass.define_instance_method('write') do |method|
673
+ method.define_argument('data')
674
+ end
675
+
676
+ klass.define_instance_method('write_nonblock') do |method|
677
+ method.define_argument('data')
678
+ end
679
+
680
+ klass.define_instance_method('zip') do |method|
681
+ method.define_rest_argument('args')
682
+ end
683
+ end
684
+
685
+ RubyLint::GlobalScope.definitions.lookup(:const, 'BasicSocket').deep_freeze