ruby-lint 0.0.2 → 0.0.3
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.
- data.tar.gz.asc +17 -0
- data/.gitignore +1 -0
- data/.travis.yml +25 -0
- data/.yardopts +4 -0
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/MANIFEST +238 -49
- data/README.md +84 -131
- data/Rakefile +6 -0
- data/bin/ruby-lint +2 -2
- data/checksum/.gitkeep +0 -0
- data/doc/DCO.md +26 -0
- data/doc/architecture.md +63 -0
- data/doc/code_analysis.md +90 -0
- data/doc/configuration.md +86 -0
- data/doc/contributing.md +16 -0
- data/doc/graphviz/flow.dot +7 -0
- data/doc/images/.gitkeep +0 -0
- data/doc/images/flow.png +0 -0
- data/lib/ruby-lint.rb +35 -35
- data/lib/ruby-lint/analyze/argument_amount.rb +73 -0
- data/lib/ruby-lint/analyze/shadowing_variables.rb +19 -24
- data/lib/ruby-lint/analyze/undefined_methods.rb +68 -0
- data/lib/ruby-lint/analyze/undefined_variables.rb +42 -69
- data/lib/ruby-lint/analyze/unused_variables.rb +23 -78
- data/lib/ruby-lint/base.rb +85 -0
- data/lib/ruby-lint/cli.rb +23 -167
- data/lib/ruby-lint/cli/analyze.rb +99 -0
- data/lib/ruby-lint/cli/ast.rb +35 -0
- data/lib/ruby-lint/cli/base.rb +120 -0
- data/lib/ruby-lint/configuration.rb +112 -0
- data/lib/ruby-lint/constant_loader.rb +92 -0
- data/lib/ruby-lint/definition/ruby_method.rb +248 -0
- data/lib/ruby-lint/definition/ruby_object.rb +757 -0
- data/lib/ruby-lint/definition_generator.rb +155 -0
- data/lib/ruby-lint/definitions/core.rb +5 -0
- data/lib/ruby-lint/definitions/core/arg0.rb +7 -0
- data/lib/ruby-lint/definitions/core/argf.rb +7 -0
- data/lib/ruby-lint/definitions/core/argument_error.rb +12 -0
- data/lib/ruby-lint/definitions/core/argv.rb +7 -0
- data/lib/ruby-lint/definitions/core/array.rb +414 -0
- data/lib/ruby-lint/definitions/core/autoload.rb +39 -0
- data/lib/ruby-lint/definitions/core/basic_object.rb +46 -0
- data/lib/ruby-lint/definitions/core/bignum.rb +128 -0
- data/lib/ruby-lint/definitions/core/binding.rb +52 -0
- data/lib/ruby-lint/definitions/core/class.rb +23 -0
- data/lib/ruby-lint/definitions/core/comparable.rb +38 -0
- data/lib/ruby-lint/definitions/core/complex.rb +195 -0
- data/lib/ruby-lint/definitions/core/condition_variable.rb +19 -0
- data/lib/ruby-lint/definitions/core/continuation.rb +8 -0
- data/lib/ruby-lint/definitions/core/data.rb +8 -0
- data/lib/ruby-lint/definitions/core/date.rb +706 -0
- data/lib/ruby-lint/definitions/core/date_time.rb +381 -0
- data/lib/ruby-lint/definitions/core/default_record_separator.rb +7 -0
- data/lib/ruby-lint/definitions/core/digest.rb +166 -0
- data/lib/ruby-lint/definitions/core/dir.rb +496 -0
- data/lib/ruby-lint/definitions/core/encoding.rb +2030 -0
- data/lib/ruby-lint/definitions/core/encoding_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/enumerable.rb +352 -0
- data/lib/ruby-lint/definitions/core/enumerator.rb +37 -0
- data/lib/ruby-lint/definitions/core/env.rb +7 -0
- data/lib/ruby-lint/definitions/core/eoferror.rb +8 -0
- data/lib/ruby-lint/definitions/core/erb.rb +304 -0
- data/lib/ruby-lint/definitions/core/errno.rb +3331 -0
- data/lib/ruby-lint/definitions/core/etc.rb +138 -0
- data/lib/ruby-lint/definitions/core/exception.rb +72 -0
- data/lib/ruby-lint/definitions/core/false.rb +7 -0
- data/lib/ruby-lint/definitions/core/false_class.rb +30 -0
- data/lib/ruby-lint/definitions/core/fatal_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/fiber.rb +35 -0
- data/lib/ruby-lint/definitions/core/fiber_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/file.rb +1277 -0
- data/lib/ruby-lint/definitions/core/file_list.rb +727 -0
- data/lib/ruby-lint/definitions/core/file_test.rb +106 -0
- data/lib/ruby-lint/definitions/core/file_utils.rb +1027 -0
- data/lib/ruby-lint/definitions/core/fixnum.rb +156 -0
- data/lib/ruby-lint/definitions/core/float.rb +307 -0
- data/lib/ruby-lint/definitions/core/float_domain_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/gc.rb +57 -0
- data/lib/ruby-lint/definitions/core/gem.rb +3161 -0
- data/lib/ruby-lint/definitions/core/hash.rb +512 -0
- data/lib/ruby-lint/definitions/core/immediate_value.rb +19 -0
- data/lib/ruby-lint/definitions/core/index_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/integer.rb +100 -0
- data/lib/ruby-lint/definitions/core/interrupt.rb +14 -0
- data/lib/ruby-lint/definitions/core/io.rb +928 -0
- data/lib/ruby-lint/definitions/core/ioerror.rb +8 -0
- data/lib/ruby-lint/definitions/core/kernel.rb +504 -0
- data/lib/ruby-lint/definitions/core/key_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/load_error.rb +28 -0
- data/lib/ruby-lint/definitions/core/local_jump_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/main.rb +25 -0
- data/lib/ruby-lint/definitions/core/marshal.rb +466 -0
- data/lib/ruby-lint/definitions/core/match_data.rb +73 -0
- data/lib/ruby-lint/definitions/core/math.rb +205 -0
- data/lib/ruby-lint/definitions/core/memory_segmention_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/method.rb +61 -0
- data/lib/ruby-lint/definitions/core/module.rb +262 -0
- data/lib/ruby-lint/definitions/core/monitor.rb +39 -0
- data/lib/ruby-lint/definitions/core/monitor_mixin.rb +59 -0
- data/lib/ruby-lint/definitions/core/mutex.rb +32 -0
- data/lib/ruby-lint/definitions/core/name_error.rb +16 -0
- data/lib/ruby-lint/definitions/core/nil.rb +7 -0
- data/lib/ruby-lint/definitions/core/nil_class.rb +46 -0
- data/lib/ruby-lint/definitions/core/no_memory_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/no_method_error.rb +18 -0
- data/lib/ruby-lint/definitions/core/not_implemented_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/numeric.rb +123 -0
- data/lib/ruby-lint/definitions/core/object.rb +31 -0
- data/lib/ruby-lint/definitions/core/object_space.rb +41 -0
- data/lib/ruby-lint/definitions/core/open_struct.rb +49 -0
- data/lib/ruby-lint/definitions/core/option_parser.rb +1355 -0
- data/lib/ruby-lint/definitions/core/precision.rb +21 -0
- data/lib/ruby-lint/definitions/core/primitive_failure.rb +8 -0
- data/lib/ruby-lint/definitions/core/proc.rb +109 -0
- data/lib/ruby-lint/definitions/core/process.rb +602 -0
- data/lib/ruby-lint/definitions/core/psych.rb +2231 -0
- data/lib/ruby-lint/definitions/core/queue.rb +44 -0
- data/lib/ruby-lint/definitions/core/rake.rb +4784 -0
- data/lib/ruby-lint/definitions/core/rake_file_utils.rb +203 -0
- data/lib/ruby-lint/definitions/core/rakeversion.rb +7 -0
- data/lib/ruby-lint/definitions/core/random.rb +38 -0
- data/lib/ruby-lint/definitions/core/range.rb +104 -0
- data/lib/ruby-lint/definitions/core/range_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/rational.rb +96 -0
- data/lib/ruby-lint/definitions/core/rb_config.rb +36 -0
- data/lib/ruby-lint/definitions/core/regexp.rb +396 -0
- data/lib/ruby-lint/definitions/core/regexp_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/rubinius.rb +16637 -0
- data/lib/ruby-lint/definitions/core/ruby_copyright.rb +7 -0
- data/lib/ruby-lint/definitions/core/ruby_description.rb +7 -0
- data/lib/ruby-lint/definitions/core/ruby_engine.rb +7 -0
- data/lib/ruby-lint/definitions/core/ruby_lint.rb +93 -0
- data/lib/ruby-lint/definitions/core/ruby_patchlevel.rb +7 -0
- data/lib/ruby-lint/definitions/core/ruby_platform.rb +7 -0
- data/lib/ruby-lint/definitions/core/ruby_release_date.rb +7 -0
- data/lib/ruby-lint/definitions/core/ruby_version.rb +7 -0
- data/lib/ruby-lint/definitions/core/runtime_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/scan_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/script_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/security_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/shellwords.rb +37 -0
- data/lib/ruby-lint/definitions/core/signal.rb +37 -0
- data/lib/ruby-lint/definitions/core/signal_exception.rb +19 -0
- data/lib/ruby-lint/definitions/core/singleton.rb +37 -0
- data/lib/ruby-lint/definitions/core/sized_queue.rb +42 -0
- data/lib/ruby-lint/definitions/core/standard_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/stderr.rb +7 -0
- data/lib/ruby-lint/definitions/core/stdin.rb +7 -0
- data/lib/ruby-lint/definitions/core/stdout.rb +7 -0
- data/lib/ruby-lint/definitions/core/stop_iteration.rb +8 -0
- data/lib/ruby-lint/definitions/core/string.rb +713 -0
- data/lib/ruby-lint/definitions/core/string_io.rb +287 -0
- data/lib/ruby-lint/definitions/core/string_scanner.rb +158 -0
- data/lib/ruby-lint/definitions/core/struct.rb +357 -0
- data/lib/ruby-lint/definitions/core/syck.rb +30 -0
- data/lib/ruby-lint/definitions/core/symbol.rb +90 -0
- data/lib/ruby-lint/definitions/core/syntax_error.rb +44 -0
- data/lib/ruby-lint/definitions/core/system_call_error.rb +31 -0
- data/lib/ruby-lint/definitions/core/system_exit.rb +19 -0
- data/lib/ruby-lint/definitions/core/system_stack_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/thread.rb +209 -0
- data/lib/ruby-lint/definitions/core/thread_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/thread_group.rb +22 -0
- data/lib/ruby-lint/definitions/core/time.rb +233 -0
- data/lib/ruby-lint/definitions/core/toplevel_binding.rb +7 -0
- data/lib/ruby-lint/definitions/core/true.rb +7 -0
- data/lib/ruby-lint/definitions/core/true_class.rb +30 -0
- data/lib/ruby-lint/definitions/core/type_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/unbound_method.rb +51 -0
- data/lib/ruby-lint/definitions/core/unmarshalable.rb +13 -0
- data/lib/ruby-lint/definitions/core/unsupported_library_error.rb +8 -0
- data/lib/ruby-lint/definitions/core/weak_ref.rb +42 -0
- data/lib/ruby-lint/definitions/core/zero_division_error.rb +8 -0
- data/lib/ruby-lint/definitions_builder.rb +692 -0
- data/lib/ruby-lint/extensions/string.rb +15 -0
- data/lib/ruby-lint/helper/constant_paths.rb +41 -0
- data/lib/ruby-lint/helper/conversion.rb +33 -0
- data/lib/ruby-lint/helper/current_scope.rb +98 -0
- data/lib/ruby-lint/helper/methods.rb +91 -0
- data/lib/ruby-lint/inspector.rb +191 -0
- data/lib/ruby-lint/iterator.rb +187 -127
- data/lib/ruby-lint/node.rb +107 -0
- data/lib/ruby-lint/parser.rb +510 -1137
- data/lib/ruby-lint/parser_error.rb +15 -27
- data/lib/ruby-lint/presenter/json.rb +19 -0
- data/lib/ruby-lint/presenter/text.rb +37 -0
- data/lib/ruby-lint/report.rb +95 -53
- data/lib/ruby-lint/report/entry.rb +71 -0
- data/lib/ruby-lint/template/definition.erb +24 -0
- data/lib/ruby-lint/template/scope.rb +25 -0
- data/lib/ruby-lint/variable_predicates.rb +109 -0
- data/lib/ruby-lint/version.rb +1 -1
- data/ruby-lint.gemspec +19 -8
- data/spec/helper.rb +10 -2
- data/spec/ruby-lint/analyze/argument_amount.rb +91 -0
- data/spec/ruby-lint/analyze/shadowing_variables.rb +69 -14
- data/spec/ruby-lint/analyze/undefined_methods.rb +174 -0
- data/spec/ruby-lint/analyze/undefined_variables.rb +70 -179
- data/spec/ruby-lint/analyze/unused_variables.rb +63 -183
- data/spec/ruby-lint/configuration.rb +15 -0
- data/spec/ruby-lint/constant_loader.rb +32 -0
- data/spec/ruby-lint/definition/dsl.rb +142 -0
- data/spec/ruby-lint/definition/method_calls.rb +26 -0
- data/spec/ruby-lint/definition/ruby_method.rb +175 -0
- data/spec/ruby-lint/definition/ruby_object.rb +228 -0
- data/spec/ruby-lint/definitions_builder/assignments/arrays.rb +71 -0
- data/spec/ruby-lint/definitions_builder/assignments/hashes.rb +65 -0
- data/spec/ruby-lint/definitions_builder/assignments/objects.rb +23 -0
- data/spec/ruby-lint/definitions_builder/assignments/optional.rb +22 -0
- data/spec/ruby-lint/definitions_builder/assignments/return_values.rb +78 -0
- data/spec/ruby-lint/definitions_builder/assignments/variables.rb +71 -0
- data/spec/ruby-lint/definitions_builder/associate_nodes.rb +17 -0
- data/spec/ruby-lint/definitions_builder/blocks.rb +40 -0
- data/spec/ruby-lint/definitions_builder/classes.rb +230 -0
- data/spec/ruby-lint/definitions_builder/for.rb +16 -0
- data/spec/ruby-lint/definitions_builder/methods.rb +147 -0
- data/spec/ruby-lint/definitions_builder/modules.rb +175 -0
- data/spec/ruby-lint/definitions_builder/reference_amount.rb +31 -0
- data/spec/ruby-lint/definitions_builder/unused.rb +15 -0
- data/spec/ruby-lint/extensions/string.rb +7 -0
- data/spec/ruby-lint/iterator.rb +42 -417
- data/spec/ruby-lint/node.rb +38 -0
- data/spec/ruby-lint/parser/assignments.rb +225 -0
- data/spec/ruby-lint/parser/classes.rb +80 -122
- data/spec/ruby-lint/parser/errors.rb +7 -14
- data/spec/ruby-lint/parser/metadata.rb +17 -0
- data/spec/ruby-lint/parser/method_definitions.rb +111 -0
- data/spec/ruby-lint/parser/methods.rb +184 -216
- data/spec/ruby-lint/parser/modules.rb +54 -33
- data/spec/ruby-lint/parser/operators.rb +30 -65
- data/spec/ruby-lint/parser/statements/begin.rb +55 -0
- data/spec/ruby-lint/parser/statements/case.rb +34 -0
- data/spec/ruby-lint/parser/statements/defined.rb +11 -0
- data/spec/ruby-lint/parser/statements/for.rb +34 -0
- data/spec/ruby-lint/parser/statements/if.rb +46 -0
- data/spec/ruby-lint/parser/statements/return.rb +14 -0
- data/spec/ruby-lint/parser/statements/super.rb +49 -0
- data/spec/ruby-lint/parser/statements/unless.rb +42 -0
- data/spec/ruby-lint/parser/statements/until.rb +25 -0
- data/spec/ruby-lint/parser/statements/while.rb +25 -0
- data/spec/ruby-lint/parser/statements/yield.rb +18 -0
- data/spec/ruby-lint/parser/types/arrays.rb +47 -0
- data/spec/ruby-lint/parser/types/booleans.rb +11 -0
- data/spec/ruby-lint/parser/types/constants.rb +32 -0
- data/spec/ruby-lint/parser/types/hashes.rb +55 -0
- data/spec/ruby-lint/parser/types/nil.rb +7 -0
- data/spec/ruby-lint/parser/types/numbers.rb +11 -0
- data/spec/ruby-lint/parser/types/procs.rb +11 -0
- data/spec/ruby-lint/parser/types/ranges.rb +11 -0
- data/spec/ruby-lint/parser/types/regexp.rb +27 -0
- data/spec/ruby-lint/parser/types/strings.rb +44 -0
- data/spec/ruby-lint/parser/types/symbols.rb +15 -0
- data/spec/ruby-lint/presenter/json.rb +31 -0
- data/spec/ruby-lint/presenter/text.rb +22 -0
- data/spec/ruby-lint/report.rb +45 -15
- data/spec/ruby-lint/report/entry.rb +24 -0
- data/spec/support/bacon.rb +33 -0
- data/spec/support/building.rb +43 -0
- data/spec/support/definitions.rb +23 -0
- data/spec/support/parsing.rb +23 -0
- data/spec/support/simplecov.rb +16 -0
- data/task/build.rake +9 -0
- data/task/checksum.rake +13 -0
- data/task/coverage.rake +6 -0
- data/task/doc.rake +5 -0
- data/task/generate.rake +34 -0
- data/task/graphviz.rake +12 -0
- data/task/stdlib.rake +2 -9
- data/task/tag.rake +6 -0
- metadata +337 -68
- metadata.gz.asc +17 -0
- data/.rbenv-version +0 -1
- data/lib/ruby-lint/analyze/coding_style.rb +0 -407
- data/lib/ruby-lint/analyze/definitions.rb +0 -244
- data/lib/ruby-lint/analyze/method_validation.rb +0 -104
- data/lib/ruby-lint/callback.rb +0 -67
- data/lib/ruby-lint/constant_importer.rb +0 -112
- data/lib/ruby-lint/definition.rb +0 -230
- data/lib/ruby-lint/formatter/text.rb +0 -54
- data/lib/ruby-lint/helper/definition_resolver.rb +0 -143
- data/lib/ruby-lint/helper/scoping.rb +0 -138
- data/lib/ruby-lint/options.rb +0 -58
- data/lib/ruby-lint/token/assignment_token.rb +0 -35
- data/lib/ruby-lint/token/begin_rescue_token.rb +0 -57
- data/lib/ruby-lint/token/block_token.rb +0 -26
- data/lib/ruby-lint/token/case_token.rb +0 -44
- data/lib/ruby-lint/token/class_token.rb +0 -24
- data/lib/ruby-lint/token/keyword_token.rb +0 -43
- data/lib/ruby-lint/token/method_definition_token.rb +0 -64
- data/lib/ruby-lint/token/method_token.rb +0 -56
- data/lib/ruby-lint/token/parameters_token.rb +0 -99
- data/lib/ruby-lint/token/regexp_token.rb +0 -15
- data/lib/ruby-lint/token/statement_token.rb +0 -69
- data/lib/ruby-lint/token/token.rb +0 -176
- data/lib/ruby-lint/token/variable_token.rb +0 -18
- data/spec/benchmarks/memory.rb +0 -52
- data/spec/benchmarks/parse_parser.rb +0 -16
- data/spec/fixtures/stdlib/un.rb +0 -348
- data/spec/ruby-lint/analyze/coding_style.rb +0 -224
- data/spec/ruby-lint/analyze/complex/un.rb +0 -29
- data/spec/ruby-lint/analyze/definitions/classes.rb +0 -114
- data/spec/ruby-lint/analyze/definitions/methods.rb +0 -91
- data/spec/ruby-lint/analyze/definitions/modules.rb +0 -207
- data/spec/ruby-lint/analyze/definitions/variables.rb +0 -103
- data/spec/ruby-lint/analyze/method_validation.rb +0 -177
- data/spec/ruby-lint/callback.rb +0 -28
- data/spec/ruby-lint/constant_importer.rb +0 -27
- data/spec/ruby-lint/definition.rb +0 -96
- data/spec/ruby-lint/formatter/text.rb +0 -21
- data/spec/ruby-lint/parser/arrays.rb +0 -147
- data/spec/ruby-lint/parser/expander_assignments.rb +0 -183
- data/spec/ruby-lint/parser/hashes.rb +0 -136
- data/spec/ruby-lint/parser/keywords.rb +0 -89
- data/spec/ruby-lint/parser/objects.rb +0 -39
- data/spec/ruby-lint/parser/procs.rb +0 -113
- data/spec/ruby-lint/parser/ranges.rb +0 -49
- data/spec/ruby-lint/parser/regexp.rb +0 -31
- data/spec/ruby-lint/parser/scalars.rb +0 -93
- data/spec/ruby-lint/parser/statements.rb +0 -591
- data/spec/ruby-lint/parser/variables.rb +0 -230
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Constant: LoadError
|
|
3
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
4
|
+
# Platform: rbx 2.0.0.rc1
|
|
5
|
+
#
|
|
6
|
+
RubyLint.global_scope.define_constant('LoadError') do |klass|
|
|
7
|
+
klass.inherits(RubyLint.global_constant('ScriptError'))
|
|
8
|
+
|
|
9
|
+
klass.define_method('__class_init__')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
##
|
|
13
|
+
# Constant: LoadError::InvalidExtensionError
|
|
14
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
15
|
+
# Platform: rbx 2.0.0.rc1
|
|
16
|
+
#
|
|
17
|
+
RubyLint.global_scope.define_constant('LoadError::InvalidExtensionError') do |klass|
|
|
18
|
+
klass.inherits(RubyLint.global_constant('LoadError'))
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# Constant: LoadError::MRIExtensionError
|
|
23
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
24
|
+
# Platform: rbx 2.0.0.rc1
|
|
25
|
+
#
|
|
26
|
+
RubyLint.global_scope.define_constant('LoadError::MRIExtensionError') do |klass|
|
|
27
|
+
klass.inherits(RubyLint.global_constant('LoadError::InvalidExtensionError'))
|
|
28
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Constant: MAIN
|
|
3
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
4
|
+
# Platform: rbx 2.0.0.rc1
|
|
5
|
+
#
|
|
6
|
+
RubyLint.global_scope.define_constant('MAIN') do |klass|
|
|
7
|
+
|
|
8
|
+
klass.define_method('__script__')
|
|
9
|
+
|
|
10
|
+
klass.define_method('include') do |method|
|
|
11
|
+
method.define_rest_argument('mods')
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
klass.define_method('inspect')
|
|
15
|
+
|
|
16
|
+
klass.define_method('private') do |method|
|
|
17
|
+
method.define_rest_argument('methods')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
klass.define_method('public') do |method|
|
|
21
|
+
method.define_rest_argument('methods')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
klass.define_method('to_s')
|
|
25
|
+
end
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Constant: Marshal
|
|
3
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
4
|
+
# Platform: rbx 2.0.0.rc1
|
|
5
|
+
#
|
|
6
|
+
RubyLint.global_scope.define_constant('Marshal') do |klass|
|
|
7
|
+
|
|
8
|
+
klass.define_method('__module_init__')
|
|
9
|
+
|
|
10
|
+
klass.define_method('dump') do |method|
|
|
11
|
+
method.define_argument('obj')
|
|
12
|
+
method.define_optional_argument('an_io')
|
|
13
|
+
method.define_optional_argument('limit')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
klass.define_method('load') do |method|
|
|
17
|
+
method.define_argument('obj')
|
|
18
|
+
method.define_optional_argument('prc')
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
klass.define_method('restore') do |method|
|
|
22
|
+
method.define_argument('obj')
|
|
23
|
+
method.define_optional_argument('prc')
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# Constant: Marshal::IOState
|
|
29
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
30
|
+
# Platform: rbx 2.0.0.rc1
|
|
31
|
+
#
|
|
32
|
+
RubyLint.global_scope.define_constant('Marshal::IOState') do |klass|
|
|
33
|
+
klass.inherits(RubyLint.global_constant('Marshal::State'))
|
|
34
|
+
|
|
35
|
+
klass.define_method('__class_init__')
|
|
36
|
+
|
|
37
|
+
klass.define_instance_method('consume') do |method|
|
|
38
|
+
method.define_argument('bytes')
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
klass.define_instance_method('consume_byte')
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# Constant: Marshal::MAJOR_VERSION
|
|
46
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
47
|
+
# Platform: rbx 2.0.0.rc1
|
|
48
|
+
#
|
|
49
|
+
RubyLint.global_scope.define_constant('Marshal::MAJOR_VERSION') do |klass|
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
##
|
|
53
|
+
# Constant: Marshal::MINOR_VERSION
|
|
54
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
55
|
+
# Platform: rbx 2.0.0.rc1
|
|
56
|
+
#
|
|
57
|
+
RubyLint.global_scope.define_constant('Marshal::MINOR_VERSION') do |klass|
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
##
|
|
61
|
+
# Constant: Marshal::State
|
|
62
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
63
|
+
# Platform: rbx 2.0.0.rc1
|
|
64
|
+
#
|
|
65
|
+
RubyLint.global_scope.define_constant('Marshal::State') do |klass|
|
|
66
|
+
klass.inherits(RubyLint.global_constant('Object'))
|
|
67
|
+
|
|
68
|
+
klass.define_method('__class_init__')
|
|
69
|
+
|
|
70
|
+
klass.define_instance_method('add_object') do |method|
|
|
71
|
+
method.define_argument('obj')
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
klass.define_instance_method('add_symlink') do |method|
|
|
75
|
+
method.define_argument('obj')
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
klass.define_instance_method('call') do |method|
|
|
79
|
+
method.define_argument('obj')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
klass.define_instance_method('const_lookup') do |method|
|
|
83
|
+
method.define_argument('name')
|
|
84
|
+
method.define_optional_argument('type')
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
klass.define_instance_method('construct') do |method|
|
|
88
|
+
method.define_optional_argument('ivar_index')
|
|
89
|
+
method.define_optional_argument('call_proc')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
klass.define_instance_method('construct_array')
|
|
93
|
+
|
|
94
|
+
klass.define_instance_method('construct_bignum')
|
|
95
|
+
|
|
96
|
+
klass.define_instance_method('construct_class')
|
|
97
|
+
|
|
98
|
+
klass.define_instance_method('construct_data')
|
|
99
|
+
|
|
100
|
+
klass.define_instance_method('construct_float')
|
|
101
|
+
|
|
102
|
+
klass.define_instance_method('construct_hash')
|
|
103
|
+
|
|
104
|
+
klass.define_instance_method('construct_hash_def')
|
|
105
|
+
|
|
106
|
+
klass.define_instance_method('construct_integer')
|
|
107
|
+
|
|
108
|
+
klass.define_instance_method('construct_module')
|
|
109
|
+
|
|
110
|
+
klass.define_instance_method('construct_object')
|
|
111
|
+
|
|
112
|
+
klass.define_instance_method('construct_old_module')
|
|
113
|
+
|
|
114
|
+
klass.define_instance_method('construct_regexp')
|
|
115
|
+
|
|
116
|
+
klass.define_instance_method('construct_string')
|
|
117
|
+
|
|
118
|
+
klass.define_instance_method('construct_struct')
|
|
119
|
+
|
|
120
|
+
klass.define_instance_method('construct_symbol')
|
|
121
|
+
|
|
122
|
+
klass.define_instance_method('construct_user_defined') do |method|
|
|
123
|
+
method.define_argument('ivar_index')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
klass.define_instance_method('construct_user_marshal')
|
|
127
|
+
|
|
128
|
+
klass.define_instance_method('extend_object') do |method|
|
|
129
|
+
method.define_argument('obj')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
klass.define_instance_method('find_link') do |method|
|
|
133
|
+
method.define_argument('obj')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
klass.define_instance_method('find_symlink') do |method|
|
|
137
|
+
method.define_argument('obj')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
klass.define_instance_method('get_byte_sequence')
|
|
141
|
+
|
|
142
|
+
klass.define_instance_method('get_symbol')
|
|
143
|
+
|
|
144
|
+
klass.define_instance_method('get_user_class')
|
|
145
|
+
|
|
146
|
+
klass.define_instance_method('initialize') do |method|
|
|
147
|
+
method.define_argument('stream')
|
|
148
|
+
method.define_argument('depth')
|
|
149
|
+
method.define_argument('proc')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
klass.define_instance_method('prepare_ivar') do |method|
|
|
153
|
+
method.define_argument('ivar')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
klass.define_instance_method('serializable_instance_variables') do |method|
|
|
157
|
+
method.define_argument('obj')
|
|
158
|
+
method.define_argument('exclude_ivars')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
klass.define_instance_method('serialize') do |method|
|
|
162
|
+
method.define_argument('obj')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
klass.define_instance_method('serialize_bignum') do |method|
|
|
166
|
+
method.define_argument('n')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
klass.define_instance_method('serialize_encoding') do |method|
|
|
170
|
+
method.define_argument('obj')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
klass.define_instance_method('serialize_encoding?') do |method|
|
|
174
|
+
method.define_argument('obj')
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
klass.define_instance_method('serialize_extended_object') do |method|
|
|
178
|
+
method.define_argument('obj')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
klass.define_instance_method('serialize_fixnum') do |method|
|
|
182
|
+
method.define_argument('n')
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
klass.define_instance_method('serialize_instance_variables_prefix') do |method|
|
|
186
|
+
method.define_argument('obj')
|
|
187
|
+
method.define_optional_argument('exclude_ivars')
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
klass.define_instance_method('serialize_instance_variables_suffix') do |method|
|
|
191
|
+
method.define_argument('obj')
|
|
192
|
+
method.define_optional_argument('force')
|
|
193
|
+
method.define_optional_argument('strip_ivars')
|
|
194
|
+
method.define_optional_argument('exclude_ivars')
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
klass.define_instance_method('serialize_integer') do |method|
|
|
198
|
+
method.define_argument('n')
|
|
199
|
+
method.define_optional_argument('prefix')
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
klass.define_instance_method('serialize_string') do |method|
|
|
203
|
+
method.define_argument('str')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
klass.define_instance_method('serialize_symbol') do |method|
|
|
207
|
+
method.define_argument('obj')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
klass.define_instance_method('serialize_user_class') do |method|
|
|
211
|
+
method.define_argument('obj')
|
|
212
|
+
method.define_argument('cls')
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
klass.define_instance_method('serialize_user_defined') do |method|
|
|
216
|
+
method.define_argument('obj')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
klass.define_instance_method('serialize_user_marshal') do |method|
|
|
220
|
+
method.define_argument('obj')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
klass.define_instance_method('set_instance_variables') do |method|
|
|
224
|
+
method.define_argument('obj')
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
klass.define_instance_method('set_object_encoding') do |method|
|
|
228
|
+
method.define_argument('obj')
|
|
229
|
+
method.define_argument('enc')
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
klass.define_instance_method('store_unique_object') do |method|
|
|
233
|
+
method.define_argument('obj')
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
##
|
|
238
|
+
# Constant: Marshal::StringState
|
|
239
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
240
|
+
# Platform: rbx 2.0.0.rc1
|
|
241
|
+
#
|
|
242
|
+
RubyLint.global_scope.define_constant('Marshal::StringState') do |klass|
|
|
243
|
+
klass.inherits(RubyLint.global_constant('Marshal::State'))
|
|
244
|
+
|
|
245
|
+
klass.define_method('__class_init__')
|
|
246
|
+
|
|
247
|
+
klass.define_instance_method('consume') do |method|
|
|
248
|
+
method.define_argument('bytes')
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
klass.define_instance_method('consume_byte')
|
|
252
|
+
|
|
253
|
+
klass.define_instance_method('initialize') do |method|
|
|
254
|
+
method.define_argument('stream')
|
|
255
|
+
method.define_argument('depth')
|
|
256
|
+
method.define_argument('prc')
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
##
|
|
261
|
+
# Constant: Marshal::TYPE_ARRAY
|
|
262
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
263
|
+
# Platform: rbx 2.0.0.rc1
|
|
264
|
+
#
|
|
265
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_ARRAY') do |klass|
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
##
|
|
269
|
+
# Constant: Marshal::TYPE_BIGNUM
|
|
270
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
271
|
+
# Platform: rbx 2.0.0.rc1
|
|
272
|
+
#
|
|
273
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_BIGNUM') do |klass|
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
##
|
|
277
|
+
# Constant: Marshal::TYPE_CLASS
|
|
278
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
279
|
+
# Platform: rbx 2.0.0.rc1
|
|
280
|
+
#
|
|
281
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_CLASS') do |klass|
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
##
|
|
285
|
+
# Constant: Marshal::TYPE_DATA
|
|
286
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
287
|
+
# Platform: rbx 2.0.0.rc1
|
|
288
|
+
#
|
|
289
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_DATA') do |klass|
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
##
|
|
293
|
+
# Constant: Marshal::TYPE_EXTENDED
|
|
294
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
295
|
+
# Platform: rbx 2.0.0.rc1
|
|
296
|
+
#
|
|
297
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_EXTENDED') do |klass|
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
##
|
|
301
|
+
# Constant: Marshal::TYPE_FALSE
|
|
302
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
303
|
+
# Platform: rbx 2.0.0.rc1
|
|
304
|
+
#
|
|
305
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_FALSE') do |klass|
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
##
|
|
309
|
+
# Constant: Marshal::TYPE_FIXNUM
|
|
310
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
311
|
+
# Platform: rbx 2.0.0.rc1
|
|
312
|
+
#
|
|
313
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_FIXNUM') do |klass|
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
##
|
|
317
|
+
# Constant: Marshal::TYPE_FLOAT
|
|
318
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
319
|
+
# Platform: rbx 2.0.0.rc1
|
|
320
|
+
#
|
|
321
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_FLOAT') do |klass|
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
##
|
|
325
|
+
# Constant: Marshal::TYPE_HASH
|
|
326
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
327
|
+
# Platform: rbx 2.0.0.rc1
|
|
328
|
+
#
|
|
329
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_HASH') do |klass|
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
##
|
|
333
|
+
# Constant: Marshal::TYPE_HASH_DEF
|
|
334
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
335
|
+
# Platform: rbx 2.0.0.rc1
|
|
336
|
+
#
|
|
337
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_HASH_DEF') do |klass|
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
##
|
|
341
|
+
# Constant: Marshal::TYPE_IVAR
|
|
342
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
343
|
+
# Platform: rbx 2.0.0.rc1
|
|
344
|
+
#
|
|
345
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_IVAR') do |klass|
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
##
|
|
349
|
+
# Constant: Marshal::TYPE_LINK
|
|
350
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
351
|
+
# Platform: rbx 2.0.0.rc1
|
|
352
|
+
#
|
|
353
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_LINK') do |klass|
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
##
|
|
357
|
+
# Constant: Marshal::TYPE_MODULE
|
|
358
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
359
|
+
# Platform: rbx 2.0.0.rc1
|
|
360
|
+
#
|
|
361
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_MODULE') do |klass|
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
##
|
|
365
|
+
# Constant: Marshal::TYPE_MODULE_OLD
|
|
366
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
367
|
+
# Platform: rbx 2.0.0.rc1
|
|
368
|
+
#
|
|
369
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_MODULE_OLD') do |klass|
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
##
|
|
373
|
+
# Constant: Marshal::TYPE_NIL
|
|
374
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
375
|
+
# Platform: rbx 2.0.0.rc1
|
|
376
|
+
#
|
|
377
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_NIL') do |klass|
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
##
|
|
381
|
+
# Constant: Marshal::TYPE_OBJECT
|
|
382
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
383
|
+
# Platform: rbx 2.0.0.rc1
|
|
384
|
+
#
|
|
385
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_OBJECT') do |klass|
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
##
|
|
389
|
+
# Constant: Marshal::TYPE_REGEXP
|
|
390
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
391
|
+
# Platform: rbx 2.0.0.rc1
|
|
392
|
+
#
|
|
393
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_REGEXP') do |klass|
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
##
|
|
397
|
+
# Constant: Marshal::TYPE_STRING
|
|
398
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
399
|
+
# Platform: rbx 2.0.0.rc1
|
|
400
|
+
#
|
|
401
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_STRING') do |klass|
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
##
|
|
405
|
+
# Constant: Marshal::TYPE_STRUCT
|
|
406
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
407
|
+
# Platform: rbx 2.0.0.rc1
|
|
408
|
+
#
|
|
409
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_STRUCT') do |klass|
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
##
|
|
413
|
+
# Constant: Marshal::TYPE_SYMBOL
|
|
414
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
415
|
+
# Platform: rbx 2.0.0.rc1
|
|
416
|
+
#
|
|
417
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_SYMBOL') do |klass|
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
##
|
|
421
|
+
# Constant: Marshal::TYPE_SYMLINK
|
|
422
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
423
|
+
# Platform: rbx 2.0.0.rc1
|
|
424
|
+
#
|
|
425
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_SYMLINK') do |klass|
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
##
|
|
429
|
+
# Constant: Marshal::TYPE_TRUE
|
|
430
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
431
|
+
# Platform: rbx 2.0.0.rc1
|
|
432
|
+
#
|
|
433
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_TRUE') do |klass|
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
##
|
|
437
|
+
# Constant: Marshal::TYPE_UCLASS
|
|
438
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
439
|
+
# Platform: rbx 2.0.0.rc1
|
|
440
|
+
#
|
|
441
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_UCLASS') do |klass|
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
##
|
|
445
|
+
# Constant: Marshal::TYPE_USERDEF
|
|
446
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
447
|
+
# Platform: rbx 2.0.0.rc1
|
|
448
|
+
#
|
|
449
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_USERDEF') do |klass|
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
##
|
|
453
|
+
# Constant: Marshal::TYPE_USRMARSHAL
|
|
454
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
455
|
+
# Platform: rbx 2.0.0.rc1
|
|
456
|
+
#
|
|
457
|
+
RubyLint.global_scope.define_constant('Marshal::TYPE_USRMARSHAL') do |klass|
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
##
|
|
461
|
+
# Constant: Marshal::VERSION_STRING
|
|
462
|
+
# Created: 2013-04-01 18:33:54 +0200
|
|
463
|
+
# Platform: rbx 2.0.0.rc1
|
|
464
|
+
#
|
|
465
|
+
RubyLint.global_scope.define_constant('Marshal::VERSION_STRING') do |klass|
|
|
466
|
+
end
|