ruby-lint 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -68,6 +68,10 @@ module RubyLint
|
|
68
68
|
# @!attribute [r] file
|
69
69
|
# @return [String] The file path of the definition.
|
70
70
|
#
|
71
|
+
# @!attribute [r] inherit_self
|
72
|
+
# @return [TrueClass|FalseClass] When set to `false` child definitions
|
73
|
+
# created using `define_constant` do not inherit the current definition.
|
74
|
+
#
|
71
75
|
class RubyObject
|
72
76
|
include VariablePredicates
|
73
77
|
|
@@ -119,6 +123,7 @@ module RubyLint
|
|
119
123
|
:column,
|
120
124
|
:definitions,
|
121
125
|
:file,
|
126
|
+
:inherit_self,
|
122
127
|
:line,
|
123
128
|
:members_as_value,
|
124
129
|
:name,
|
@@ -146,6 +151,8 @@ module RubyLint
|
|
146
151
|
# @yieldparam [RubyLint::Definition::RubyObject]
|
147
152
|
#
|
148
153
|
def initialize(options = {})
|
154
|
+
@inherit_self = true
|
155
|
+
|
149
156
|
options.each do |key, value|
|
150
157
|
instance_variable_set("@#{key}", value)
|
151
158
|
end
|
@@ -163,26 +170,6 @@ module RubyLint
|
|
163
170
|
yield self if block_given?
|
164
171
|
end
|
165
172
|
|
166
|
-
##
|
167
|
-
# Freezes the definition and all child definitions.
|
168
|
-
#
|
169
|
-
def deep_freeze
|
170
|
-
@definitions.each do |type, collection|
|
171
|
-
collection.each do |name, object|
|
172
|
-
if object != self and !object.frozen?
|
173
|
-
object.deep_freeze
|
174
|
-
end
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
@definitions.freeze
|
179
|
-
@parents.freeze
|
180
|
-
@update_parents.freeze
|
181
|
-
@value.freeze
|
182
|
-
|
183
|
-
freeze
|
184
|
-
end
|
185
|
-
|
186
173
|
##
|
187
174
|
# Returns the value of the definition. If `members_as_value` is set to
|
188
175
|
# `true` the return value is a Hash containing the names and values of
|
@@ -363,7 +350,7 @@ module RubyLint
|
|
363
350
|
#
|
364
351
|
def call(context = self)
|
365
352
|
retval = respond_to?(:return_value) ? return_value : nil
|
366
|
-
retval = retval.call(context) if retval.
|
353
|
+
retval = retval.call(context) if retval.is_a?(Proc)
|
367
354
|
|
368
355
|
return retval
|
369
356
|
end
|
@@ -483,7 +470,9 @@ module RubyLint
|
|
483
470
|
return unless source.definitions.key?(source_type)
|
484
471
|
|
485
472
|
source.list(source_type).each do |definition|
|
486
|
-
|
473
|
+
unless defines?(target_type, definition.name)
|
474
|
+
add(target_type, definition.name, definition)
|
475
|
+
end
|
487
476
|
end
|
488
477
|
end
|
489
478
|
|
@@ -495,10 +484,21 @@ module RubyLint
|
|
495
484
|
# @return [RubyLint::Definition::RubyObject]
|
496
485
|
#
|
497
486
|
def instance(options = {})
|
487
|
+
return shim(:instance_type => :instance)
|
488
|
+
end
|
489
|
+
|
490
|
+
##
|
491
|
+
# Creates a new definition that inherits from the current one, acting as
|
492
|
+
# sort of a shim around the original one.
|
493
|
+
#
|
494
|
+
# @param [Hash] options Attributes to set in the new definition.
|
495
|
+
# @return [RubyLint::Definition::RubyObject]
|
496
|
+
#
|
497
|
+
def shim(options = {})
|
498
498
|
options = {
|
499
499
|
:name => name,
|
500
500
|
:type => type,
|
501
|
-
:instance_type =>
|
501
|
+
:instance_type => instance_type,
|
502
502
|
:value => value,
|
503
503
|
:parents => [self]
|
504
504
|
}.merge(options)
|
@@ -608,6 +608,14 @@ module RubyLint
|
|
608
608
|
self.parents.concat(definitions)
|
609
609
|
end
|
610
610
|
|
611
|
+
##
|
612
|
+
# @see {RubyLint::Definition::ConstantProxy#initialize}
|
613
|
+
# @return [RubyLint::Definition::ConstantProxy]
|
614
|
+
#
|
615
|
+
def constant_proxy(name, registry = nil)
|
616
|
+
return ConstantProxy.new(self, name, registry)
|
617
|
+
end
|
618
|
+
|
611
619
|
##
|
612
620
|
# Defines `self` on the current definition as both a class and instance
|
613
621
|
# method.
|
@@ -694,7 +702,7 @@ module RubyLint
|
|
694
702
|
:name => name,
|
695
703
|
:type => type,
|
696
704
|
:value => value,
|
697
|
-
:parents => [self],
|
705
|
+
:parents => inherit_self ? [self] : nil,
|
698
706
|
&block
|
699
707
|
)
|
700
708
|
|
@@ -6,25 +6,22 @@ module RubyLint
|
|
6
6
|
#
|
7
7
|
# @!attribute [r] node
|
8
8
|
# @return [RubyLint::AST::Node]
|
9
|
-
#
|
10
|
-
#
|
9
|
+
#
|
10
|
+
# @!attribute [r] vm
|
11
|
+
# @return [RubyLint::VirtualMachine]
|
11
12
|
#
|
12
13
|
class Base
|
13
|
-
attr_reader :
|
14
|
-
|
15
|
-
# Ensures compatibility with code that relies on either one of these
|
16
|
-
# methods. They are the same for definition builders anyway.
|
17
|
-
alias_method :current_scope, :definitions
|
14
|
+
attr_reader :vm, :node, :options
|
18
15
|
|
19
16
|
##
|
20
17
|
# @param [RubyLint::AST::Node] node
|
21
|
-
# @param [RubyLint::
|
18
|
+
# @param [RubyLint::VirtualMachine] vm
|
22
19
|
# @param [Hash] options
|
23
20
|
#
|
24
|
-
def initialize(node,
|
25
|
-
@node
|
26
|
-
@
|
27
|
-
@options
|
21
|
+
def initialize(node, vm, options = {})
|
22
|
+
@node = node
|
23
|
+
@vm = vm
|
24
|
+
@options = options
|
28
25
|
|
29
26
|
after_initialize if respond_to?(:after_initialize)
|
30
27
|
end
|
@@ -8,9 +8,9 @@ module RubyLint
|
|
8
8
|
# @return [RubyLint::Definition::RubyObject]
|
9
9
|
#
|
10
10
|
def build
|
11
|
-
definition = new_definition([
|
11
|
+
definition = new_definition([vm.current_scope])
|
12
12
|
|
13
|
-
|
13
|
+
vm.current_scope.list(:lvar).each do |variable|
|
14
14
|
definition.add_definition(variable)
|
15
15
|
end
|
16
16
|
|
@@ -26,7 +26,7 @@ module RubyLint
|
|
26
26
|
:name => 'block',
|
27
27
|
:type => :block,
|
28
28
|
:parents => parents,
|
29
|
-
:instance_type => current_scope.instance_type,
|
29
|
+
:instance_type => vm.current_scope.instance_type,
|
30
30
|
:update_parents => [:lvar, :ivar, :cvar, :gvar]
|
31
31
|
)
|
32
32
|
end
|
@@ -8,7 +8,7 @@ module RubyLint
|
|
8
8
|
# Called after creating a new instance of the class.
|
9
9
|
#
|
10
10
|
def after_initialize
|
11
|
-
options[:parent] ||=
|
11
|
+
options[:parent] ||= vm.global_constant('Object')
|
12
12
|
end
|
13
13
|
|
14
14
|
##
|
@@ -17,7 +17,7 @@ module RubyLint
|
|
17
17
|
# @see RubyLint::DefinitionBuilder::RubyModule#build
|
18
18
|
#
|
19
19
|
def build
|
20
|
-
return new_definition([options[:parent],
|
20
|
+
return new_definition([options[:parent], vm.current_scope])
|
21
21
|
end
|
22
22
|
end # RubyClass
|
23
23
|
end # DefinitionBuilder
|
@@ -11,9 +11,9 @@ module RubyLint
|
|
11
11
|
# @see #new_definition
|
12
12
|
#
|
13
13
|
def build
|
14
|
-
mod =
|
14
|
+
mod = vm.global_constant('Module')
|
15
15
|
|
16
|
-
return new_definition([mod,
|
16
|
+
return new_definition([mod, vm.current_scope])
|
17
17
|
end
|
18
18
|
|
19
19
|
##
|
@@ -22,13 +22,13 @@ module RubyLint
|
|
22
22
|
# @return [RubyLint::Definition::RubyObject]
|
23
23
|
#
|
24
24
|
def scope
|
25
|
-
scope =
|
25
|
+
scope = vm.current_scope
|
26
26
|
name_prefix = node.children[0].children[0]
|
27
27
|
|
28
28
|
# name_prefix contains the constant path leading up to the name. For
|
29
29
|
# example, if the name is `A::B::C` this node would contain `A::B`.
|
30
30
|
if name_prefix
|
31
|
-
found = ConstantPath.new(name_prefix).resolve(current_scope)
|
31
|
+
found = ConstantPath.new(name_prefix).resolve(vm.current_scope)
|
32
32
|
scope = found if found
|
33
33
|
end
|
34
34
|
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'erb'
|
2
|
+
|
3
|
+
require_relative 'inspector'
|
2
4
|
require_relative 'template/scope'
|
3
5
|
require_relative 'generated_constant'
|
4
6
|
|
@@ -48,7 +50,12 @@ module RubyLint
|
|
48
50
|
# Generates the definitions for every constant.
|
49
51
|
#
|
50
52
|
def generate
|
51
|
-
constants = inspector.inspect_constants
|
53
|
+
constants = inspector.inspect_constants(
|
54
|
+
inspector.constant,
|
55
|
+
options[:ignore].dup
|
56
|
+
)
|
57
|
+
|
58
|
+
constants = constants.sort
|
52
59
|
|
53
60
|
group_constants(constants).each do |root, names|
|
54
61
|
filepath = File.join(directory, "#{root.snake_case}.rb")
|
@@ -71,7 +78,10 @@ module RubyLint
|
|
71
78
|
:name => current_inspector.constant_name,
|
72
79
|
:constant => current_inspector.constant,
|
73
80
|
:methods => method_information(inspected_methods),
|
74
|
-
:superclass => superclass
|
81
|
+
:superclass => superclass,
|
82
|
+
|
83
|
+
# Kernel is ignored since its included already in core/object.rb
|
84
|
+
:modules => current_inspector.inspect_modules - [Kernel]
|
75
85
|
)
|
76
86
|
|
77
87
|
constants << constant
|
@@ -1,18 +1,15 @@
|
|
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('Abbrev') do |defs|
|
7
|
+
defs.define_constant('Abbrev') do |klass|
|
8
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
klass.define_method('abbrev') do |method|
|
11
|
+
method.define_argument('words')
|
12
|
+
method.define_optional_argument('pattern')
|
13
|
+
end
|
13
14
|
end
|
14
|
-
|
15
|
-
klass.define_method('initialize')
|
16
15
|
end
|
17
|
-
|
18
|
-
RubyLint::GlobalScope.definitions.lookup(:const, 'Abbrev').deep_freeze
|
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# Created: 2013-04-01 18:33:52 +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
|
-
|
4
|
+
# Platform: rbx 2.2.3.n364
|
5
|
+
|
6
|
+
RubyLint.registry.register('ARGF') do |defs|
|
7
|
+
defs.define_constant('ARGF') do |klass|
|
8
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
8
9
|
|
9
|
-
|
10
|
+
end
|
11
|
+
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# Created: 2013-04-01 18:33:52 +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
|
-
klass.inherits(RubyLint::GlobalScope.constant_proxy('StandardError'))
|
4
|
+
# Platform: rbx 2.2.3.n364
|
8
5
|
|
9
|
-
|
6
|
+
RubyLint.registry.register('ArgumentError') do |defs|
|
7
|
+
defs.define_constant('ArgumentError') do |klass|
|
8
|
+
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
|
10
9
|
|
11
|
-
|
10
|
+
klass.define_instance_method('to_s')
|
11
|
+
end
|
12
12
|
end
|
13
|
-
|
14
|
-
RubyLint::GlobalScope.definitions.lookup(:const, 'ArgumentError').deep_freeze
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# Created: 2013-04-01 18:33:52 +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
|
-
klass.inherits(RubyLint::GlobalScope.constant_proxy('Array'))
|
8
|
-
klass.instance!
|
9
|
-
end
|
4
|
+
# Platform: rbx 2.2.2
|
10
5
|
|
11
|
-
RubyLint
|
6
|
+
RubyLint.registry.register('ARGV') do |defs|
|
7
|
+
defs.define_constant('ARGV') do |klass|
|
8
|
+
klass.inherits(defs.constant_proxy('Array', RubyLint.registry))
|
9
|
+
klass.instance!
|
10
|
+
end
|
11
|
+
end
|
@@ -1,673 +1,435 @@
|
|
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.2.1
|
4
|
+
# Platform: rbx 2.2.3.n364
|
6
5
|
|
7
|
-
RubyLint
|
8
|
-
|
6
|
+
RubyLint.registry.register('Array') do |defs|
|
7
|
+
defs.define_constant('Array') do |klass|
|
8
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
9
|
+
klass.inherits(defs.constant_proxy('JSON::Ext::Generator::GeneratorMethods::Array', RubyLint.registry))
|
10
|
+
klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
klass.define_method('allocate')
|
15
|
-
|
16
|
-
klass.define_method('try_convert') do |method|
|
17
|
-
method.define_argument('obj')
|
18
|
-
end
|
19
|
-
|
20
|
-
klass.define_method('yaml_tag_subclasses?')
|
21
|
-
|
22
|
-
klass.define_instance_method('&') do |method|
|
23
|
-
method.define_argument('other')
|
24
|
-
end
|
25
|
-
|
26
|
-
klass.define_instance_method('*') do |method|
|
27
|
-
method.define_argument('multiplier')
|
28
|
-
end
|
29
|
-
|
30
|
-
klass.define_instance_method('+') do |method|
|
31
|
-
method.define_argument('other')
|
32
|
-
end
|
33
|
-
|
34
|
-
klass.define_instance_method('-') do |method|
|
35
|
-
method.define_argument('other')
|
36
|
-
end
|
37
|
-
|
38
|
-
klass.define_instance_method('<<') do |method|
|
39
|
-
method.define_argument('obj')
|
40
|
-
end
|
41
|
-
|
42
|
-
klass.define_instance_method('<=>') do |method|
|
43
|
-
method.define_argument('other')
|
44
|
-
end
|
45
|
-
|
46
|
-
klass.define_instance_method('==') do |method|
|
47
|
-
method.define_argument('other')
|
48
|
-
end
|
49
|
-
|
50
|
-
klass.define_instance_method('[]') do |method|
|
51
|
-
method.define_argument('arg1')
|
52
|
-
method.define_optional_argument('arg2')
|
53
|
-
end
|
54
|
-
|
55
|
-
klass.define_instance_method('[]=') do |method|
|
56
|
-
method.define_argument('index')
|
57
|
-
method.define_argument('ent')
|
58
|
-
method.define_optional_argument('fin')
|
59
|
-
end
|
60
|
-
|
61
|
-
klass.define_instance_method('__append__') do |method|
|
62
|
-
method.define_argument('obj')
|
63
|
-
end
|
64
|
-
|
65
|
-
klass.define_instance_method('__marshal__') do |method|
|
66
|
-
method.define_argument('ms')
|
67
|
-
end
|
68
|
-
|
69
|
-
klass.define_instance_method('__rescue_match__') do |method|
|
70
|
-
method.define_argument('exception')
|
71
|
-
end
|
72
|
-
|
73
|
-
klass.define_instance_method('all?')
|
74
|
-
|
75
|
-
klass.define_instance_method('any?')
|
76
|
-
|
77
|
-
klass.define_instance_method('assoc') do |method|
|
78
|
-
method.define_argument('obj')
|
79
|
-
end
|
80
|
-
|
81
|
-
klass.define_instance_method('at') do |method|
|
82
|
-
method.define_argument('idx')
|
83
|
-
end
|
84
|
-
|
85
|
-
klass.define_instance_method('chunk') do |method|
|
86
|
-
method.define_optional_argument('initial_state')
|
87
|
-
end
|
88
|
-
|
89
|
-
klass.define_instance_method('clear')
|
90
|
-
|
91
|
-
klass.define_instance_method('collect')
|
92
|
-
|
93
|
-
klass.define_instance_method('collect!')
|
94
|
-
|
95
|
-
klass.define_instance_method('collect_concat')
|
96
|
-
|
97
|
-
klass.define_instance_method('combination') do |method|
|
98
|
-
method.define_argument('num')
|
99
|
-
end
|
100
|
-
|
101
|
-
klass.define_instance_method('compact')
|
102
|
-
|
103
|
-
klass.define_instance_method('compact!')
|
104
|
-
|
105
|
-
klass.define_instance_method('concat') do |method|
|
106
|
-
method.define_argument('other')
|
107
|
-
end
|
108
|
-
|
109
|
-
klass.define_instance_method('count') do |method|
|
110
|
-
method.define_optional_argument('item')
|
111
|
-
end
|
112
|
-
|
113
|
-
klass.define_instance_method('cycle') do |method|
|
114
|
-
method.define_optional_argument('n')
|
115
|
-
end
|
116
|
-
|
117
|
-
klass.define_instance_method('delete') do |method|
|
118
|
-
method.define_argument('obj')
|
119
|
-
end
|
120
|
-
|
121
|
-
klass.define_instance_method('delete_at') do |method|
|
122
|
-
method.define_argument('idx')
|
123
|
-
end
|
124
|
-
|
125
|
-
klass.define_instance_method('delete_if')
|
126
|
-
|
127
|
-
klass.define_instance_method('detect') do |method|
|
128
|
-
method.define_optional_argument('ifnone')
|
129
|
-
end
|
130
|
-
|
131
|
-
klass.define_instance_method('drop') do |method|
|
132
|
-
method.define_argument('n')
|
133
|
-
end
|
134
|
-
|
135
|
-
klass.define_instance_method('drop_while')
|
136
|
-
|
137
|
-
klass.define_instance_method('each')
|
138
|
-
|
139
|
-
klass.define_instance_method('each_cons') do |method|
|
140
|
-
method.define_argument('num')
|
141
|
-
end
|
142
|
-
|
143
|
-
klass.define_instance_method('each_entry') do |method|
|
144
|
-
method.define_rest_argument('pass')
|
145
|
-
end
|
146
|
-
|
147
|
-
klass.define_instance_method('each_index')
|
148
|
-
|
149
|
-
klass.define_instance_method('each_slice') do |method|
|
150
|
-
method.define_argument('slice_size')
|
151
|
-
end
|
152
|
-
|
153
|
-
klass.define_instance_method('each_with_index') do |method|
|
154
|
-
method.define_rest_argument('args')
|
155
|
-
end
|
156
|
-
|
157
|
-
klass.define_instance_method('each_with_object') do |method|
|
158
|
-
method.define_argument('memo')
|
159
|
-
end
|
160
|
-
|
161
|
-
klass.define_instance_method('empty?')
|
162
|
-
|
163
|
-
klass.define_instance_method('entries') do |method|
|
164
|
-
method.define_rest_argument('arg')
|
165
|
-
end
|
166
|
-
|
167
|
-
klass.define_instance_method('eql?') do |method|
|
168
|
-
method.define_argument('other')
|
169
|
-
end
|
170
|
-
|
171
|
-
klass.define_instance_method('fetch') do |method|
|
172
|
-
method.define_argument('idx')
|
173
|
-
method.define_optional_argument('default')
|
174
|
-
end
|
175
|
-
|
176
|
-
klass.define_instance_method('fill') do |method|
|
177
|
-
method.define_optional_argument('a')
|
178
|
-
method.define_optional_argument('b')
|
179
|
-
method.define_optional_argument('c')
|
180
|
-
end
|
181
|
-
|
182
|
-
klass.define_instance_method('find') do |method|
|
183
|
-
method.define_optional_argument('ifnone')
|
184
|
-
end
|
185
|
-
|
186
|
-
klass.define_instance_method('find_all')
|
187
|
-
|
188
|
-
klass.define_instance_method('find_index') do |method|
|
189
|
-
method.define_optional_argument('obj')
|
190
|
-
end
|
191
|
-
|
192
|
-
klass.define_instance_method('first') do |method|
|
193
|
-
method.define_optional_argument('n')
|
194
|
-
end
|
195
|
-
|
196
|
-
klass.define_instance_method('flat_map')
|
197
|
-
|
198
|
-
klass.define_instance_method('flatten') do |method|
|
199
|
-
method.define_optional_argument('level')
|
200
|
-
end
|
201
|
-
|
202
|
-
klass.define_instance_method('flatten!') do |method|
|
203
|
-
method.define_optional_argument('level')
|
204
|
-
end
|
12
|
+
klass.define_method('[]') do |method|
|
13
|
+
method.define_rest_argument('args')
|
14
|
+
end
|
205
15
|
|
206
|
-
|
207
|
-
method.define_argument('pattern')
|
208
|
-
end
|
16
|
+
klass.define_method('allocate')
|
209
17
|
|
210
|
-
|
18
|
+
klass.define_method('try_convert') do |method|
|
19
|
+
method.define_argument('obj')
|
20
|
+
end
|
211
21
|
|
212
|
-
|
22
|
+
klass.define_method('yaml_tag_subclasses?')
|
213
23
|
|
214
|
-
|
215
|
-
|
216
|
-
|
24
|
+
klass.define_instance_method('&') do |method|
|
25
|
+
method.define_argument('other')
|
26
|
+
end
|
217
27
|
|
218
|
-
|
219
|
-
|
220
|
-
|
28
|
+
klass.define_instance_method('*') do |method|
|
29
|
+
method.define_argument('multiplier')
|
30
|
+
end
|
221
31
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
end
|
32
|
+
klass.define_instance_method('+') do |method|
|
33
|
+
method.define_argument('other')
|
34
|
+
end
|
226
35
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
end
|
36
|
+
klass.define_instance_method('-') do |method|
|
37
|
+
method.define_argument('other')
|
38
|
+
end
|
231
39
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
end
|
40
|
+
klass.define_instance_method('<<') do |method|
|
41
|
+
method.define_argument('obj')
|
42
|
+
end
|
236
43
|
|
237
|
-
|
44
|
+
klass.define_instance_method('<=>') do |method|
|
45
|
+
method.define_argument('other')
|
46
|
+
end
|
238
47
|
|
239
|
-
|
240
|
-
|
241
|
-
|
48
|
+
klass.define_instance_method('==') do |method|
|
49
|
+
method.define_argument('other')
|
50
|
+
end
|
242
51
|
|
243
|
-
|
52
|
+
klass.define_instance_method('[]') do |method|
|
53
|
+
method.define_argument('arg1')
|
54
|
+
method.define_optional_argument('arg2')
|
55
|
+
end
|
244
56
|
|
245
|
-
|
246
|
-
|
247
|
-
|
57
|
+
klass.define_instance_method('[]=') do |method|
|
58
|
+
method.define_argument('index')
|
59
|
+
method.define_argument('ent')
|
60
|
+
method.define_optional_argument('fin')
|
61
|
+
end
|
248
62
|
|
249
|
-
|
63
|
+
klass.define_instance_method('__append__') do |method|
|
64
|
+
method.define_argument('obj')
|
65
|
+
end
|
250
66
|
|
251
|
-
|
67
|
+
klass.define_instance_method('__marshal__') do |method|
|
68
|
+
method.define_argument('ms')
|
69
|
+
end
|
252
70
|
|
253
|
-
|
71
|
+
klass.define_instance_method('__rescue_match__') do |method|
|
72
|
+
method.define_argument('exception')
|
73
|
+
end
|
254
74
|
|
255
|
-
|
75
|
+
klass.define_instance_method('abbrev') do |method|
|
76
|
+
method.define_optional_argument('pattern')
|
77
|
+
end
|
256
78
|
|
257
|
-
|
79
|
+
klass.define_instance_method('assoc') do |method|
|
80
|
+
method.define_argument('obj')
|
81
|
+
end
|
258
82
|
|
259
|
-
|
83
|
+
klass.define_instance_method('at') do |method|
|
84
|
+
method.define_argument('idx')
|
85
|
+
end
|
260
86
|
|
261
|
-
|
262
|
-
method.define_argument('obj')
|
263
|
-
end
|
87
|
+
klass.define_instance_method('clear')
|
264
88
|
|
265
|
-
|
89
|
+
klass.define_instance_method('collect')
|
266
90
|
|
267
|
-
|
91
|
+
klass.define_instance_method('collect!')
|
268
92
|
|
269
|
-
|
93
|
+
klass.define_instance_method('combination') do |method|
|
94
|
+
method.define_argument('num')
|
95
|
+
end
|
270
96
|
|
271
|
-
|
97
|
+
klass.define_instance_method('compact')
|
272
98
|
|
273
|
-
|
274
|
-
method.define_argument('start')
|
275
|
-
method.define_argument('count')
|
276
|
-
end
|
99
|
+
klass.define_instance_method('compact!')
|
277
100
|
|
278
|
-
|
279
|
-
|
280
|
-
|
101
|
+
klass.define_instance_method('concat') do |method|
|
102
|
+
method.define_argument('other')
|
103
|
+
end
|
281
104
|
|
282
|
-
|
105
|
+
klass.define_instance_method('cycle') do |method|
|
106
|
+
method.define_optional_argument('n')
|
107
|
+
end
|
283
108
|
|
284
|
-
|
109
|
+
klass.define_instance_method('delete') do |method|
|
110
|
+
method.define_argument('obj')
|
111
|
+
end
|
285
112
|
|
286
|
-
|
113
|
+
klass.define_instance_method('delete_at') do |method|
|
114
|
+
method.define_argument('idx')
|
115
|
+
end
|
287
116
|
|
288
|
-
|
289
|
-
method.define_argument('directives')
|
290
|
-
end
|
117
|
+
klass.define_instance_method('delete_if')
|
291
118
|
|
292
|
-
|
119
|
+
klass.define_instance_method('drop') do |method|
|
120
|
+
method.define_argument('n')
|
121
|
+
end
|
293
122
|
|
294
|
-
|
295
|
-
method.define_optional_argument('num')
|
296
|
-
end
|
123
|
+
klass.define_instance_method('each')
|
297
124
|
|
298
|
-
|
299
|
-
method.define_optional_argument('many')
|
300
|
-
end
|
125
|
+
klass.define_instance_method('each_index')
|
301
126
|
|
302
|
-
|
303
|
-
method.define_rest_argument('args')
|
304
|
-
end
|
127
|
+
klass.define_instance_method('empty?')
|
305
128
|
|
306
|
-
|
307
|
-
|
308
|
-
|
129
|
+
klass.define_instance_method('eql?') do |method|
|
130
|
+
method.define_argument('other')
|
131
|
+
end
|
309
132
|
|
310
|
-
|
311
|
-
|
312
|
-
|
133
|
+
klass.define_instance_method('fetch') do |method|
|
134
|
+
method.define_argument('idx')
|
135
|
+
method.define_optional_argument('default')
|
136
|
+
end
|
313
137
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
138
|
+
klass.define_instance_method('fill') do |method|
|
139
|
+
method.define_optional_argument('a')
|
140
|
+
method.define_optional_argument('b')
|
141
|
+
method.define_optional_argument('c')
|
142
|
+
end
|
318
143
|
|
319
|
-
|
144
|
+
klass.define_instance_method('find_index') do |method|
|
145
|
+
method.define_optional_argument('obj')
|
146
|
+
end
|
320
147
|
|
321
|
-
|
148
|
+
klass.define_instance_method('first') do |method|
|
149
|
+
method.define_optional_argument('n')
|
150
|
+
end
|
322
151
|
|
323
|
-
|
324
|
-
|
325
|
-
|
152
|
+
klass.define_instance_method('flatten') do |method|
|
153
|
+
method.define_optional_argument('level')
|
154
|
+
end
|
326
155
|
|
327
|
-
|
328
|
-
|
329
|
-
|
156
|
+
klass.define_instance_method('flatten!') do |method|
|
157
|
+
method.define_optional_argument('level')
|
158
|
+
end
|
330
159
|
|
331
|
-
|
332
|
-
method.define_argument('other')
|
333
|
-
end
|
160
|
+
klass.define_instance_method('hash')
|
334
161
|
|
335
|
-
|
162
|
+
klass.define_instance_method('include?') do |method|
|
163
|
+
method.define_argument('obj')
|
164
|
+
end
|
336
165
|
|
337
|
-
|
166
|
+
klass.define_instance_method('index') do |method|
|
167
|
+
method.define_optional_argument('obj')
|
168
|
+
end
|
338
169
|
|
339
|
-
|
170
|
+
klass.define_instance_method('initialize') do |method|
|
171
|
+
method.define_optional_argument('size_or_array')
|
172
|
+
method.define_optional_argument('obj')
|
340
173
|
|
341
|
-
|
342
|
-
|
343
|
-
end
|
174
|
+
method.returns { |object| object.instance }
|
175
|
+
end
|
344
176
|
|
345
|
-
|
346
|
-
|
347
|
-
|
177
|
+
klass.define_instance_method('insert') do |method|
|
178
|
+
method.define_argument('idx')
|
179
|
+
method.define_rest_argument('items')
|
180
|
+
end
|
348
181
|
|
349
|
-
|
350
|
-
method.define_optional_argument('cnt')
|
351
|
-
end
|
182
|
+
klass.define_instance_method('inspect')
|
352
183
|
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
end
|
184
|
+
klass.define_instance_method('join') do |method|
|
185
|
+
method.define_optional_argument('sep')
|
186
|
+
end
|
357
187
|
|
358
|
-
|
188
|
+
klass.define_instance_method('keep_if')
|
359
189
|
|
360
|
-
|
190
|
+
klass.define_instance_method('last') do |method|
|
191
|
+
method.define_optional_argument('n')
|
192
|
+
end
|
361
193
|
|
362
|
-
|
194
|
+
klass.define_instance_method('length')
|
363
195
|
|
364
|
-
|
365
|
-
method.define_optional_argument('n')
|
366
|
-
end
|
196
|
+
klass.define_instance_method('map')
|
367
197
|
|
368
|
-
|
369
|
-
method.define_optional_argument('options')
|
370
|
-
end
|
198
|
+
klass.define_instance_method('map!')
|
371
199
|
|
372
|
-
|
373
|
-
|
374
|
-
|
200
|
+
klass.define_instance_method('new_range') do |method|
|
201
|
+
method.define_argument('start')
|
202
|
+
method.define_argument('count')
|
203
|
+
end
|
375
204
|
|
376
|
-
|
205
|
+
klass.define_instance_method('new_reserved') do |method|
|
206
|
+
method.define_argument('count')
|
207
|
+
end
|
377
208
|
|
378
|
-
|
379
|
-
method.define_argument('arg1')
|
380
|
-
method.define_optional_argument('arg2')
|
381
|
-
end
|
209
|
+
klass.define_instance_method('nitems')
|
382
210
|
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
end
|
211
|
+
klass.define_instance_method('pack') do |method|
|
212
|
+
method.define_argument('directives')
|
213
|
+
end
|
387
214
|
|
388
|
-
|
389
|
-
|
390
|
-
|
215
|
+
klass.define_instance_method('permutation') do |method|
|
216
|
+
method.define_optional_argument('num')
|
217
|
+
end
|
391
218
|
|
392
|
-
|
219
|
+
klass.define_instance_method('pop') do |method|
|
220
|
+
method.define_optional_argument('many')
|
221
|
+
end
|
393
222
|
|
394
|
-
|
223
|
+
klass.define_instance_method('pretty_print') do |method|
|
224
|
+
method.define_argument('q')
|
225
|
+
end
|
395
226
|
|
396
|
-
|
227
|
+
klass.define_instance_method('pretty_print_cycle') do |method|
|
228
|
+
method.define_argument('q')
|
229
|
+
end
|
397
230
|
|
398
|
-
|
231
|
+
klass.define_instance_method('product') do |method|
|
232
|
+
method.define_rest_argument('args')
|
233
|
+
end
|
399
234
|
|
400
|
-
|
235
|
+
klass.define_instance_method('push') do |method|
|
236
|
+
method.define_rest_argument('args')
|
237
|
+
end
|
401
238
|
|
402
|
-
|
239
|
+
klass.define_instance_method('quote')
|
403
240
|
|
404
|
-
|
241
|
+
klass.define_instance_method('rassoc') do |method|
|
242
|
+
method.define_argument('obj')
|
243
|
+
end
|
405
244
|
|
406
|
-
|
245
|
+
klass.define_instance_method('reject')
|
407
246
|
|
408
|
-
|
247
|
+
klass.define_instance_method('reject!')
|
409
248
|
|
410
|
-
|
411
|
-
|
412
|
-
|
249
|
+
klass.define_instance_method('repeated_combination') do |method|
|
250
|
+
method.define_argument('combination_size')
|
251
|
+
end
|
413
252
|
|
414
|
-
|
253
|
+
klass.define_instance_method('repeated_permutation') do |method|
|
254
|
+
method.define_argument('combination_size')
|
255
|
+
end
|
415
256
|
|
416
|
-
|
257
|
+
klass.define_instance_method('replace') do |method|
|
258
|
+
method.define_argument('other')
|
259
|
+
end
|
417
260
|
|
418
|
-
|
261
|
+
klass.define_instance_method('reverse')
|
419
262
|
|
420
|
-
|
263
|
+
klass.define_instance_method('reverse!')
|
421
264
|
|
422
|
-
|
423
|
-
method.define_optional_argument('klass')
|
424
|
-
method.define_rest_argument('args')
|
425
|
-
method.define_block_argument('block')
|
426
|
-
end
|
265
|
+
klass.define_instance_method('reverse_each')
|
427
266
|
|
428
|
-
|
267
|
+
klass.define_instance_method('rindex') do |method|
|
268
|
+
method.define_optional_argument('obj')
|
269
|
+
end
|
429
270
|
|
430
|
-
|
431
|
-
|
432
|
-
|
271
|
+
klass.define_instance_method('rotate') do |method|
|
272
|
+
method.define_optional_argument('n')
|
273
|
+
end
|
433
274
|
|
434
|
-
|
275
|
+
klass.define_instance_method('rotate!') do |method|
|
276
|
+
method.define_optional_argument('cnt')
|
277
|
+
end
|
435
278
|
|
436
|
-
|
279
|
+
klass.define_instance_method('sample') do |method|
|
280
|
+
method.define_optional_argument('count')
|
281
|
+
method.define_optional_argument('options')
|
282
|
+
end
|
437
283
|
|
438
|
-
|
284
|
+
klass.define_instance_method('select')
|
439
285
|
|
440
|
-
|
286
|
+
klass.define_instance_method('select!')
|
441
287
|
|
442
|
-
|
288
|
+
klass.define_instance_method('shelljoin')
|
443
289
|
|
444
|
-
|
290
|
+
klass.define_instance_method('shift') do |method|
|
291
|
+
method.define_optional_argument('n')
|
292
|
+
end
|
445
293
|
|
446
|
-
|
294
|
+
klass.define_instance_method('shuffle') do |method|
|
295
|
+
method.define_optional_argument('options')
|
296
|
+
end
|
447
297
|
|
448
|
-
|
449
|
-
|
450
|
-
|
298
|
+
klass.define_instance_method('shuffle!') do |method|
|
299
|
+
method.define_optional_argument('options')
|
300
|
+
end
|
451
301
|
|
452
|
-
|
453
|
-
method.define_rest_argument('args')
|
454
|
-
end
|
302
|
+
klass.define_instance_method('size')
|
455
303
|
|
456
|
-
|
457
|
-
|
458
|
-
|
304
|
+
klass.define_instance_method('slice') do |method|
|
305
|
+
method.define_argument('arg1')
|
306
|
+
method.define_optional_argument('arg2')
|
307
|
+
end
|
459
308
|
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
309
|
+
klass.define_instance_method('slice!') do |method|
|
310
|
+
method.define_argument('start')
|
311
|
+
method.define_optional_argument('length')
|
312
|
+
end
|
464
313
|
|
465
|
-
|
466
|
-
method.define_rest_argument('others')
|
467
|
-
end
|
314
|
+
klass.define_instance_method('sort')
|
468
315
|
|
469
|
-
|
470
|
-
method.define_argument('other')
|
471
|
-
end
|
472
|
-
end
|
316
|
+
klass.define_instance_method('sort!')
|
473
317
|
|
474
|
-
|
475
|
-
klass.inherits(RubyLint::GlobalScope.constant_proxy('Object'))
|
318
|
+
klass.define_instance_method('sort_by!')
|
476
319
|
|
477
|
-
|
320
|
+
klass.define_instance_method('sort_inplace')
|
478
321
|
|
479
|
-
|
322
|
+
klass.define_instance_method('start')
|
480
323
|
|
481
|
-
|
482
|
-
method.define_optional_argument('initial_state')
|
483
|
-
end
|
324
|
+
klass.define_instance_method('start=')
|
484
325
|
|
485
|
-
|
326
|
+
klass.define_instance_method('taguri')
|
486
327
|
|
487
|
-
|
328
|
+
klass.define_instance_method('taguri=')
|
488
329
|
|
489
|
-
|
490
|
-
method.define_optional_argument('item')
|
491
|
-
end
|
330
|
+
klass.define_instance_method('to_a')
|
492
331
|
|
493
|
-
|
494
|
-
method.define_optional_argument('many')
|
495
|
-
end
|
332
|
+
klass.define_instance_method('to_ary')
|
496
333
|
|
497
|
-
|
498
|
-
|
499
|
-
|
334
|
+
klass.define_instance_method('to_csv') do |method|
|
335
|
+
method.define_optional_argument('options')
|
336
|
+
end
|
500
337
|
|
501
|
-
|
502
|
-
method.define_argument('n')
|
503
|
-
end
|
338
|
+
klass.define_instance_method('to_s')
|
504
339
|
|
505
|
-
|
340
|
+
klass.define_instance_method('to_tuple')
|
506
341
|
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
klass.define_instance_method('each_cons') do |method|
|
512
|
-
method.define_argument('num')
|
513
|
-
end
|
514
|
-
|
515
|
-
klass.define_instance_method('each_entry') do |method|
|
516
|
-
method.define_rest_argument('pass')
|
517
|
-
end
|
518
|
-
|
519
|
-
klass.define_instance_method('each_slice') do |method|
|
520
|
-
method.define_argument('slice_size')
|
521
|
-
end
|
522
|
-
|
523
|
-
klass.define_instance_method('each_with_index')
|
524
|
-
|
525
|
-
klass.define_instance_method('each_with_object') do |method|
|
526
|
-
method.define_argument('memo')
|
527
|
-
end
|
528
|
-
|
529
|
-
klass.define_instance_method('entries') do |method|
|
530
|
-
method.define_rest_argument('arg')
|
531
|
-
end
|
532
|
-
|
533
|
-
klass.define_instance_method('find') do |method|
|
534
|
-
method.define_optional_argument('ifnone')
|
535
|
-
end
|
536
|
-
|
537
|
-
klass.define_instance_method('find_all')
|
538
|
-
|
539
|
-
klass.define_instance_method('find_index') do |method|
|
540
|
-
method.define_optional_argument('value')
|
541
|
-
end
|
542
|
-
|
543
|
-
klass.define_instance_method('first') do |method|
|
544
|
-
method.define_optional_argument('n')
|
545
|
-
end
|
546
|
-
|
547
|
-
klass.define_instance_method('flat_map')
|
548
|
-
|
549
|
-
klass.define_instance_method('grep') do |method|
|
550
|
-
method.define_argument('pattern')
|
551
|
-
end
|
552
|
-
|
553
|
-
klass.define_instance_method('group_by')
|
342
|
+
klass.define_instance_method('to_yaml') do |method|
|
343
|
+
method.define_optional_argument('opts')
|
344
|
+
end
|
554
345
|
|
555
|
-
|
556
|
-
method.define_argument('obj')
|
557
|
-
end
|
558
|
-
|
559
|
-
klass.define_instance_method('initialize') do |method|
|
560
|
-
method.define_optional_argument('receiver_or_size')
|
561
|
-
method.define_optional_argument('method_name')
|
562
|
-
method.define_rest_argument('method_args')
|
563
|
-
end
|
564
|
-
|
565
|
-
klass.define_instance_method('inject') do |method|
|
566
|
-
method.define_optional_argument('initial')
|
567
|
-
method.define_optional_argument('sym')
|
568
|
-
end
|
569
|
-
|
570
|
-
klass.define_instance_method('lazy')
|
571
|
-
|
572
|
-
klass.define_instance_method('map')
|
573
|
-
|
574
|
-
klass.define_instance_method('max')
|
575
|
-
|
576
|
-
klass.define_instance_method('max_by')
|
577
|
-
|
578
|
-
klass.define_instance_method('member?') do |method|
|
579
|
-
method.define_argument('obj')
|
580
|
-
end
|
581
|
-
|
582
|
-
klass.define_instance_method('min')
|
346
|
+
klass.define_instance_method('total')
|
583
347
|
|
584
|
-
|
348
|
+
klass.define_instance_method('total=')
|
585
349
|
|
586
|
-
|
350
|
+
klass.define_instance_method('transpose')
|
587
351
|
|
588
|
-
|
352
|
+
klass.define_instance_method('tuple')
|
589
353
|
|
590
|
-
|
354
|
+
klass.define_instance_method('tuple=')
|
591
355
|
|
592
|
-
|
356
|
+
klass.define_instance_method('uniq')
|
593
357
|
|
594
|
-
|
358
|
+
klass.define_instance_method('uniq!')
|
595
359
|
|
596
|
-
|
360
|
+
klass.define_instance_method('unshift') do |method|
|
361
|
+
method.define_rest_argument('values')
|
362
|
+
end
|
597
363
|
|
598
|
-
|
364
|
+
klass.define_instance_method('values_at') do |method|
|
365
|
+
method.define_rest_argument('args')
|
366
|
+
end
|
599
367
|
|
600
|
-
|
368
|
+
klass.define_instance_method('yaml_initialize') do |method|
|
369
|
+
method.define_argument('tag')
|
370
|
+
method.define_argument('val')
|
371
|
+
end
|
601
372
|
|
602
|
-
|
373
|
+
klass.define_instance_method('zip') do |method|
|
374
|
+
method.define_rest_argument('others')
|
375
|
+
end
|
603
376
|
|
604
|
-
|
605
|
-
|
606
|
-
|
377
|
+
klass.define_instance_method('|') do |method|
|
378
|
+
method.define_argument('other')
|
379
|
+
end
|
607
380
|
end
|
608
381
|
|
609
|
-
|
382
|
+
defs.define_constant('Array::Enumerator') do |klass|
|
383
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
384
|
+
klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
|
610
385
|
|
611
|
-
|
386
|
+
klass.define_instance_method('each') do |method|
|
387
|
+
method.define_rest_argument('args')
|
388
|
+
end
|
612
389
|
|
613
|
-
|
390
|
+
klass.define_instance_method('each_with_index')
|
614
391
|
|
615
|
-
|
392
|
+
klass.define_instance_method('initialize') do |method|
|
393
|
+
method.define_optional_argument('receiver_or_size')
|
394
|
+
method.define_optional_argument('method_name')
|
395
|
+
method.define_rest_argument('method_args')
|
616
396
|
|
617
|
-
|
397
|
+
method.returns { |object| object.instance }
|
398
|
+
end
|
618
399
|
|
619
|
-
|
620
|
-
method.define_optional_argument('arg')
|
621
|
-
end
|
400
|
+
klass.define_instance_method('next')
|
622
401
|
|
623
|
-
|
402
|
+
klass.define_instance_method('next_values')
|
624
403
|
|
625
|
-
|
404
|
+
klass.define_instance_method('peek')
|
626
405
|
|
627
|
-
|
628
|
-
method.define_argument('n')
|
629
|
-
end
|
406
|
+
klass.define_instance_method('peek_values')
|
630
407
|
|
631
|
-
|
408
|
+
klass.define_instance_method('rewind')
|
632
409
|
|
633
|
-
|
634
|
-
method.define_rest_argument('arg')
|
635
|
-
end
|
410
|
+
klass.define_instance_method('size')
|
636
411
|
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
method.define_block_argument('block')
|
412
|
+
klass.define_instance_method('with_index') do |method|
|
413
|
+
method.define_optional_argument('offset')
|
414
|
+
end
|
641
415
|
end
|
642
416
|
|
643
|
-
|
644
|
-
|
645
|
-
end
|
417
|
+
defs.define_constant('Array::SortedElement') do |klass|
|
418
|
+
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
|
646
419
|
|
647
|
-
|
648
|
-
|
649
|
-
|
420
|
+
klass.define_instance_method('<=>') do |method|
|
421
|
+
method.define_argument('other')
|
422
|
+
end
|
650
423
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
end
|
424
|
+
klass.define_instance_method('initialize') do |method|
|
425
|
+
method.define_argument('val')
|
426
|
+
method.define_argument('sort_id')
|
655
427
|
|
656
|
-
|
657
|
-
|
428
|
+
method.returns { |object| object.instance }
|
429
|
+
end
|
658
430
|
|
659
|
-
|
660
|
-
method.define_argument('other')
|
661
|
-
end
|
431
|
+
klass.define_instance_method('sort_id')
|
662
432
|
|
663
|
-
|
664
|
-
method.define_argument('val')
|
665
|
-
method.define_argument('sort_id')
|
433
|
+
klass.define_instance_method('value')
|
666
434
|
end
|
667
|
-
|
668
|
-
klass.define_instance_method('sort_id')
|
669
|
-
|
670
|
-
klass.define_instance_method('value')
|
671
435
|
end
|
672
|
-
|
673
|
-
RubyLint::GlobalScope.definitions.lookup(:const, 'Array').deep_freeze
|