ruby-lint 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -5
- data/Gemfile +9 -4
- data/MANIFEST +32 -28
- data/README.md +18 -5
- data/Rakefile +7 -3
- data/checksum/ruby-lint-1.0.2.gem.sha512 +1 -0
- data/checksum/ruby-lint-1.0.3.gem.sha512 +1 -0
- data/doc/changelog.md +40 -0
- data/doc/definitions.md +182 -0
- data/gen/rails/constants.txt +12 -0
- data/gen/rails/requires.rb +2 -0
- data/gen/stdlib/constants.rb +30 -0
- data/gen/stdlib/constants.txt +214 -0
- data/gen/stdlib/requires.rb +64 -0
- data/lib/ruby-lint.rb +7 -14
- data/lib/ruby-lint/analysis/undefined_methods.rb +8 -1
- data/lib/ruby-lint/analysis/useless_equality_checks.rb +92 -0
- data/lib/ruby-lint/cli.rb +1 -2
- data/lib/ruby-lint/cli/analyze.rb +55 -26
- data/lib/ruby-lint/cli/cache.rb +60 -0
- data/lib/ruby-lint/configuration.rb +10 -4
- data/lib/ruby-lint/constant_loader.rb +75 -22
- data/lib/ruby-lint/definition/constant_proxy.rb +51 -3
- data/lib/ruby-lint/definition/registry.rb +126 -0
- data/lib/ruby-lint/definition/ruby_method.rb +0 -11
- data/lib/ruby-lint/definition/ruby_object.rb +32 -24
- data/lib/ruby-lint/definition_builder/base.rb +9 -12
- data/lib/ruby-lint/definition_builder/primitive.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_array.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_block.rb +3 -3
- data/lib/ruby-lint/definition_builder/ruby_class.rb +2 -2
- data/lib/ruby-lint/definition_builder/ruby_hash.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_method.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_module.rb +4 -4
- data/lib/ruby-lint/definition_generator.rb +12 -2
- data/lib/ruby-lint/definitions/core/abbrev.rb +8 -11
- data/lib/ruby-lint/definitions/core/argf.rb +9 -7
- data/lib/ruby-lint/definitions/core/argument_error.rb +8 -10
- data/lib/ruby-lint/definitions/core/argv.rb +9 -9
- data/lib/ruby-lint/definitions/core/array.rb +296 -534
- data/lib/ruby-lint/definitions/core/base64.rb +22 -25
- data/lib/ruby-lint/definitions/core/basic_object.rb +30 -30
- data/lib/ruby-lint/definitions/core/basic_socket.rb +341 -455
- data/lib/ruby-lint/definitions/core/benchmark.rb +157 -24
- data/lib/ruby-lint/definitions/core/bignum.rb +110 -95
- data/lib/ruby-lint/definitions/core/binding.rb +38 -35
- data/lib/ruby-lint/definitions/core/cgi.rb +333 -49
- data/lib/ruby-lint/definitions/core/class.rb +16 -16
- data/lib/ruby-lint/definitions/core/common_headers.rb +4 -548
- data/lib/ruby-lint/definitions/core/common_libs.rb +4 -421
- data/lib/ruby-lint/definitions/core/comparable.rb +28 -29
- data/lib/ruby-lint/definitions/core/complex.rb +103 -141
- data/lib/ruby-lint/definitions/core/condition_variable.rb +14 -14
- data/lib/ruby-lint/definitions/core/config.rb +4 -318
- data/lib/ruby-lint/definitions/core/conftest_c.rb +4 -548
- data/lib/ruby-lint/definitions/core/coutflag.rb +4 -548
- data/lib/ruby-lint/definitions/core/csv.rb +729 -329
- data/lib/ruby-lint/definitions/core/data.rb +9 -8
- data/lib/ruby-lint/definitions/core/date.rb +452 -526
- data/lib/ruby-lint/definitions/core/date_time.rb +234 -303
- data/lib/ruby-lint/definitions/core/delegator.rb +57 -48
- data/lib/ruby-lint/definitions/core/digest.rb +94 -115
- data/lib/ruby-lint/definitions/core/dir.rb +89 -459
- data/lib/ruby-lint/definitions/core/drb.rb +531 -36
- data/lib/ruby-lint/definitions/core/drb_id_conv.rb +10 -19
- data/lib/ruby-lint/definitions/core/drb_object.rb +53 -58
- data/lib/ruby-lint/definitions/core/drb_undumped.rb +7 -10
- data/lib/ruby-lint/definitions/core/encoding.rb +1026 -1718
- data/lib/ruby-lint/definitions/core/encoding_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/enumerable.rb +123 -292
- data/lib/ruby-lint/definitions/core/enumerator.rb +28 -26
- data/lib/ruby-lint/definitions/core/env.rb +8 -9
- data/lib/ruby-lint/definitions/core/eoferror.rb +9 -8
- data/lib/ruby-lint/definitions/core/erb.rb +201 -226
- data/lib/ruby-lint/definitions/core/errno.rb +1593 -2917
- data/lib/ruby-lint/definitions/core/etc.rb +86 -107
- data/lib/ruby-lint/definitions/core/exception.rb +70 -50
- data/lib/ruby-lint/definitions/core/exception_for_matrix.rb +24 -37
- data/lib/ruby-lint/definitions/core/export_prefix.rb +4 -16
- data/lib/ruby-lint/definitions/core/failed_message.rb +4 -548
- data/lib/ruby-lint/definitions/core/false.rb +9 -7
- data/lib/ruby-lint/definitions/core/false_class.rb +40 -22
- data/lib/ruby-lint/definitions/core/fcntl.rb +120 -7
- data/lib/ruby-lint/definitions/core/fiber.rb +25 -26
- data/lib/ruby-lint/definitions/core/fiber_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/file.rb +1119 -860
- data/lib/ruby-lint/definitions/core/file_test.rb +79 -80
- data/lib/ruby-lint/definitions/core/file_utils.rb +1203 -765
- data/lib/ruby-lint/definitions/core/find.rb +9 -12
- data/lib/ruby-lint/definitions/core/fixnum.rb +113 -663
- data/lib/ruby-lint/definitions/core/float.rb +171 -2755
- data/lib/ruby-lint/definitions/core/float_domain_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/forwardable.rb +37 -30
- data/lib/ruby-lint/definitions/core/gc.rb +31 -38
- data/lib/ruby-lint/definitions/core/gem.rb +2324 -2183
- data/lib/ruby-lint/definitions/core/getopt_long.rb +107 -32
- data/lib/ruby-lint/definitions/core/gserver.rb +61 -61
- data/lib/ruby-lint/definitions/core/hash.rb +354 -1172
- data/lib/ruby-lint/definitions/core/hdr_ext.rb +4 -421
- data/lib/ruby-lint/definitions/core/index_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/install_dirs.rb +4 -421
- data/lib/ruby-lint/definitions/core/integer.rb +93 -67
- data/lib/ruby-lint/definitions/core/interrupt.rb +11 -11
- data/lib/ruby-lint/definitions/core/io.rb +574 -673
- data/lib/ruby-lint/definitions/core/ioerror.rb +9 -8
- data/lib/ruby-lint/definitions/core/ipaddr.rb +115 -90
- data/lib/ruby-lint/definitions/core/ipsocket.rb +301 -472
- data/lib/ruby-lint/definitions/core/irb.rb +1206 -34
- data/lib/ruby-lint/definitions/core/json.rb +483 -74
- data/lib/ruby-lint/definitions/core/kconv.rb +88 -36
- data/lib/ruby-lint/definitions/core/kernel.rb +408 -412
- data/lib/ruby-lint/definitions/core/key_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/libarg.rb +4 -548
- data/lib/ruby-lint/definitions/core/libpathflag.rb +4 -548
- data/lib/ruby-lint/definitions/core/link_so.rb +4 -548
- data/lib/ruby-lint/definitions/core/load_error.rb +24 -25
- data/lib/ruby-lint/definitions/core/local_jump_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/logger.rb +294 -61
- data/lib/ruby-lint/definitions/core/logging.rb +17 -20
- data/lib/ruby-lint/definitions/core/make_makefile.rb +548 -384
- data/lib/ruby-lint/definitions/core/marshal.rb +260 -358
- data/lib/ruby-lint/definitions/core/match_data.rb +51 -48
- data/lib/ruby-lint/definitions/core/math.rb +170 -178
- data/lib/ruby-lint/definitions/core/matrix.rb +354 -297
- data/lib/ruby-lint/definitions/core/method.rb +41 -42
- data/lib/ruby-lint/definitions/core/module.rb +219 -223
- data/lib/ruby-lint/definitions/core/monitor.rb +26 -28
- data/lib/ruby-lint/definitions/core/monitor_mixin.rb +36 -42
- data/lib/ruby-lint/definitions/core/mutex.rb +20 -22
- data/lib/ruby-lint/definitions/core/mutex_m.rb +24 -27
- data/lib/ruby-lint/definitions/core/name_error.rb +13 -13
- data/lib/ruby-lint/definitions/core/nil.rb +9 -7
- data/lib/ruby-lint/definitions/core/nil_class.rb +47 -31
- data/lib/ruby-lint/definitions/core/nkf.rb +76 -9
- data/lib/ruby-lint/definitions/core/no_memory_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/no_method_error.rb +14 -14
- data/lib/ruby-lint/definitions/core/not_implemented_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/numeric.rb +88 -80
- data/lib/ruby-lint/definitions/core/object.rb +20 -20
- data/lib/ruby-lint/definitions/core/object_space.rb +28 -31
- data/lib/ruby-lint/definitions/core/observable.rb +20 -23
- data/lib/ruby-lint/definitions/core/open3.rb +47 -50
- data/lib/ruby-lint/definitions/core/open_ssl.rb +4158 -13
- data/lib/ruby-lint/definitions/core/open_struct.rb +40 -37
- data/lib/ruby-lint/definitions/core/open_uri.rb +142 -25
- data/lib/ruby-lint/definitions/core/option_parser.rb +919 -981
- data/lib/ruby-lint/definitions/core/orig_libpath.rb +4 -32
- data/lib/ruby-lint/definitions/core/outflag.rb +4 -548
- data/lib/ruby-lint/definitions/core/pathname.rb +211 -186
- data/lib/ruby-lint/definitions/core/pp.rb +160 -99
- data/lib/ruby-lint/definitions/core/pretty_print.rb +170 -56
- data/lib/ruby-lint/definitions/core/prime.rb +329 -234
- data/lib/ruby-lint/definitions/core/proc.rb +63 -75
- data/lib/ruby-lint/definitions/core/process.rb +504 -412
- data/lib/ruby-lint/definitions/core/profiler__.rb +13 -16
- data/lib/ruby-lint/definitions/core/pstore.rb +66 -36
- data/lib/ruby-lint/definitions/core/queue.rb +32 -32
- data/lib/ruby-lint/definitions/core/random.rb +29 -29
- data/lib/ruby-lint/definitions/core/range.rb +123 -77
- data/lib/ruby-lint/definitions/core/range_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/rational.rb +84 -67
- data/lib/ruby-lint/definitions/core/rb_config.rb +18 -29
- data/lib/ruby-lint/definitions/core/readline.rb +85 -41
- data/lib/ruby-lint/definitions/core/regexp.rb +239 -293
- data/lib/ruby-lint/definitions/core/regexp_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/resolv.rb +1365 -38
- data/lib/ruby-lint/definitions/core/rpathflag.rb +4 -548
- data/lib/ruby-lint/definitions/core/ruby_copyright.rb +9 -9
- data/lib/ruby-lint/definitions/core/ruby_description.rb +9 -9
- data/lib/ruby-lint/definitions/core/ruby_engine.rb +9 -9
- data/lib/ruby-lint/definitions/core/ruby_patchlevel.rb +9 -9
- data/lib/ruby-lint/definitions/core/ruby_platform.rb +9 -9
- data/lib/ruby-lint/definitions/core/ruby_release_date.rb +9 -9
- data/lib/ruby-lint/definitions/core/ruby_revision.rb +4 -246
- data/lib/ruby-lint/definitions/core/ruby_version.rb +9 -9
- data/lib/ruby-lint/definitions/core/runtime_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/scan_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/scanf.rb +83 -7
- data/lib/ruby-lint/definitions/core/script_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/secure_random.rb +22 -25
- data/lib/ruby-lint/definitions/core/security_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/set.rb +154 -504
- data/lib/ruby-lint/definitions/core/shellwords.rb +27 -28
- data/lib/ruby-lint/definitions/core/signal.rb +21 -29
- data/lib/ruby-lint/definitions/core/signal_exception.rb +15 -15
- data/lib/ruby-lint/definitions/core/simple_delegator.rb +10 -26
- data/lib/ruby-lint/definitions/core/single_forwardable.rb +35 -38
- data/lib/ruby-lint/definitions/core/singleton.rb +21 -28
- data/lib/ruby-lint/definitions/core/sized_queue.rb +35 -31
- data/lib/ruby-lint/definitions/core/socket.rb +2942 -438
- data/lib/ruby-lint/definitions/core/socket_error.rb +4 -54
- data/lib/ruby-lint/definitions/core/sorted_set.rb +49 -263
- data/lib/ruby-lint/definitions/core/src_ext.rb +4 -421
- data/lib/ruby-lint/definitions/core/standard_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/stderr.rb +9 -9
- data/lib/ruby-lint/definitions/core/stdin.rb +9 -9
- data/lib/ruby-lint/definitions/core/stdout.rb +9 -9
- data/lib/ruby-lint/definitions/core/stop_iteration.rb +10 -8
- data/lib/ruby-lint/definitions/core/string.rb +451 -1222
- data/lib/ruby-lint/definitions/core/string_io.rb +226 -518
- data/lib/ruby-lint/definitions/core/string_scanner.rb +107 -108
- data/lib/ruby-lint/definitions/core/struct.rb +113 -761
- data/lib/ruby-lint/definitions/core/syck.rb +1292 -25
- data/lib/ruby-lint/definitions/core/symbol.rb +78 -59
- data/lib/ruby-lint/definitions/core/syntax_error.rb +23 -33
- data/lib/ruby-lint/definitions/core/system_call_error.rb +26 -24
- data/lib/ruby-lint/definitions/core/system_exit.rb +15 -15
- data/lib/ruby-lint/definitions/core/system_stack_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/tcpserver.rb +291 -486
- data/lib/ruby-lint/definitions/core/tcpsocket.rb +302 -483
- data/lib/ruby-lint/definitions/core/tempfile.rb +39 -832
- data/lib/ruby-lint/definitions/core/th_wait.rb +35 -70
- data/lib/ruby-lint/definitions/core/thread.rb +131 -144
- data/lib/ruby-lint/definitions/core/thread_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/thread_group.rb +23 -16
- data/lib/ruby-lint/definitions/core/threads_wait.rb +43 -63
- data/lib/ruby-lint/definitions/core/time.rb +236 -159
- data/lib/ruby-lint/definitions/core/timeout.rb +40 -14
- data/lib/ruby-lint/definitions/core/timeout_error.rb +4 -54
- data/lib/ruby-lint/definitions/core/toplevel_binding.rb +9 -7
- data/lib/ruby-lint/definitions/core/true.rb +9 -7
- data/lib/ruby-lint/definitions/core/true_class.rb +40 -22
- data/lib/ruby-lint/definitions/core/try_link.rb +4 -548
- data/lib/ruby-lint/definitions/core/tsort.rb +21 -19
- data/lib/ruby-lint/definitions/core/type_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/udpsocket.rb +302 -487
- data/lib/ruby-lint/definitions/core/unbound_method.rb +35 -36
- data/lib/ruby-lint/definitions/core/universal_ints.rb +4 -421
- data/lib/ruby-lint/definitions/core/unixserver.rb +291 -490
- data/lib/ruby-lint/definitions/core/unixsocket.rb +314 -476
- data/lib/ruby-lint/definitions/core/uri.rb +1309 -38
- data/lib/ruby-lint/definitions/core/vector.rb +143 -242
- data/lib/ruby-lint/definitions/core/weak_ref.rb +29 -32
- data/lib/ruby-lint/definitions/core/webrick.rb +2430 -7
- data/lib/ruby-lint/definitions/core/xmlrpc.rb +5 -7
- data/lib/ruby-lint/definitions/core/yaml.rb +109 -2325
- data/lib/ruby-lint/definitions/core/zero_division_error.rb +9 -8
- data/lib/ruby-lint/definitions/core/zlib.rb +272 -8526
- data/lib/ruby-lint/definitions/gems/.gitkeep +0 -0
- data/lib/ruby-lint/definitions/gems/devise.rb +2271 -0
- data/lib/ruby-lint/definitions/gems/nokogiri.rb +7668 -0
- data/lib/ruby-lint/definitions/rails/abstract_controller.rb +508 -322
- data/lib/ruby-lint/definitions/rails/action_controller.rb +2252 -4462
- data/lib/ruby-lint/definitions/rails/action_dispatch.rb +3448 -1846
- data/lib/ruby-lint/definitions/rails/action_mailer.rb +750 -1349
- data/lib/ruby-lint/definitions/rails/action_pack.rb +31 -14
- data/lib/ruby-lint/definitions/rails/action_view.rb +5788 -5748
- data/lib/ruby-lint/definitions/rails/active_model.rb +1015 -1065
- data/lib/ruby-lint/definitions/rails/active_record.rb +8080 -8075
- data/lib/ruby-lint/definitions/rails/active_support.rb +3844 -4153
- data/lib/ruby-lint/definitions/rails/arel.rb +6752 -2301
- data/lib/ruby-lint/definitions/rails/rails.rb +1553 -2383
- data/lib/ruby-lint/definitions/rails/sprockets.rb +1131 -3140
- data/lib/ruby-lint/file_list.rb +43 -0
- data/lib/ruby-lint/file_scanner.rb +3 -3
- data/lib/ruby-lint/generated_constant.rb +5 -1
- data/lib/ruby-lint/inspector.rb +108 -46
- data/lib/ruby-lint/method_call/attribute.rb +3 -1
- data/lib/ruby-lint/rake_task.rb +98 -0
- data/lib/ruby-lint/ruby_lint.rb +11 -0
- data/lib/ruby-lint/runner.rb +0 -11
- data/lib/ruby-lint/template/definition.erb +26 -19
- data/lib/ruby-lint/template/scope.rb +12 -0
- data/lib/ruby-lint/variable_predicates.rb +14 -0
- data/lib/ruby-lint/version.rb +1 -1
- data/lib/ruby-lint/virtual_machine.rb +82 -46
- data/ruby-lint.gemspec +3 -14
- data/spec/ruby-lint/analysis/undefined_methods_spec.rb +20 -3
- data/spec/ruby-lint/analysis/useless_equality_checks_spec.rb +107 -0
- data/spec/ruby-lint/configuration_spec.rb +20 -0
- data/spec/ruby-lint/constant_loader_spec.rb +79 -0
- data/spec/ruby-lint/definition/constant_proxy_spec.rb +65 -34
- data/spec/ruby-lint/definition/registry_spec.rb +106 -0
- data/spec/ruby-lint/definition/ruby_object_spec.rb +25 -25
- data/spec/ruby-lint/definition_builder/primitive_spec.rb +10 -10
- data/spec/ruby-lint/definition_builder/ruby_class_spec.rb +18 -19
- data/spec/ruby-lint/definition_builder/ruby_method_spec.rb +12 -12
- data/spec/ruby-lint/definition_builder/ruby_module_spec.rb +14 -14
- data/spec/ruby-lint/definitions/argv_spec.rb +3 -2
- data/spec/ruby-lint/definitions/env_spec.rb +5 -3
- data/spec/ruby-lint/definitions/file_spec.rb +17 -0
- data/spec/ruby-lint/definitions/fixnum_spec.rb +18 -0
- data/spec/ruby-lint/definitions/io_spec.rb +5 -3
- data/spec/ruby-lint/definitions/kernel_spec.rb +18 -0
- data/spec/ruby-lint/definitions/range_spec.rb +21 -0
- data/spec/ruby-lint/definitions/string_spec.rb +20 -0
- data/spec/ruby-lint/file_list_spec.rb +25 -0
- data/spec/ruby-lint/file_scanner_spec.rb +12 -0
- data/spec/ruby-lint/inspector_spec.rb +203 -23
- data/spec/ruby-lint/method_call/.gitkeep +0 -0
- data/spec/ruby-lint/variable_predicates_spec.rb +30 -0
- data/spec/ruby-lint/virtual_machine/associate_nodes_spec.rb +6 -4
- data/spec/ruby-lint/virtual_machine/autoloading_spec.rb +3 -16
- data/spec/ruby-lint/virtual_machine/classes/redefining_spec.rb +28 -1
- data/spec/ruby-lint/virtual_machine/complex/rails_spec.rb +12 -9
- data/spec/ruby-lint/virtual_machine/global_variables_spec.rb +8 -5
- data/spec/ruby-lint/virtual_machine/method_call_tracking_spec.rb +0 -7
- data/spec/ruby-lint/virtual_machine/methods/attr_spec.rb +66 -0
- data/spec/ruby-lint/virtual_machine/methods/calls_spec.rb +25 -0
- data/spec/ruby-lint/virtual_machine/methods/define_method_spec.rb +1 -1
- data/spec/ruby-lint/virtual_machine/methods/docstrings_spec.rb +20 -9
- data/spec/ruby-lint/virtual_machine/methods/kernel_spec.rb +25 -0
- data/spec/ruby-lint/virtual_machine/methods/patching_spec.rb +0 -6
- data/spec/ruby-lint/virtual_machine/methods/square_bracket_spec.rb +32 -0
- data/spec/ruby-lint/virtual_machine/self_spec.rb +37 -0
- data/spec/spec_helper.rb +0 -1
- data/spec/support/building.rb +0 -4
- data/spec/support/definitions.rb +16 -0
- data/task/generate.rake +35 -33
- data/task/todo.rake +1 -1
- metadata +73 -100
- data/lib/ruby-lint/cli/ast.rb +0 -50
- data/lib/ruby-lint/cli/plot.rb +0 -94
- data/lib/ruby-lint/definitions/core/arg0.rb +0 -9
- data/lib/ruby-lint/definitions/core/autoload.rb +0 -41
- data/lib/ruby-lint/definitions/core/continuation.rb +0 -10
- data/lib/ruby-lint/definitions/core/default_record_separator.rb +0 -9
- data/lib/ruby-lint/definitions/core/fatal_error.rb +0 -10
- data/lib/ruby-lint/definitions/core/file_list.rb +0 -729
- data/lib/ruby-lint/definitions/core/immediate_value.rb +0 -21
- data/lib/ruby-lint/definitions/core/md5.rb +0 -80
- data/lib/ruby-lint/definitions/core/memory_segmention_error.rb +0 -10
- data/lib/ruby-lint/definitions/core/precision.rb +0 -23
- data/lib/ruby-lint/definitions/core/primitive_failure.rb +0 -10
- data/lib/ruby-lint/definitions/core/psych.rb +0 -139
- data/lib/ruby-lint/definitions/core/rake.rb +0 -4786
- data/lib/ruby-lint/definitions/core/rake_file_utils.rb +0 -205
- data/lib/ruby-lint/definitions/core/rakeversion.rb +0 -9
- data/lib/ruby-lint/definitions/core/rdoc.rb +0 -15
- data/lib/ruby-lint/definitions/core/rexml.rb +0 -13
- data/lib/ruby-lint/definitions/core/rss.rb +0 -13
- data/lib/ruby-lint/definitions/core/sha1.rb +0 -80
- data/lib/ruby-lint/definitions/core/unmarshalable.rb +0 -15
- data/lib/ruby-lint/definitions/core/unsupported_library_error.rb +0 -10
- data/lib/ruby-lint/definitions/global_variables.rb +0 -9
- data/lib/ruby-lint/definitions/rails.rb +0 -12
- data/lib/ruby-lint/global_scope.rb +0 -56
- data/spec/ruby-lint/cli/ast_spec.rb +0 -23
- data/spec/ruby-lint/method_call/assign_member_spec.rb +0 -25
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
# This file was automatically generated, any manual changes will be lost the
|
|
2
2
|
# next time this file is generated.
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
# Platform: rbx 2.1.1
|
|
4
|
+
# Platform: rbx 2.2.3.n364
|
|
6
5
|
|
|
7
|
-
RubyLint
|
|
8
|
-
|
|
6
|
+
RubyLint.registry.register('TSort') do |defs|
|
|
7
|
+
defs.define_constant('TSort') do |klass|
|
|
8
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
klass.define_instance_method('each_strongly_connected_component')
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
klass.define_instance_method('each_strongly_connected_component_from') do |method|
|
|
13
|
+
method.define_argument('node')
|
|
14
|
+
method.define_optional_argument('id_map')
|
|
15
|
+
method.define_optional_argument('stack')
|
|
16
|
+
end
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
method.define_argument('node')
|
|
16
|
-
method.define_optional_argument('id_map')
|
|
17
|
-
method.define_optional_argument('stack')
|
|
18
|
-
end
|
|
18
|
+
klass.define_instance_method('strongly_connected_components')
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
klass.define_instance_method('tsort')
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
klass.define_instance_method('tsort_each')
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
klass.define_instance_method('tsort_each_child') do |method|
|
|
25
|
+
method.define_argument('node')
|
|
26
|
+
end
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
method.define_argument('node')
|
|
28
|
+
klass.define_instance_method('tsort_each_node')
|
|
28
29
|
end
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
defs.define_constant('TSort::Cyclic') do |klass|
|
|
32
|
+
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
#
|
|
3
|
-
# Created: 2013-04-01 18:33:55 +0200
|
|
4
|
-
# Platform: rbx 2.0.0.rc1
|
|
1
|
+
# This file was automatically generated, any manual changes will be lost the
|
|
2
|
+
# next time this file is generated.
|
|
5
3
|
#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
# Platform: rbx 2.2.3.n364
|
|
5
|
+
|
|
6
|
+
RubyLint.registry.register('TypeError') do |defs|
|
|
7
|
+
defs.define_constant('TypeError') do |klass|
|
|
8
|
+
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -1,712 +1,527 @@
|
|
|
1
1
|
# This file was automatically generated, any manual changes will be lost the
|
|
2
2
|
# next time this file is generated.
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
# Platform: rbx 2.1.1
|
|
4
|
+
# Platform: rbx 2.2.3.n364
|
|
6
5
|
|
|
7
|
-
RubyLint
|
|
8
|
-
|
|
6
|
+
RubyLint.registry.register('UDPSocket') do |defs|
|
|
7
|
+
defs.define_constant('UDPSocket') do |klass|
|
|
8
|
+
klass.inherits(defs.constant_proxy('IPSocket', RubyLint.registry))
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end
|
|
10
|
+
klass.define_instance_method('bind') do |method|
|
|
11
|
+
method.define_argument('host')
|
|
12
|
+
method.define_argument('port')
|
|
13
|
+
end
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
end
|
|
15
|
+
klass.define_instance_method('connect') do |method|
|
|
16
|
+
method.define_argument('host')
|
|
17
|
+
method.define_argument('port')
|
|
18
|
+
end
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
method.define_argument('rhs')
|
|
25
|
-
end
|
|
20
|
+
klass.define_instance_method('initialize') do |method|
|
|
21
|
+
method.define_optional_argument('socktype')
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
method.define_argument('to')
|
|
30
|
-
method.define_optional_argument('max_length')
|
|
31
|
-
method.define_optional_argument('offset')
|
|
32
|
-
end
|
|
23
|
+
method.returns { |object| object.instance }
|
|
24
|
+
end
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
klass.define_instance_method('inspect')
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
klass.define_instance_method('send') do |method|
|
|
29
|
+
method.define_argument('message')
|
|
30
|
+
method.define_argument('flags')
|
|
31
|
+
method.define_rest_argument('to')
|
|
32
|
+
end
|
|
38
33
|
end
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
method.define_argument('path')
|
|
43
|
-
method.define_argument('flags')
|
|
44
|
-
end
|
|
35
|
+
defs.define_constant('UDPSocket::ACCMODE') do |klass|
|
|
36
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
45
37
|
|
|
46
|
-
klass.define_method('for_fd') do |method|
|
|
47
|
-
method.define_argument('fixnum')
|
|
48
38
|
end
|
|
49
39
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
method.define_optional_argument('separator')
|
|
53
|
-
method.define_optional_argument('limit')
|
|
54
|
-
method.define_optional_argument('options')
|
|
55
|
-
end
|
|
40
|
+
defs.define_constant('UDPSocket::APPEND') do |klass|
|
|
41
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
56
42
|
|
|
57
|
-
klass.define_method('from_descriptor') do |method|
|
|
58
|
-
method.define_argument('fixnum')
|
|
59
43
|
end
|
|
60
44
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
end
|
|
45
|
+
defs.define_constant('UDPSocket::BINARY') do |klass|
|
|
46
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
64
47
|
|
|
65
|
-
klass.define_method('initialize') do |method|
|
|
66
|
-
method.define_optional_argument('sclass')
|
|
67
|
-
method.define_optional_argument('name')
|
|
68
|
-
method.define_optional_argument('under')
|
|
69
48
|
end
|
|
70
49
|
|
|
71
|
-
|
|
50
|
+
defs.define_constant('UDPSocket::BidirectionalPipe') do |klass|
|
|
51
|
+
klass.inherits(defs.constant_proxy('IO', RubyLint.registry))
|
|
72
52
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
end
|
|
53
|
+
klass.define_instance_method('<<') do |method|
|
|
54
|
+
method.define_argument('obj')
|
|
55
|
+
end
|
|
77
56
|
|
|
78
|
-
|
|
79
|
-
method.define_rest_argument('args')
|
|
80
|
-
end
|
|
57
|
+
klass.define_instance_method('close')
|
|
81
58
|
|
|
82
|
-
|
|
83
|
-
method.define_argument('path')
|
|
84
|
-
method.define_argument('mode')
|
|
85
|
-
method.define_argument('perm')
|
|
86
|
-
end
|
|
59
|
+
klass.define_instance_method('close_read')
|
|
87
60
|
|
|
88
|
-
|
|
89
|
-
method.define_argument('mode')
|
|
90
|
-
end
|
|
61
|
+
klass.define_instance_method('close_write')
|
|
91
62
|
|
|
92
|
-
|
|
93
|
-
method.define_optional_argument('external')
|
|
94
|
-
method.define_optional_argument('internal')
|
|
95
|
-
method.define_optional_argument('options')
|
|
96
|
-
end
|
|
63
|
+
klass.define_instance_method('closed?')
|
|
97
64
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
method.define_optional_argument('options')
|
|
102
|
-
end
|
|
65
|
+
klass.define_instance_method('print') do |method|
|
|
66
|
+
method.define_rest_argument('args')
|
|
67
|
+
end
|
|
103
68
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
69
|
+
klass.define_instance_method('printf') do |method|
|
|
70
|
+
method.define_argument('fmt')
|
|
71
|
+
method.define_rest_argument('args')
|
|
72
|
+
end
|
|
108
73
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
method.define_optional_argument('offset')
|
|
113
|
-
method.define_optional_argument('options')
|
|
114
|
-
end
|
|
74
|
+
klass.define_instance_method('putc') do |method|
|
|
75
|
+
method.define_argument('obj')
|
|
76
|
+
end
|
|
115
77
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
end
|
|
78
|
+
klass.define_instance_method('puts') do |method|
|
|
79
|
+
method.define_rest_argument('args')
|
|
80
|
+
end
|
|
120
81
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
method.define_optional_argument('limit')
|
|
125
|
-
method.define_optional_argument('options')
|
|
126
|
-
end
|
|
82
|
+
klass.define_instance_method('set_pipe_info') do |method|
|
|
83
|
+
method.define_argument('write')
|
|
84
|
+
end
|
|
127
85
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
method.define_optional_argument('errorables')
|
|
132
|
-
method.define_optional_argument('timeout')
|
|
133
|
-
end
|
|
86
|
+
klass.define_instance_method('syswrite') do |method|
|
|
87
|
+
method.define_argument('data')
|
|
88
|
+
end
|
|
134
89
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
method.define_argument('errorables')
|
|
139
|
-
method.define_argument('timeout')
|
|
140
|
-
end
|
|
90
|
+
klass.define_instance_method('write') do |method|
|
|
91
|
+
method.define_argument('data')
|
|
92
|
+
end
|
|
141
93
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
method.define_optional_argument('mode')
|
|
146
|
-
method.define_optional_argument('sync')
|
|
94
|
+
klass.define_instance_method('write_nonblock') do |method|
|
|
95
|
+
method.define_argument('data')
|
|
96
|
+
end
|
|
147
97
|
end
|
|
148
98
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
method.define_optional_argument('mode')
|
|
152
|
-
method.define_optional_argument('perm')
|
|
153
|
-
end
|
|
99
|
+
defs.define_constant('UDPSocket::CREAT') do |klass|
|
|
100
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
154
101
|
|
|
155
|
-
klass.define_method('try_convert') do |method|
|
|
156
|
-
method.define_argument('obj')
|
|
157
102
|
end
|
|
158
103
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
method.define_rest_argument('args')
|
|
163
|
-
end
|
|
104
|
+
defs.define_constant('UDPSocket::EAGAINWaitReadable') do |klass|
|
|
105
|
+
klass.inherits(defs.constant_proxy('Errno::EAGAIN', RubyLint.registry))
|
|
106
|
+
klass.inherits(defs.constant_proxy('IO::WaitReadable', RubyLint.registry))
|
|
164
107
|
|
|
165
|
-
klass.define_instance_method('<<') do |method|
|
|
166
|
-
method.define_argument('obj')
|
|
167
108
|
end
|
|
168
109
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
110
|
+
defs.define_constant('UDPSocket::EAGAINWaitWritable') do |klass|
|
|
111
|
+
klass.inherits(defs.constant_proxy('Errno::EAGAIN', RubyLint.registry))
|
|
112
|
+
klass.inherits(defs.constant_proxy('IO::WaitWritable', RubyLint.registry))
|
|
172
113
|
|
|
173
|
-
klass.define_instance_method('advise') do |method|
|
|
174
|
-
method.define_argument('advice')
|
|
175
|
-
method.define_optional_argument('offset')
|
|
176
|
-
method.define_optional_argument('len')
|
|
177
114
|
end
|
|
178
115
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
klass.define_instance_method('any?')
|
|
116
|
+
defs.define_constant('UDPSocket::EXCL') do |klass|
|
|
117
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
182
118
|
|
|
183
|
-
klass.define_instance_method('autoclose=') do |method|
|
|
184
|
-
method.define_argument('autoclose')
|
|
185
119
|
end
|
|
186
120
|
|
|
187
|
-
|
|
121
|
+
defs.define_constant('UDPSocket::EachReader') do |klass|
|
|
122
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
188
123
|
|
|
189
|
-
|
|
190
|
-
method.define_argument('host')
|
|
191
|
-
method.define_argument('port')
|
|
192
|
-
end
|
|
124
|
+
klass.define_instance_method('each')
|
|
193
125
|
|
|
194
|
-
|
|
126
|
+
klass.define_instance_method('initialize') do |method|
|
|
127
|
+
method.define_argument('io')
|
|
128
|
+
method.define_argument('buffer')
|
|
129
|
+
method.define_argument('separator')
|
|
130
|
+
method.define_argument('limit')
|
|
195
131
|
|
|
196
|
-
|
|
132
|
+
method.returns { |object| object.instance }
|
|
133
|
+
end
|
|
197
134
|
|
|
198
|
-
|
|
135
|
+
klass.define_instance_method('read_all')
|
|
199
136
|
|
|
200
|
-
|
|
137
|
+
klass.define_instance_method('read_to_limit')
|
|
201
138
|
|
|
202
|
-
|
|
139
|
+
klass.define_instance_method('read_to_separator')
|
|
203
140
|
|
|
204
|
-
|
|
205
|
-
method.define_optional_argument('initial_state')
|
|
141
|
+
klass.define_instance_method('read_to_separator_with_limit')
|
|
206
142
|
end
|
|
207
143
|
|
|
208
|
-
|
|
144
|
+
defs.define_constant('UDPSocket::Enumerator') do |klass|
|
|
145
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
146
|
+
klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
|
|
209
147
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
148
|
+
klass.define_instance_method('each') do |method|
|
|
149
|
+
method.define_rest_argument('args')
|
|
150
|
+
end
|
|
213
151
|
|
|
214
|
-
|
|
152
|
+
klass.define_instance_method('each_with_index')
|
|
215
153
|
|
|
216
|
-
|
|
154
|
+
klass.define_instance_method('initialize') do |method|
|
|
155
|
+
method.define_optional_argument('receiver_or_size')
|
|
156
|
+
method.define_optional_argument('method_name')
|
|
157
|
+
method.define_rest_argument('method_args')
|
|
217
158
|
|
|
218
|
-
|
|
159
|
+
method.returns { |object| object.instance }
|
|
160
|
+
end
|
|
219
161
|
|
|
220
|
-
|
|
162
|
+
klass.define_instance_method('next')
|
|
221
163
|
|
|
222
|
-
|
|
164
|
+
klass.define_instance_method('next_values')
|
|
223
165
|
|
|
224
|
-
|
|
166
|
+
klass.define_instance_method('peek')
|
|
225
167
|
|
|
226
|
-
|
|
168
|
+
klass.define_instance_method('peek_values')
|
|
227
169
|
|
|
228
|
-
|
|
229
|
-
method.define_argument('host')
|
|
230
|
-
method.define_argument('port')
|
|
231
|
-
end
|
|
170
|
+
klass.define_instance_method('rewind')
|
|
232
171
|
|
|
233
|
-
|
|
234
|
-
method.define_optional_argument('item')
|
|
235
|
-
end
|
|
172
|
+
klass.define_instance_method('size')
|
|
236
173
|
|
|
237
|
-
|
|
238
|
-
|
|
174
|
+
klass.define_instance_method('with_index') do |method|
|
|
175
|
+
method.define_optional_argument('offset')
|
|
176
|
+
end
|
|
239
177
|
end
|
|
240
178
|
|
|
241
|
-
|
|
179
|
+
defs.define_constant('UDPSocket::FD_CLOEXEC') do |klass|
|
|
180
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
242
181
|
|
|
243
|
-
klass.define_instance_method('descriptor=')
|
|
244
|
-
|
|
245
|
-
klass.define_instance_method('detect') do |method|
|
|
246
|
-
method.define_optional_argument('ifnone')
|
|
247
182
|
end
|
|
248
183
|
|
|
249
|
-
|
|
184
|
+
defs.define_constant('UDPSocket::FFI') do |klass|
|
|
185
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
250
186
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
187
|
+
klass.define_method('add_typedef') do |method|
|
|
188
|
+
method.define_argument('current')
|
|
189
|
+
method.define_argument('add')
|
|
190
|
+
end
|
|
254
191
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
192
|
+
klass.define_method('config') do |method|
|
|
193
|
+
method.define_argument('name')
|
|
194
|
+
end
|
|
258
195
|
|
|
259
|
-
|
|
196
|
+
klass.define_method('config_hash') do |method|
|
|
197
|
+
method.define_argument('name')
|
|
198
|
+
end
|
|
260
199
|
|
|
261
|
-
|
|
262
|
-
method.define_optional_argument('sep_or_limit')
|
|
263
|
-
method.define_optional_argument('limit')
|
|
264
|
-
end
|
|
200
|
+
klass.define_method('errno')
|
|
265
201
|
|
|
266
|
-
|
|
202
|
+
klass.define_method('find_type') do |method|
|
|
203
|
+
method.define_argument('name')
|
|
204
|
+
end
|
|
267
205
|
|
|
268
|
-
|
|
206
|
+
klass.define_method('generate_function') do |method|
|
|
207
|
+
method.define_argument('ptr')
|
|
208
|
+
method.define_argument('name')
|
|
209
|
+
method.define_argument('args')
|
|
210
|
+
method.define_argument('ret')
|
|
211
|
+
end
|
|
269
212
|
|
|
270
|
-
|
|
213
|
+
klass.define_method('generate_trampoline') do |method|
|
|
214
|
+
method.define_argument('obj')
|
|
215
|
+
method.define_argument('name')
|
|
216
|
+
method.define_argument('args')
|
|
217
|
+
method.define_argument('ret')
|
|
218
|
+
end
|
|
271
219
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
220
|
+
klass.define_method('size_to_type') do |method|
|
|
221
|
+
method.define_argument('size')
|
|
222
|
+
end
|
|
275
223
|
|
|
276
|
-
|
|
277
|
-
|
|
224
|
+
klass.define_method('type_size') do |method|
|
|
225
|
+
method.define_argument('type')
|
|
226
|
+
end
|
|
278
227
|
end
|
|
279
228
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
method.define_optional_argument('limit')
|
|
283
|
-
end
|
|
229
|
+
defs.define_constant('UDPSocket::FNM_CASEFOLD') do |klass|
|
|
230
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
284
231
|
|
|
285
|
-
klass.define_instance_method('each_slice') do |method|
|
|
286
|
-
method.define_argument('slice_size')
|
|
287
232
|
end
|
|
288
233
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
end
|
|
234
|
+
defs.define_constant('UDPSocket::FNM_DOTMATCH') do |klass|
|
|
235
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
292
236
|
|
|
293
|
-
klass.define_instance_method('each_with_object') do |method|
|
|
294
|
-
method.define_argument('memo')
|
|
295
237
|
end
|
|
296
238
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
klass.define_instance_method('ensure_open_and_readable')
|
|
300
|
-
|
|
301
|
-
klass.define_instance_method('ensure_open_and_writable')
|
|
239
|
+
defs.define_constant('UDPSocket::FNM_NOESCAPE') do |klass|
|
|
240
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
302
241
|
|
|
303
|
-
klass.define_instance_method('entries') do |method|
|
|
304
|
-
method.define_rest_argument('arg')
|
|
305
242
|
end
|
|
306
243
|
|
|
307
|
-
|
|
244
|
+
defs.define_constant('UDPSocket::FNM_PATHNAME') do |klass|
|
|
245
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
308
246
|
|
|
309
|
-
klass.define_instance_method('eof!')
|
|
310
|
-
|
|
311
|
-
klass.define_instance_method('eof?')
|
|
312
|
-
|
|
313
|
-
klass.define_instance_method('expect') do |method|
|
|
314
|
-
method.define_argument('pat')
|
|
315
|
-
method.define_optional_argument('timeout')
|
|
316
247
|
end
|
|
317
248
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
klass.define_instance_method('external=')
|
|
249
|
+
defs.define_constant('UDPSocket::FNM_SYSCASE') do |klass|
|
|
250
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
321
251
|
|
|
322
|
-
klass.define_instance_method('external_encoding')
|
|
323
|
-
|
|
324
|
-
klass.define_instance_method('fcntl') do |method|
|
|
325
|
-
method.define_argument('command')
|
|
326
|
-
method.define_optional_argument('arg')
|
|
327
252
|
end
|
|
328
253
|
|
|
329
|
-
|
|
254
|
+
defs.define_constant('UDPSocket::F_GETFD') do |klass|
|
|
255
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
330
256
|
|
|
331
|
-
klass.define_instance_method('find') do |method|
|
|
332
|
-
method.define_optional_argument('ifnone')
|
|
333
257
|
end
|
|
334
258
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
klass.define_instance_method('find_index') do |method|
|
|
338
|
-
method.define_optional_argument('value')
|
|
339
|
-
end
|
|
259
|
+
defs.define_constant('UDPSocket::F_GETFL') do |klass|
|
|
260
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
340
261
|
|
|
341
|
-
klass.define_instance_method('first') do |method|
|
|
342
|
-
method.define_optional_argument('n')
|
|
343
262
|
end
|
|
344
263
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
klass.define_instance_method('flush')
|
|
348
|
-
|
|
349
|
-
klass.define_instance_method('from_descriptor') do |method|
|
|
350
|
-
method.define_argument('fixnum')
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
klass.define_instance_method('fsync')
|
|
354
|
-
|
|
355
|
-
klass.define_instance_method('getbyte')
|
|
264
|
+
defs.define_constant('UDPSocket::F_OK') do |klass|
|
|
265
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
356
266
|
|
|
357
|
-
klass.define_instance_method('getc')
|
|
358
|
-
|
|
359
|
-
klass.define_instance_method('getpeername')
|
|
360
|
-
|
|
361
|
-
klass.define_instance_method('gets') do |method|
|
|
362
|
-
method.define_optional_argument('sep_or_limit')
|
|
363
|
-
method.define_optional_argument('limit')
|
|
364
267
|
end
|
|
365
268
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
klass.define_instance_method('getsockopt') do |method|
|
|
369
|
-
method.define_argument('level')
|
|
370
|
-
method.define_argument('optname')
|
|
371
|
-
end
|
|
269
|
+
defs.define_constant('UDPSocket::F_SETFD') do |klass|
|
|
270
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
372
271
|
|
|
373
|
-
klass.define_instance_method('grep') do |method|
|
|
374
|
-
method.define_argument('pattern')
|
|
375
272
|
end
|
|
376
273
|
|
|
377
|
-
|
|
274
|
+
defs.define_constant('UDPSocket::F_SETFL') do |klass|
|
|
275
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
378
276
|
|
|
379
|
-
klass.define_instance_method('include?') do |method|
|
|
380
|
-
method.define_argument('obj')
|
|
381
277
|
end
|
|
382
278
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
klass.define_instance_method('initialize') do |method|
|
|
386
|
-
method.define_optional_argument('socktype')
|
|
387
|
-
end
|
|
279
|
+
defs.define_constant('UDPSocket::InternalBuffer') do |klass|
|
|
280
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
388
281
|
|
|
389
|
-
|
|
390
|
-
method.define_optional_argument('initial')
|
|
391
|
-
method.define_optional_argument('sym')
|
|
392
|
-
end
|
|
282
|
+
klass.define_method('allocate')
|
|
393
283
|
|
|
394
|
-
|
|
284
|
+
klass.define_instance_method('channel')
|
|
395
285
|
|
|
396
|
-
|
|
286
|
+
klass.define_instance_method('discard') do |method|
|
|
287
|
+
method.define_argument('skip')
|
|
288
|
+
end
|
|
397
289
|
|
|
398
|
-
|
|
290
|
+
klass.define_instance_method('empty?')
|
|
399
291
|
|
|
400
|
-
|
|
292
|
+
klass.define_instance_method('empty_to') do |method|
|
|
293
|
+
method.define_argument('io')
|
|
294
|
+
end
|
|
401
295
|
|
|
402
|
-
|
|
403
|
-
method.define_argument('command')
|
|
404
|
-
method.define_optional_argument('arg')
|
|
405
|
-
end
|
|
296
|
+
klass.define_instance_method('exhausted?')
|
|
406
297
|
|
|
407
|
-
|
|
298
|
+
klass.define_instance_method('fill') do |method|
|
|
299
|
+
method.define_argument('io')
|
|
300
|
+
end
|
|
408
301
|
|
|
409
|
-
|
|
302
|
+
klass.define_instance_method('fill_from') do |method|
|
|
303
|
+
method.define_argument('io')
|
|
304
|
+
method.define_optional_argument('skip')
|
|
305
|
+
end
|
|
410
306
|
|
|
411
|
-
|
|
307
|
+
klass.define_instance_method('find') do |method|
|
|
308
|
+
method.define_argument('pattern')
|
|
309
|
+
method.define_optional_argument('discard')
|
|
310
|
+
end
|
|
412
311
|
|
|
413
|
-
|
|
414
|
-
method.define_argument('line_number')
|
|
415
|
-
end
|
|
312
|
+
klass.define_instance_method('full?')
|
|
416
313
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
314
|
+
klass.define_instance_method('getbyte') do |method|
|
|
315
|
+
method.define_argument('io')
|
|
316
|
+
end
|
|
420
317
|
|
|
421
|
-
|
|
318
|
+
klass.define_instance_method('getchar') do |method|
|
|
319
|
+
method.define_argument('io')
|
|
320
|
+
end
|
|
422
321
|
|
|
423
|
-
|
|
322
|
+
klass.define_instance_method('inspect')
|
|
424
323
|
|
|
425
|
-
|
|
324
|
+
klass.define_instance_method('put_back') do |method|
|
|
325
|
+
method.define_argument('chr')
|
|
326
|
+
end
|
|
426
327
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
328
|
+
klass.define_instance_method('read_to_char_boundary') do |method|
|
|
329
|
+
method.define_argument('io')
|
|
330
|
+
method.define_argument('str')
|
|
331
|
+
end
|
|
430
332
|
|
|
431
|
-
|
|
333
|
+
klass.define_instance_method('reset!')
|
|
432
334
|
|
|
433
|
-
|
|
335
|
+
klass.define_instance_method('shift') do |method|
|
|
336
|
+
method.define_optional_argument('count')
|
|
337
|
+
end
|
|
434
338
|
|
|
435
|
-
|
|
339
|
+
klass.define_instance_method('size')
|
|
436
340
|
|
|
437
|
-
|
|
341
|
+
klass.define_instance_method('start')
|
|
438
342
|
|
|
439
|
-
|
|
343
|
+
klass.define_instance_method('total')
|
|
440
344
|
|
|
441
|
-
|
|
345
|
+
klass.define_instance_method('unseek!') do |method|
|
|
346
|
+
method.define_argument('io')
|
|
347
|
+
end
|
|
442
348
|
|
|
443
|
-
|
|
349
|
+
klass.define_instance_method('unshift') do |method|
|
|
350
|
+
method.define_argument('str')
|
|
351
|
+
method.define_argument('start_pos')
|
|
352
|
+
end
|
|
444
353
|
|
|
445
|
-
|
|
354
|
+
klass.define_instance_method('unused')
|
|
446
355
|
|
|
447
|
-
|
|
356
|
+
klass.define_instance_method('used')
|
|
448
357
|
|
|
449
|
-
|
|
450
|
-
method.define_optional_argument('reverse_lookup')
|
|
358
|
+
klass.define_instance_method('write_synced?')
|
|
451
359
|
end
|
|
452
360
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
klass.define_instance_method('pid=')
|
|
361
|
+
defs.define_constant('UDPSocket::LOCK_EX') do |klass|
|
|
362
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
456
363
|
|
|
457
|
-
klass.define_instance_method('pipe=') do |method|
|
|
458
|
-
method.define_argument('v')
|
|
459
364
|
end
|
|
460
365
|
|
|
461
|
-
|
|
366
|
+
defs.define_constant('UDPSocket::LOCK_NB') do |klass|
|
|
367
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
462
368
|
|
|
463
|
-
klass.define_instance_method('pos')
|
|
464
|
-
|
|
465
|
-
klass.define_instance_method('pos=') do |method|
|
|
466
|
-
method.define_argument('offset')
|
|
467
369
|
end
|
|
468
370
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
klass.define_instance_method('prim_ftruncate') do |method|
|
|
472
|
-
method.define_argument('offset')
|
|
473
|
-
end
|
|
371
|
+
defs.define_constant('UDPSocket::LOCK_SH') do |klass|
|
|
372
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
474
373
|
|
|
475
|
-
klass.define_instance_method('prim_seek') do |method|
|
|
476
|
-
method.define_argument('amount')
|
|
477
|
-
method.define_argument('whence')
|
|
478
374
|
end
|
|
479
375
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
end
|
|
376
|
+
defs.define_constant('UDPSocket::LOCK_UN') do |klass|
|
|
377
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
483
378
|
|
|
484
|
-
klass.define_instance_method('print') do |method|
|
|
485
|
-
method.define_rest_argument('args')
|
|
486
379
|
end
|
|
487
380
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
method.define_rest_argument('args')
|
|
491
|
-
end
|
|
381
|
+
defs.define_constant('UDPSocket::NOCTTY') do |klass|
|
|
382
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
492
383
|
|
|
493
|
-
klass.define_instance_method('putc') do |method|
|
|
494
|
-
method.define_argument('obj')
|
|
495
384
|
end
|
|
496
385
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
end
|
|
386
|
+
defs.define_constant('UDPSocket::NONBLOCK') do |klass|
|
|
387
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
500
388
|
|
|
501
|
-
klass.define_instance_method('query') do |method|
|
|
502
|
-
method.define_argument('which')
|
|
503
389
|
end
|
|
504
390
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
end
|
|
391
|
+
defs.define_constant('UDPSocket::NULL') do |klass|
|
|
392
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
508
393
|
|
|
509
|
-
klass.define_instance_method('read') do |method|
|
|
510
|
-
method.define_optional_argument('length')
|
|
511
|
-
method.define_optional_argument('buffer')
|
|
512
394
|
end
|
|
513
395
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
klass.define_instance_method('read_nonblock') do |method|
|
|
517
|
-
method.define_argument('size')
|
|
518
|
-
method.define_optional_argument('buffer')
|
|
519
|
-
end
|
|
396
|
+
defs.define_constant('UDPSocket::RDONLY') do |klass|
|
|
397
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
520
398
|
|
|
521
|
-
klass.define_instance_method('read_primitive') do |method|
|
|
522
|
-
method.define_argument('number_of_bytes')
|
|
523
399
|
end
|
|
524
400
|
|
|
525
|
-
|
|
401
|
+
defs.define_constant('UDPSocket::RDWR') do |klass|
|
|
402
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
526
403
|
|
|
527
|
-
klass.define_instance_method('readchar')
|
|
528
|
-
|
|
529
|
-
klass.define_instance_method('readline') do |method|
|
|
530
|
-
method.define_optional_argument('sep')
|
|
531
404
|
end
|
|
532
405
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
end
|
|
406
|
+
defs.define_constant('UDPSocket::R_OK') do |klass|
|
|
407
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
536
408
|
|
|
537
|
-
klass.define_instance_method('readpartial') do |method|
|
|
538
|
-
method.define_argument('size')
|
|
539
|
-
method.define_optional_argument('buffer')
|
|
540
409
|
end
|
|
541
410
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
method.define_optional_argument('flags')
|
|
545
|
-
end
|
|
411
|
+
defs.define_constant('UDPSocket::Readable') do |klass|
|
|
412
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
546
413
|
|
|
547
|
-
klass.define_instance_method('recv_nonblock') do |method|
|
|
548
|
-
method.define_argument('bytes_to_read')
|
|
549
|
-
method.define_optional_argument('flags')
|
|
550
414
|
end
|
|
551
415
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
method.define_optional_argument('flags')
|
|
555
|
-
end
|
|
556
|
-
|
|
557
|
-
klass.define_instance_method('recvfrom_nonblock') do |method|
|
|
558
|
-
method.define_argument('maxlen')
|
|
559
|
-
method.define_optional_argument('flags')
|
|
560
|
-
end
|
|
416
|
+
defs.define_constant('UDPSocket::SEEK_CUR') do |klass|
|
|
417
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
561
418
|
|
|
562
|
-
klass.define_instance_method('reduce') do |method|
|
|
563
|
-
method.define_optional_argument('initial')
|
|
564
|
-
method.define_optional_argument('sym')
|
|
565
419
|
end
|
|
566
420
|
|
|
567
|
-
|
|
421
|
+
defs.define_constant('UDPSocket::SEEK_END') do |klass|
|
|
422
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
568
423
|
|
|
569
|
-
klass.define_instance_method('reopen') do |method|
|
|
570
|
-
method.define_argument('other')
|
|
571
|
-
method.define_optional_argument('mode')
|
|
572
424
|
end
|
|
573
425
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
end
|
|
426
|
+
defs.define_constant('UDPSocket::SEEK_SET') do |klass|
|
|
427
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
577
428
|
|
|
578
|
-
klass.define_instance_method('reopen_path') do |method|
|
|
579
|
-
method.define_argument('string')
|
|
580
|
-
method.define_argument('mode')
|
|
581
429
|
end
|
|
582
430
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
klass.define_instance_method('reverse_each')
|
|
586
|
-
|
|
587
|
-
klass.define_instance_method('rewind')
|
|
431
|
+
defs.define_constant('UDPSocket::SYNC') do |klass|
|
|
432
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
588
433
|
|
|
589
|
-
klass.define_instance_method('scanf') do |method|
|
|
590
|
-
method.define_argument('str')
|
|
591
|
-
method.define_block_argument('b')
|
|
592
434
|
end
|
|
593
435
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
method.define_optional_argument('whence')
|
|
597
|
-
end
|
|
598
|
-
|
|
599
|
-
klass.define_instance_method('select')
|
|
436
|
+
defs.define_constant('UDPSocket::Socketable') do |klass|
|
|
437
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
600
438
|
|
|
601
|
-
|
|
602
|
-
method.define_argument('message')
|
|
603
|
-
method.define_argument('flags')
|
|
604
|
-
method.define_rest_argument('to')
|
|
439
|
+
klass.define_instance_method('accept')
|
|
605
440
|
end
|
|
606
441
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
method.define_optional_argument('internal')
|
|
610
|
-
method.define_optional_argument('options')
|
|
611
|
-
end
|
|
442
|
+
defs.define_constant('UDPSocket::SortedElement') do |klass|
|
|
443
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
612
444
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
method.define_optional_argument('optval')
|
|
617
|
-
end
|
|
445
|
+
klass.define_instance_method('<=>') do |method|
|
|
446
|
+
method.define_argument('other')
|
|
447
|
+
end
|
|
618
448
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
449
|
+
klass.define_instance_method('initialize') do |method|
|
|
450
|
+
method.define_argument('val')
|
|
451
|
+
method.define_argument('sort_id')
|
|
622
452
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
end
|
|
453
|
+
method.returns { |object| object.instance }
|
|
454
|
+
end
|
|
626
455
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
method.define_argument('type')
|
|
456
|
+
klass.define_instance_method('sort_id')
|
|
457
|
+
|
|
458
|
+
klass.define_instance_method('value')
|
|
631
459
|
end
|
|
632
460
|
|
|
633
|
-
|
|
461
|
+
defs.define_constant('UDPSocket::StreamCopier') do |klass|
|
|
462
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
634
463
|
|
|
635
|
-
|
|
464
|
+
klass.define_instance_method('initialize') do |method|
|
|
465
|
+
method.define_argument('from')
|
|
466
|
+
method.define_argument('to')
|
|
467
|
+
method.define_argument('length')
|
|
468
|
+
method.define_argument('offset')
|
|
636
469
|
|
|
637
|
-
|
|
470
|
+
method.returns { |object| object.instance }
|
|
471
|
+
end
|
|
638
472
|
|
|
639
|
-
|
|
473
|
+
klass.define_instance_method('read_method') do |method|
|
|
474
|
+
method.define_argument('obj')
|
|
475
|
+
end
|
|
640
476
|
|
|
641
|
-
|
|
477
|
+
klass.define_instance_method('run')
|
|
642
478
|
|
|
643
|
-
|
|
644
|
-
|
|
479
|
+
klass.define_instance_method('to_io') do |method|
|
|
480
|
+
method.define_argument('obj')
|
|
481
|
+
method.define_argument('mode')
|
|
482
|
+
end
|
|
645
483
|
end
|
|
646
484
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
method.define_optional_argument('buffer')
|
|
650
|
-
end
|
|
485
|
+
defs.define_constant('UDPSocket::TRUNC') do |klass|
|
|
486
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
651
487
|
|
|
652
|
-
klass.define_instance_method('sysseek') do |method|
|
|
653
|
-
method.define_argument('amount')
|
|
654
|
-
method.define_optional_argument('whence')
|
|
655
488
|
end
|
|
656
489
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
end
|
|
490
|
+
defs.define_constant('UDPSocket::TransferIO') do |klass|
|
|
491
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
660
492
|
|
|
661
|
-
|
|
662
|
-
method.define_argument('n')
|
|
663
|
-
end
|
|
493
|
+
klass.define_instance_method('recv_fd')
|
|
664
494
|
|
|
665
|
-
|
|
495
|
+
klass.define_instance_method('send_io')
|
|
496
|
+
end
|
|
666
497
|
|
|
667
|
-
|
|
498
|
+
defs.define_constant('UDPSocket::WRONLY') do |klass|
|
|
499
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
668
500
|
|
|
669
|
-
klass.define_instance_method('to_a') do |method|
|
|
670
|
-
method.define_rest_argument('arg')
|
|
671
501
|
end
|
|
672
502
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
klass.define_instance_method('to_io')
|
|
503
|
+
defs.define_constant('UDPSocket::W_OK') do |klass|
|
|
504
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
676
505
|
|
|
677
|
-
klass.define_instance_method('to_set') do |method|
|
|
678
|
-
method.define_optional_argument('klass')
|
|
679
|
-
method.define_rest_argument('args')
|
|
680
|
-
method.define_block_argument('block')
|
|
681
506
|
end
|
|
682
507
|
|
|
683
|
-
|
|
508
|
+
defs.define_constant('UDPSocket::WaitReadable') do |klass|
|
|
509
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
684
510
|
|
|
685
|
-
klass.define_instance_method('ttyname')
|
|
686
|
-
|
|
687
|
-
klass.define_instance_method('ungetbyte') do |method|
|
|
688
|
-
method.define_argument('obj')
|
|
689
511
|
end
|
|
690
512
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
end
|
|
513
|
+
defs.define_constant('UDPSocket::WaitWritable') do |klass|
|
|
514
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
694
515
|
|
|
695
|
-
klass.define_instance_method('with_object') do |method|
|
|
696
|
-
method.define_argument('memo')
|
|
697
516
|
end
|
|
698
517
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
end
|
|
518
|
+
defs.define_constant('UDPSocket::Writable') do |klass|
|
|
519
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
702
520
|
|
|
703
|
-
klass.define_instance_method('write_nonblock') do |method|
|
|
704
|
-
method.define_argument('data')
|
|
705
521
|
end
|
|
706
522
|
|
|
707
|
-
|
|
708
|
-
|
|
523
|
+
defs.define_constant('UDPSocket::X_OK') do |klass|
|
|
524
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
|
525
|
+
|
|
709
526
|
end
|
|
710
527
|
end
|
|
711
|
-
|
|
712
|
-
RubyLint::GlobalScope.definitions.lookup(:const, 'UDPSocket').deep_freeze
|