rubocop-sketchup 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module SketchupRequirements
6
+ class LoadPath < Cop
7
+
8
+ include NoCommentDisable
9
+
10
+ MSG = 'Do not modify the load path.'.freeze
11
+
12
+ def_node_matcher :load_path_mutator?, <<-PATTERN
13
+ (send
14
+ (gvar #load_path?) $#mutator?
15
+ ...
16
+ )
17
+ PATTERN
18
+
19
+ LOAD_PATH_ALIASES = %i(
20
+ $: $LOAD_PATH
21
+ )
22
+
23
+ MUTATORS = %i(
24
+ <<
25
+ []=
26
+ clear
27
+ collect!
28
+ compact!
29
+ concat
30
+ delete
31
+ delete_at
32
+ delete_if
33
+ drop
34
+ drop_while
35
+ fill
36
+ flatten!
37
+ insert
38
+ keep_if
39
+ map!
40
+ pop
41
+ push
42
+ reject!
43
+ replace
44
+ reverse!
45
+ rotate!
46
+ select!
47
+ shift
48
+ shuffle!
49
+ slice!
50
+ sort!
51
+ sort_by!
52
+ uniq!
53
+ unshift
54
+ )
55
+
56
+ def load_path?(sym)
57
+ LOAD_PATH_ALIASES.include?(sym)
58
+ end
59
+
60
+ def mutator?(sym)
61
+ MUTATORS.include?(sym)
62
+ end
63
+
64
+ def on_gvasgn(node)
65
+ global_var, = *node
66
+
67
+ add_offense(node, :name, nil, :error) if load_path?(global_var)
68
+ end
69
+
70
+ def on_send(node)
71
+ method_name = load_path_mutator?(node)
72
+ return unless method_name
73
+
74
+ add_offense(node, :expression, nil, :error)
75
+ end
76
+
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,285 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module SketchupRequirements
6
+ class RubyCoreNamespace < Cop
7
+
8
+ include NoCommentDisable
9
+ include Sketchup::NamespaceChecker
10
+
11
+ MSG = 'Do not modify Ruby core functionality.'.freeze
12
+
13
+ # We check only against the top level namespaces. The core define more
14
+ # objects, but they are under one of the top level namespaces listed.
15
+
16
+ NAMESPACES_RUBY_186 = %w(
17
+ ArgumentError
18
+ Array
19
+ Bignum
20
+ Binding
21
+ Class
22
+ Comparable
23
+ Continuation
24
+ Data
25
+ Dir
26
+ EOFError
27
+ Enumerable
28
+ Errno
29
+ Exception
30
+ FalseClass
31
+ File
32
+ FileTest
33
+ Fixnum
34
+ Float
35
+ FloatDomainError
36
+ GC
37
+ Hash
38
+ IO
39
+ IOError
40
+ IndexError
41
+ Integer
42
+ Interrupt
43
+ Kernel
44
+ LoadError
45
+ LocalJumpError
46
+ Marshal
47
+ MatchData
48
+ Math
49
+ Method
50
+ Module
51
+ NameError
52
+ NilClass
53
+ NoMemoryError
54
+ NoMethodError
55
+ NotImplementedError
56
+ Numeric
57
+ Object
58
+ ObjectSpace
59
+ Precision
60
+ Proc
61
+ Process
62
+ Range
63
+ RangeError
64
+ Regexp
65
+ RegexpError
66
+ RuntimeError
67
+ ScriptError
68
+ SecurityError
69
+ Signal
70
+ SignalException
71
+ StandardError
72
+ String
73
+ Struct
74
+ Symbol
75
+ SyntaxError
76
+ SystemCallError
77
+ SystemExit
78
+ SystemStackError
79
+ Thread
80
+ ThreadError
81
+ ThreadGroup
82
+ Time
83
+ TrueClass
84
+ TypeError
85
+ UnboundMethod
86
+ ZeroDivisionError
87
+ ).freeze
88
+
89
+ NAMESPACES_RUBY_200 = %w(
90
+ ARGF
91
+ ArgumentError
92
+ Array
93
+ BasicObject
94
+ Bignum
95
+ Binding
96
+ Class
97
+ Comparable
98
+ Complex
99
+ Continuation
100
+ Data
101
+ Dir
102
+ ENV
103
+ EOFError
104
+ Encoding
105
+ EncodingError
106
+ Enumerable
107
+ Enumerator
108
+ Errno
109
+ Exception
110
+ FalseClass
111
+ Fiber
112
+ FiberError
113
+ File
114
+ FileTest
115
+ Fixnum
116
+ Float
117
+ FloatDomainError
118
+ GC
119
+ Hash
120
+ IO
121
+ IOError
122
+ IndexError
123
+ Integer
124
+ Interrupt
125
+ Kernel
126
+ KeyError
127
+ LoadError
128
+ LocalJumpError
129
+ Marshal
130
+ MatchData
131
+ Math
132
+ Method
133
+ Module
134
+ Mutex
135
+ NameError
136
+ NilClass
137
+ NoMemoryError
138
+ NoMethodError
139
+ NotImplementedError
140
+ Numeric
141
+ Object
142
+ ObjectSpace
143
+ Proc
144
+ Process
145
+ Random
146
+ Range
147
+ RangeError
148
+ Rational
149
+ Regexp
150
+ RegexpError
151
+ RubyVM
152
+ RuntimeError
153
+ ScriptError
154
+ SecurityError
155
+ Signal
156
+ SignalException
157
+ StandardError
158
+ StopIteration
159
+ String
160
+ Struct
161
+ Symbol
162
+ SyntaxError
163
+ SystemCallError
164
+ SystemExit
165
+ SystemStackError
166
+ Thread
167
+ ThreadError
168
+ ThreadGroup
169
+ Time
170
+ TracePoint
171
+ TrueClass
172
+ TypeError
173
+ UnboundMethod
174
+ ZeroDivisionError
175
+ ).freeze
176
+
177
+ NAMESPACES_RUBY_220 = %w(
178
+ ArgumentError
179
+ Array
180
+ BasicObject
181
+ Bignum
182
+ Binding
183
+ Class
184
+ Comparable
185
+ Complex
186
+ ConditionVariable
187
+ Continuation
188
+ Data
189
+ Dir
190
+ ENV
191
+ EOFError
192
+ Encoding
193
+ EncodingError
194
+ Enumerable
195
+ Enumerator
196
+ Errno
197
+ Exception
198
+ FalseClass
199
+ Fiber
200
+ FiberError
201
+ File
202
+ FileTest
203
+ Fixnum
204
+ Float
205
+ FloatDomainError
206
+ GC
207
+ Hash
208
+ IO
209
+ IOError
210
+ IndexError
211
+ Integer
212
+ Interrupt
213
+ Kernel
214
+ KeyError
215
+ LoadError
216
+ LocalJumpError
217
+ Marshal
218
+ MatchData
219
+ Math
220
+ Method
221
+ Module
222
+ Mutex
223
+ NameError
224
+ NilClass
225
+ NoMemoryError
226
+ NoMethodError
227
+ NotImplementedError
228
+ Numeric
229
+ Object
230
+ ObjectSpace
231
+ Proc
232
+ Process
233
+ Queue
234
+ Random
235
+ Range
236
+ RangeError
237
+ Rational
238
+ Regexp
239
+ RegexpError
240
+ RubyVM
241
+ RuntimeError
242
+ ScriptError
243
+ SecurityError
244
+ Signal
245
+ SignalException
246
+ SizedQueue
247
+ StandardError
248
+ StopIteration
249
+ String
250
+ Struct
251
+ Symbol
252
+ SyntaxError
253
+ SystemCallError
254
+ SystemExit
255
+ SystemStackError
256
+ Thread
257
+ ThreadError
258
+ ThreadGroup
259
+ Time
260
+ TracePoint
261
+ TrueClass
262
+ TypeError
263
+ UnboundMethod
264
+ UncaughtThrowError
265
+ ZeroDivisionError
266
+ ).freeze
267
+
268
+ NAMESPACES = (
269
+ (
270
+ NAMESPACES_RUBY_186 |
271
+ NAMESPACES_RUBY_200 |
272
+ NAMESPACES_RUBY_220
273
+ # Remove Object because this is the global namespace and there are
274
+ # other checks for this.
275
+ ) - ['Object']
276
+ ).freeze
277
+
278
+ def namespaces
279
+ NAMESPACES
280
+ end
281
+
282
+ end
283
+ end
284
+ end
285
+ end
@@ -0,0 +1,628 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module SketchupRequirements
6
+ class RubyStdLibNamespace < Cop
7
+
8
+ include NoCommentDisable
9
+ include Sketchup::NamespaceChecker
10
+
11
+ MSG = 'Do not modify Ruby stdlib functionality.'.freeze
12
+
13
+ # We check only against the top level namespaces. The stdlib define more
14
+ # objects, but they are under one of the top level namespaces listed.
15
+
16
+ NAMESPACES_RUBY_1_8_6_STDLIB = [
17
+ "class Benchmark",
18
+ "class BigDecimal",
19
+ "class CGI",
20
+ "class CSV",
21
+ "class Curses",
22
+ "class Date",
23
+ "class DateTime",
24
+ "class DBM",
25
+ "class DBMError",
26
+ "class Delegater",
27
+ "class Delegator",
28
+ "class SimpleDelegater",
29
+ "class SimpleDelegator",
30
+ "class Digest",
31
+ "class MD5",
32
+ "class SHA1",
33
+ "class DL",
34
+ "class Win32API",
35
+ "class ACL",
36
+ "class DRb",
37
+ "class Foo",
38
+ "class ERB",
39
+ "class GDBM",
40
+ "class GDBMError",
41
+ "class GDBMFatalError",
42
+ "class Generator",
43
+ "class SyncEnumerator",
44
+ "class GetoptLong",
45
+ "class GServer",
46
+ "class Iconv",
47
+ "class IPAddr",
48
+ "class Socket",
49
+ "class IRB",
50
+ "class RubyLex",
51
+ "class RubyToken",
52
+ "class XMP",
53
+ "class Logger",
54
+ "class Mail",
55
+ "class Prime",
56
+ "class Matrix",
57
+ "class Vector",
58
+ "class Monitor",
59
+ "class MonitorMixin",
60
+ "class Net",
61
+ "class OpenURI",
62
+ "class URI",
63
+ "class OpenSSL",
64
+ "class OptionParser",
65
+ "class OpenStruct",
66
+ "class Pathname",
67
+ "class PP",
68
+ "class PrettyPrint",
69
+ "class PStore",
70
+ "class PTY",
71
+ "class Racc",
72
+ "class DOT",
73
+ "class DefaultDisplay",
74
+ "class Generators",
75
+ "class NameDescriptor",
76
+ "class Options",
77
+ "class RDoc",
78
+ "class RI",
79
+ "class RiDriver",
80
+ "class RiError",
81
+ "class SM",
82
+ "class TemplatePage",
83
+ "class TruncatedDataError",
84
+ "class Resolv",
85
+ "class SOCKSSocket",
86
+ "class TCPSocket",
87
+ "class UDPSocket",
88
+ "class REXML",
89
+ "class Rinda",
90
+ "class RSS",
91
+ "class XML",
92
+ "class XMLEncoding_ja",
93
+ "class RUNIT",
94
+ "class Scanf",
95
+ "class SDBM",
96
+ "class SDBMError",
97
+ "class Set",
98
+ "class SortedSet",
99
+ "class Shell",
100
+ "class SOAP",
101
+ "class WEBrick",
102
+ "class BasicSocket",
103
+ "class IPSocket",
104
+ "class SocketError",
105
+ "class TCPServer",
106
+ "class UNIXServer",
107
+ "class UNIXSocket",
108
+ "class StringIO",
109
+ "class StringScanner",
110
+ "class Sync_m",
111
+ "class Synchronizer",
112
+ "class TestSyslog",
113
+ "class Tempfile",
114
+ "class Test",
115
+ "class ThWait",
116
+ "class Timeout",
117
+ "class Tracer",
118
+ "class TSort",
119
+ "class WeakRef",
120
+ "class Win32",
121
+ "class OLEProperty",
122
+ "class WIN32OLE",
123
+ "class WIN32OLERuntimeError",
124
+ "class WIN32OLE_EVENT",
125
+ "class WIN32OLE_METHOD",
126
+ "class WIN32OLE_PARAM",
127
+ "class WIN32OLE_TYPE",
128
+ "class WIN32OLE_VARIABLE",
129
+ "class WSDL",
130
+ "class HttpServer",
131
+ "class NQXML",
132
+ "class XMLRPC",
133
+ "class XSD",
134
+ "class YAML",
135
+ "class Zlib",
136
+ "module Abbrev",
137
+ "module Base64",
138
+ "module Benchmark",
139
+ "module BigMath",
140
+ "module Jacobian",
141
+ "module LUSolve",
142
+ "module Newton",
143
+ "module CGI",
144
+ "module Curses",
145
+ "module Digest",
146
+ "module DL",
147
+ "module DRb",
148
+ "module ERB",
149
+ "module Etc",
150
+ "module Fcntl",
151
+ "module FileUtils",
152
+ "module Finalizer",
153
+ "module Find",
154
+ "module Forwardable",
155
+ "module SingleForwardable",
156
+ "module Iconv",
157
+ "module IPSocket",
158
+ "module IRB",
159
+ "module RubyToken",
160
+ "module Logger",
161
+ "module Config",
162
+ "module Logging",
163
+ "module MonitorMixin",
164
+ "module Mutex_m",
165
+ "module Net",
166
+ "module Kconv",
167
+ "module NKF",
168
+ "module Observable",
169
+ "module OpenURI",
170
+ "module URI",
171
+ "module Open3",
172
+ "module Buffering",
173
+ "module OpenSSL",
174
+ "module OptionParser",
175
+ "module ParseDate",
176
+ "module Pathname",
177
+ "module Ping",
178
+ "module PP",
179
+ "module Profiler__",
180
+ "module PStore",
181
+ "module PTY",
182
+ "module Racc",
183
+ "module DOT",
184
+ "module Generators",
185
+ "module Options",
186
+ "module RDoc",
187
+ "module RI",
188
+ "module RiDisplay",
189
+ "module SM",
190
+ "module TokenStream",
191
+ "module Readline",
192
+ "module Resolv",
193
+ "module REXML",
194
+ "module Rinda",
195
+ "module RSS",
196
+ "module XML",
197
+ "module XMLEncoding_ja",
198
+ "module RUNIT",
199
+ "module Scanf",
200
+ "module Shell",
201
+ "module Singleton",
202
+ "module SOAP",
203
+ "module WEBrick",
204
+ "module Socket",
205
+ "module Synchronizer_m",
206
+ "module Syslog",
207
+ "module Test",
208
+ "module Timeout",
209
+ "module TSort",
210
+ "module Win32",
211
+ "module WIN32OLE",
212
+ "module WSDL",
213
+ "module NQXML",
214
+ "module XMLRPC",
215
+ "module XSD",
216
+ "module YAML",
217
+ "module Zlib",
218
+ ].freeze
219
+
220
+ NAMESPACES_RUBY_2_0_0_STDLIB = [
221
+ "class Benchmark",
222
+ "class BigDecimal",
223
+ "class CGI",
224
+ "class CSV",
225
+ "class Curses",
226
+ "class FileViewer",
227
+ "class Date",
228
+ "class DateTime",
229
+ "class DBM",
230
+ "class DBMError",
231
+ "class DEBUGGER__",
232
+ "class Delegator",
233
+ "class SimpleDelegator",
234
+ "class Digest",
235
+ "class DL",
236
+ "class Win32",
237
+ "class Win32API",
238
+ "class ACL",
239
+ "class DRb",
240
+ "class Foo",
241
+ "class ERB",
242
+ "class Fiddle",
243
+ "class FileUtils",
244
+ "class GDBM",
245
+ "class GDBMError",
246
+ "class GDBMFatalError",
247
+ "class GetoptLong",
248
+ "class GServer",
249
+ "class IPAddr",
250
+ "class Socket",
251
+ "class IRB",
252
+ "class RubyLex",
253
+ "class RubyToken",
254
+ "class XMP",
255
+ "class JSON",
256
+ "class OpenStruct",
257
+ "class Logger",
258
+ "class Matrix",
259
+ "class Vector",
260
+ "class MiniTest",
261
+ "class ParallelEach",
262
+ "class PrideIO",
263
+ "class PrideLOL",
264
+ "class Monitor",
265
+ "class MonitorMixin",
266
+ "class Net",
267
+ "class EXCEPTION_TYPE",
268
+ "class HTTPMovedTemporarily",
269
+ "class HTTPMultipleChoice",
270
+ "class HTTPRequestURITooLarge",
271
+ "class OpenURI",
272
+ "class URI",
273
+ "class OpenSSL",
274
+ "class OptionParser",
275
+ "class Pathname",
276
+ "class PP",
277
+ "class PrettyPrint",
278
+ "class Prime",
279
+ "class PStore",
280
+ "class Psych",
281
+ "class PTY",
282
+ "class Racc",
283
+ "class CompositePublisher",
284
+ "class Rake",
285
+ "class SshDirPublisher",
286
+ "class SshFilePublisher",
287
+ "class SshFreshDirPublisher",
288
+ "class RDoc",
289
+ "class RDocTask",
290
+ "class Resolv",
291
+ "class IPSocket",
292
+ "class SOCKSSocket",
293
+ "class TCPSocket",
294
+ "class UDPSocket",
295
+ "class REXML",
296
+ "class Rinda",
297
+ "class Ripper",
298
+ "class RSS",
299
+ "class XML",
300
+ "class XMLEncoding_ja",
301
+ "class Gem",
302
+ "class Requirement",
303
+ "class TempIO",
304
+ "class YAML",
305
+ "class Scanf",
306
+ "class SDBM",
307
+ "class SDBMError",
308
+ "class Set",
309
+ "class SortedSet",
310
+ "class Shell",
311
+ "class Addrinfo",
312
+ "class BasicSocket",
313
+ "class SocketError",
314
+ "class TCPServer",
315
+ "class UNIXServer",
316
+ "class UNIXSocket",
317
+ "class StringIO",
318
+ "class StringScanner",
319
+ "class Sync_m",
320
+ "class Synchronizer",
321
+ "class Syslog",
322
+ "class Tempfile",
323
+ "class Test",
324
+ "class ThWait",
325
+ "class Timeout",
326
+ "class Tracer",
327
+ "class TSort",
328
+ "class WeakRef",
329
+ "class WEBrick",
330
+ "class OLEProperty",
331
+ "class WIN32OLE",
332
+ "class WIN32OLERuntimeError",
333
+ "class WIN32OLE_EVENT",
334
+ "class WIN32OLE_METHOD",
335
+ "class WIN32OLE_PARAM",
336
+ "class WIN32OLE_TYPE",
337
+ "class WIN32OLE_TYPELIB",
338
+ "class WIN32OLE_VARIABLE",
339
+ "class WIN32OLE_VARIANT",
340
+ "class HttpServer",
341
+ "class NQXML",
342
+ "class XMLRPC",
343
+ "class Zlib",
344
+ "module Abbrev",
345
+ "module Base64",
346
+ "module Benchmark",
347
+ "module BigMath",
348
+ "module Jacobian",
349
+ "module LUSolve",
350
+ "module Newton",
351
+ "module CGI",
352
+ "module CMath",
353
+ "module Coverage",
354
+ "module Curses",
355
+ "module DEBUGGER__",
356
+ "module Digest",
357
+ "module DL",
358
+ "module Win32",
359
+ "module DRb",
360
+ "module E2MM",
361
+ "module English",
362
+ "module ERB",
363
+ "module Etc",
364
+ "module FileUtils",
365
+ "module RbConfig",
366
+ "module Fcntl",
367
+ "module Fiddle",
368
+ "module Find",
369
+ "module Forwardable",
370
+ "module SingleForwardable",
371
+ "module IPSocket",
372
+ "module IRB",
373
+ "module RubyToken",
374
+ "module JSON",
375
+ "module Logger",
376
+ "module MiniTest",
377
+ "module Minitest",
378
+ "module MakeMakefile",
379
+ "module MonitorMixin",
380
+ "module Mutex_m",
381
+ "module Net",
382
+ "module Kconv",
383
+ "module NKF",
384
+ "module Observable",
385
+ "module OpenURI",
386
+ "module URI",
387
+ "module Open3",
388
+ "module OpenSSL",
389
+ "module OptionParser",
390
+ "module Pathname",
391
+ "module PP",
392
+ "module Prime",
393
+ "module Profiler__",
394
+ "module Psych",
395
+ "module PTY",
396
+ "module Racc",
397
+ "module RDoc",
398
+ "module Rake",
399
+ "module Sys",
400
+ "module Readline",
401
+ "module Resolv",
402
+ "module REXML",
403
+ "module Rinda",
404
+ "module RSS",
405
+ "module XML",
406
+ "module XMLEncoding_ja",
407
+ "module Gem",
408
+ "module YAML",
409
+ "module Scanf",
410
+ "module SecureRandom",
411
+ "module Shell",
412
+ "module Shellwords",
413
+ "module Singleton",
414
+ "module Synchronizer_m",
415
+ "module Syslog",
416
+ "module Test",
417
+ "module Timeout",
418
+ "module TSort",
419
+ "module WeakRef",
420
+ "module WEBrick",
421
+ "module WIN32OLE",
422
+ "module NQXML",
423
+ "module XMLRPC",
424
+ "module Zlib",
425
+ ].freeze
426
+
427
+ NAMESPACES_RUBY_2_2_6_STDLIB = [
428
+ "class Benchmark",
429
+ "class BigDecimal",
430
+ "class CGI",
431
+ "class CSV",
432
+ "class Date",
433
+ "class DateTime",
434
+ "class DBM",
435
+ "class DBMError",
436
+ "class DEBUGGER__",
437
+ "class Delegator",
438
+ "class SimpleDelegator",
439
+ "class Digest",
440
+ "class ACL",
441
+ "class DRb",
442
+ "class ERB",
443
+ "class Fiddle",
444
+ "class FileUtils",
445
+ "class GDBM",
446
+ "class GDBMError",
447
+ "class GDBMFatalError",
448
+ "class GetoptLong",
449
+ "class IPAddr",
450
+ "class Socket",
451
+ "class IRB",
452
+ "class RubyLex",
453
+ "class RubyToken",
454
+ "class XMP",
455
+ "class JSON",
456
+ "class OpenStruct",
457
+ "class Logger",
458
+ "class Matrix",
459
+ "class Vector",
460
+ "class Monitor",
461
+ "class MonitorMixin",
462
+ "class Net",
463
+ "class EXCEPTION_TYPE",
464
+ "class HTTPMovedTemporarily",
465
+ "class HTTPMultipleChoice",
466
+ "class HTTPRequestURITooLarge",
467
+ "class OpenURI",
468
+ "class URI",
469
+ "class OpenSSL",
470
+ "class OptParse",
471
+ "class OptionParser",
472
+ "class Pathname",
473
+ "class PP",
474
+ "class PrettyPrint",
475
+ "class Prime",
476
+ "class PStore",
477
+ "class Psych",
478
+ "class PTY",
479
+ "class Racc",
480
+ "class Rake",
481
+ "class RDoc",
482
+ "class RDocTask",
483
+ "class Resolv",
484
+ "class IPSocket",
485
+ "class SOCKSSocket",
486
+ "class TCPSocket",
487
+ "class UDPSocket",
488
+ "class REXML",
489
+ "class Rinda",
490
+ "class Ripper",
491
+ "class RSS",
492
+ "class XML",
493
+ "class XMLEncoding_ja",
494
+ "class Gem",
495
+ "class TempIO",
496
+ "class Scanf",
497
+ "class SDBM",
498
+ "class SDBMError",
499
+ "class Set",
500
+ "class SortedSet",
501
+ "class Shell",
502
+ "class Addrinfo",
503
+ "class BasicSocket",
504
+ "class SocketError",
505
+ "class TCPServer",
506
+ "class UNIXServer",
507
+ "class UNIXSocket",
508
+ "class StringIO",
509
+ "class StringScanner",
510
+ "class Sync_m",
511
+ "class Synchronizer",
512
+ "class Syslog",
513
+ "class Tempfile",
514
+ "class ThWait",
515
+ "class Timeout",
516
+ "class Tracer",
517
+ "class TSort",
518
+ "class WeakRef",
519
+ "class WEBrick",
520
+ "class OLEProperty",
521
+ "class WIN32OLE",
522
+ "class WIN32OLERuntimeError",
523
+ "class WIN32OLE_EVENT",
524
+ "class WIN32OLE_METHOD",
525
+ "class WIN32OLE_PARAM",
526
+ "class WIN32OLE_RECORD",
527
+ "class WIN32OLE_TYPE",
528
+ "class WIN32OLE_TYPELIB",
529
+ "class WIN32OLE_VARIABLE",
530
+ "class WIN32OLE_VARIANT",
531
+ "class NQXML",
532
+ "class XMLRPC",
533
+ "class YAML",
534
+ "class Zlib",
535
+ "module Abbrev",
536
+ "module Base64",
537
+ "module Benchmark",
538
+ "module BigMath",
539
+ "module Jacobian",
540
+ "module LUSolve",
541
+ "module Newton",
542
+ "module CGI",
543
+ "module CMath",
544
+ "module Coverage",
545
+ "module DEBUGGER__",
546
+ "module Digest",
547
+ "module DRb",
548
+ "module Exception2MessageMapper",
549
+ "module English",
550
+ "module ERB",
551
+ "module Etc",
552
+ "module FileUtils",
553
+ "module RbConfig",
554
+ "module Fcntl",
555
+ "module Fiddle",
556
+ "module Find",
557
+ "module Forwardable",
558
+ "module SingleForwardable",
559
+ "module IPSocket",
560
+ "module IRB",
561
+ "module RubyToken",
562
+ "module JSON",
563
+ "module Logger",
564
+ "module MakeMakefile",
565
+ "module MonitorMixin",
566
+ "module Mutex_m",
567
+ "module Net",
568
+ "module Kconv",
569
+ "module NKF",
570
+ "module Observable",
571
+ "module OpenURI",
572
+ "module URI",
573
+ "module Open3",
574
+ "module OpenSSL",
575
+ "module OptionParser",
576
+ "module Pathname",
577
+ "module PP",
578
+ "module Prime",
579
+ "module Profiler__",
580
+ "module Psych",
581
+ "module PTY",
582
+ "module Racc",
583
+ "module Rake",
584
+ "module RDoc",
585
+ "module Test",
586
+ "module Readline",
587
+ "module Resolv",
588
+ "module REXML",
589
+ "module Rinda",
590
+ "module RSS",
591
+ "module XML",
592
+ "module XMLEncoding_ja",
593
+ "module Gem",
594
+ "module YAML",
595
+ "module Scanf",
596
+ "module SecureRandom",
597
+ "module Shell",
598
+ "module Shellwords",
599
+ "module Singleton",
600
+ "module Synchronizer_m",
601
+ "module Syslog",
602
+ "module Timeout",
603
+ "module TSort",
604
+ "module UnicodeNormalize",
605
+ "module WeakRef",
606
+ "module WEBrick",
607
+ "module WIN32OLE",
608
+ "module NQXML",
609
+ "module XMLRPC",
610
+ "module Zlib",
611
+ ].freeze
612
+
613
+ NAMESPACES_RUBY_STDLIB = (
614
+ NAMESPACES_RUBY_1_8_6_STDLIB |
615
+ NAMESPACES_RUBY_2_0_0_STDLIB |
616
+ NAMESPACES_RUBY_2_2_6_STDLIB
617
+ ).freeze
618
+
619
+ NAMESPACES = NAMESPACES_RUBY_STDLIB.map { |item| item.split(' ').last }
620
+
621
+ def namespaces
622
+ NAMESPACES
623
+ end
624
+
625
+ end
626
+ end
627
+ end
628
+ end