opal 1.0.3 → 1.1.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +13 -12
- data/.gitattributes +1 -1
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/build.yml +90 -0
- data/.jshintrc +1 -1
- data/.overcommit.yml +35 -0
- data/.rubocop.yml +44 -7
- data/{.rubocop_todo.yml → .rubocop/todo.yml} +4 -5
- data/CHANGELOG.md +152 -1
- data/Gemfile +2 -3
- data/HACKING.md +2 -9
- data/LICENSE +1 -1
- data/README.md +21 -18
- data/UNRELEASED.md +4 -2
- data/benchmark-ips/bm_array_pop_1.rb +8 -0
- data/benchmark-ips/bm_array_shift.rb +7 -0
- data/benchmark-ips/bm_js_symbols_vs_strings.rb +7 -2
- data/benchmark-ips/class_shovel_vs_singleton_class.rb +16 -0
- data/bin/build-browser-source-map-support +4 -0
- data/bin/format-filters +54 -0
- data/bin/git-submodule-fast-install +49 -0
- data/bin/remove-filters +39 -0
- data/bin/setup +4 -0
- data/bin/yarn +11 -0
- data/docs/releasing.md +18 -0
- data/docs/roda-sprockets.md +86 -0
- data/docs/sinatra.md +5 -12
- data/examples/rack/Gemfile +1 -0
- data/examples/rack/app/application.rb +3 -0
- data/examples/rack/config.ru +5 -4
- data/exe/opal-repl +2 -83
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +2 -10
- data/lib/opal/builder_processors.rb +1 -1
- data/lib/opal/cli.rb +4 -1
- data/lib/opal/cli_options.rb +11 -3
- data/lib/opal/cli_runners.rb +27 -37
- data/lib/opal/cli_runners/applescript.rb +5 -44
- data/lib/opal/cli_runners/chrome.js +7 -35
- data/lib/opal/cli_runners/chrome.rb +75 -17
- data/lib/opal/cli_runners/compiler.rb +17 -0
- data/lib/opal/cli_runners/nashorn.rb +9 -43
- data/lib/opal/cli_runners/nodejs.rb +18 -47
- data/lib/opal/cli_runners/server.rb +18 -6
- data/lib/opal/cli_runners/source-map-support-browser.js +6449 -0
- data/lib/opal/cli_runners/source-map-support-node.js +3704 -0
- data/lib/opal/cli_runners/source-map-support.js +639 -0
- data/lib/opal/cli_runners/system_runner.rb +45 -0
- data/lib/opal/compiler.rb +57 -29
- data/lib/opal/config.rb +0 -5
- data/lib/opal/erb.rb +1 -1
- data/lib/opal/magic_comments.rb +34 -0
- data/lib/opal/nodes/args/arity_check.rb +2 -1
- data/lib/opal/nodes/base.rb +1 -1
- data/lib/opal/nodes/call.rb +1 -4
- data/lib/opal/nodes/def.rb +2 -0
- data/lib/opal/nodes/iter.rb +1 -1
- data/lib/opal/nodes/literal.rb +19 -14
- data/lib/opal/nodes/logic.rb +5 -80
- data/lib/opal/nodes/masgn.rb +2 -0
- data/lib/opal/nodes/rescue.rb +1 -1
- data/lib/opal/nodes/super.rb +24 -10
- data/lib/opal/nodes/top.rb +5 -4
- data/lib/opal/parser/with_c_lexer.rb +2 -1
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/path_reader.rb +2 -2
- data/lib/opal/paths.rb +8 -5
- data/lib/opal/repl.rb +103 -0
- data/lib/opal/rewriter.rb +4 -0
- data/lib/opal/rewriters/for_rewriter.rb +1 -1
- data/lib/opal/rewriters/js_reserved_words.rb +7 -7
- data/lib/opal/rewriters/numblocks.rb +31 -0
- data/lib/opal/rewriters/returnable_logic.rb +33 -0
- data/lib/opal/util.rb +11 -48
- data/lib/opal/version.rb +1 -1
- data/opal.gemspec +26 -26
- data/opal/corelib/array.rb +160 -118
- data/opal/corelib/array/pack.rb +5 -3
- data/opal/corelib/basic_object.rb +4 -4
- data/opal/corelib/class.rb +2 -1
- data/opal/corelib/comparable.rb +49 -31
- data/opal/corelib/constants.rb +5 -5
- data/opal/corelib/enumerable.rb +108 -46
- data/opal/corelib/enumerator.rb +27 -12
- data/opal/corelib/file.rb +3 -1
- data/opal/corelib/hash.rb +6 -1
- data/opal/corelib/helpers.rb +8 -28
- data/opal/corelib/io.rb +12 -7
- data/opal/corelib/kernel.rb +45 -14
- data/opal/corelib/kernel/format.rb +3 -1
- data/opal/corelib/math.rb +8 -6
- data/opal/corelib/method.rb +8 -0
- data/opal/corelib/module.rb +17 -2
- data/opal/corelib/number.rb +3 -12
- data/opal/corelib/proc.rb +16 -0
- data/opal/corelib/random/mersenne_twister.rb +147 -0
- data/opal/corelib/range.rb +3 -13
- data/opal/corelib/regexp.rb +10 -6
- data/opal/corelib/runtime.js +208 -81
- data/opal/corelib/string.rb +55 -49
- data/opal/corelib/string/encoding.rb +109 -32
- data/opal/corelib/string/unpack.rb +2 -17
- data/opal/corelib/struct.rb +14 -1
- data/opal/corelib/time.rb +4 -0
- data/opal/opal.rb +1 -1
- data/opal/opal/mini.rb +1 -1
- data/package.json +16 -0
- data/spec/README.md +10 -0
- data/spec/filters/bugs/array.rb +76 -0
- data/spec/filters/bugs/base64.rb +10 -0
- data/spec/filters/bugs/basicobject.rb +12 -0
- data/spec/filters/bugs/bigdecimal.rb +248 -0
- data/spec/filters/bugs/class.rb +12 -0
- data/spec/filters/bugs/complex.rb +7 -0
- data/spec/filters/bugs/date.rb +104 -0
- data/spec/filters/bugs/encoding.rb +259 -0
- data/spec/filters/bugs/enumerable.rb +26 -0
- data/spec/filters/bugs/enumerator.rb +48 -0
- data/spec/filters/bugs/exception.rb +120 -0
- data/spec/filters/bugs/file.rb +48 -0
- data/spec/filters/bugs/float.rb +74 -0
- data/spec/filters/bugs/hash.rb +60 -0
- data/spec/filters/bugs/integer.rb +78 -0
- data/spec/filters/bugs/io.rb +9 -0
- data/spec/filters/bugs/kernel.rb +401 -0
- data/spec/filters/bugs/language.rb +451 -0
- data/spec/filters/bugs/marshal.rb +50 -0
- data/spec/filters/bugs/math.rb +4 -0
- data/spec/filters/bugs/method.rb +79 -0
- data/spec/filters/bugs/module.rb +281 -0
- data/spec/filters/bugs/nilclass.rb +4 -0
- data/spec/filters/bugs/numeric.rb +27 -0
- data/spec/filters/bugs/openstruct.rb +8 -0
- data/spec/filters/bugs/pack_unpack.rb +138 -0
- data/spec/filters/bugs/pathname.rb +9 -0
- data/spec/filters/bugs/proc.rb +80 -0
- data/spec/filters/bugs/random.rb +20 -0
- data/spec/filters/bugs/range.rb +139 -0
- data/spec/filters/bugs/rational.rb +12 -0
- data/spec/filters/bugs/regexp.rb +91 -0
- data/spec/filters/bugs/set.rb +51 -0
- data/spec/filters/bugs/singleton.rb +7 -0
- data/spec/filters/bugs/string.rb +341 -0
- data/spec/filters/bugs/stringscanner.rb +78 -0
- data/spec/filters/bugs/struct.rb +26 -0
- data/spec/filters/bugs/symbol.rb +7 -0
- data/spec/filters/bugs/time.rb +109 -0
- data/spec/filters/bugs/unboundmethod.rb +33 -0
- data/spec/filters/bugs/warnings.rb +30 -0
- data/spec/filters/unsupported/array.rb +168 -0
- data/spec/filters/unsupported/basicobject.rb +15 -0
- data/spec/filters/unsupported/bignum.rb +55 -0
- data/spec/filters/unsupported/class.rb +5 -0
- data/spec/filters/unsupported/delegator.rb +6 -0
- data/spec/filters/unsupported/enumerable.rb +12 -0
- data/spec/filters/unsupported/enumerator.rb +14 -0
- data/spec/filters/unsupported/file.rb +4 -0
- data/spec/filters/unsupported/fixnum.rb +15 -0
- data/spec/filters/unsupported/float.rb +47 -0
- data/spec/filters/unsupported/freeze.rb +259 -0
- data/spec/filters/unsupported/hash.rb +44 -0
- data/spec/filters/unsupported/integer.rb +101 -0
- data/spec/filters/unsupported/kernel.rb +35 -0
- data/spec/filters/unsupported/language.rb +25 -0
- data/spec/filters/unsupported/marshal.rb +44 -0
- data/spec/filters/unsupported/matchdata.rb +63 -0
- data/spec/filters/unsupported/math.rb +4 -0
- data/spec/filters/unsupported/pathname.rb +4 -0
- data/spec/filters/unsupported/privacy.rb +287 -0
- data/spec/filters/unsupported/proc.rb +4 -0
- data/spec/filters/unsupported/random.rb +5 -0
- data/spec/filters/unsupported/range.rb +8 -0
- data/spec/filters/unsupported/regexp.rb +70 -0
- data/spec/filters/unsupported/set.rb +5 -0
- data/spec/filters/unsupported/singleton.rb +7 -0
- data/spec/filters/unsupported/string.rb +687 -0
- data/spec/filters/unsupported/struct.rb +7 -0
- data/spec/filters/unsupported/symbol.rb +21 -0
- data/spec/filters/unsupported/taint.rb +162 -0
- data/spec/filters/unsupported/thread.rb +10 -0
- data/spec/filters/unsupported/time.rb +204 -0
- data/spec/filters/unsupported/usage_of_files.rb +262 -0
- data/spec/lib/builder_processors_spec.rb +44 -0
- data/spec/lib/builder_spec.rb +133 -0
- data/spec/lib/cli_runners/server_spec.rb +25 -0
- data/spec/lib/cli_runners_spec.rb +16 -0
- data/spec/lib/cli_spec.rb +256 -0
- data/spec/lib/compiler_spec.rb +693 -0
- data/spec/lib/config_spec.rb +112 -0
- data/spec/lib/dependency_resolver_spec.rb +43 -0
- data/spec/lib/deprecations_spec.rb +17 -0
- data/spec/lib/fixtures/complex_sprockets.js.rb.erb +4 -0
- data/spec/lib/fixtures/file_with_directives.js +2 -0
- data/spec/lib/fixtures/jst_file.js.jst +1 -0
- data/spec/lib/fixtures/no_requires.rb +1 -0
- data/spec/lib/fixtures/opal_file.rb +2 -0
- data/spec/lib/fixtures/require_tree_test.rb +3 -0
- data/spec/lib/fixtures/required_file.js +1 -0
- data/spec/lib/fixtures/required_tree_test/required_file1.rb +1 -0
- data/spec/lib/fixtures/required_tree_test/required_file2.rb +1 -0
- data/spec/lib/fixtures/requires.rb +7 -0
- data/spec/lib/fixtures/source_location_test.rb +7 -0
- data/spec/lib/fixtures/source_map.rb +1 -0
- data/spec/lib/fixtures/source_map/subfolder/other_file.rb +1 -0
- data/spec/lib/fixtures/sprockets_file.js.rb +3 -0
- data/spec/lib/fixtures/sprockets_require_tree_test.rb +3 -0
- data/spec/lib/path_reader_spec.rb +47 -0
- data/spec/lib/paths_spec.rb +18 -0
- data/spec/lib/repl_spec.rb +28 -0
- data/spec/lib/rewriters/base_spec.rb +68 -0
- data/spec/lib/rewriters/binary_operator_assignment_spec.rb +153 -0
- data/spec/lib/rewriters/block_to_iter_spec.rb +28 -0
- data/spec/lib/rewriters/dot_js_syntax_spec.rb +108 -0
- data/spec/lib/rewriters/explicit_writer_return_spec.rb +186 -0
- data/spec/lib/rewriters/for_rewriter_spec.rb +92 -0
- data/spec/lib/rewriters/hashes/key_duplicates_rewriter_spec.rb +47 -0
- data/spec/lib/rewriters/js_reserved_words_spec.rb +119 -0
- data/spec/lib/rewriters/logical_operator_assignment_spec.rb +202 -0
- data/spec/lib/rewriters/opal_engine_check_spec.rb +84 -0
- data/spec/lib/rewriters/returnable_logic_spec.rb +52 -0
- data/spec/lib/rewriters/rubyspec/filters_rewriter_spec.rb +59 -0
- data/spec/lib/simple_server_spec.rb +56 -0
- data/spec/lib/source_map/file_spec.rb +67 -0
- data/spec/lib/source_map/index_spec.rb +80 -0
- data/spec/lib/spec_helper.rb +105 -0
- data/spec/mspec-opal/formatters.rb +197 -0
- data/spec/mspec-opal/runner.rb +172 -0
- data/spec/opal/compiler/irb_spec.rb +44 -0
- data/spec/opal/compiler/unicode_spec.rb +10 -0
- data/spec/opal/core/array/dup_spec.rb +23 -0
- data/spec/opal/core/array/intersection_spec.rb +38 -0
- data/spec/opal/core/array/minus_spec.rb +38 -0
- data/spec/opal/core/array/union_spec.rb +38 -0
- data/spec/opal/core/array/uniq_spec.rb +49 -0
- data/spec/opal/core/class/inherited_spec.rb +18 -0
- data/spec/opal/core/enumerable/all_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/any_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/collect_break_spec.rb +13 -0
- data/spec/opal/core/enumerable/count_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/detect_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/drop_while_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/each_slice_break_spec.rb +6 -0
- data/spec/opal/core/enumerable/each_with_index_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/each_with_object_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/find_all_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/find_index_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/grep_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/max_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/max_by_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/min_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/min_by_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/none_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/one_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/reduce_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/take_while_break_spec.rb +5 -0
- data/spec/opal/core/enumerator/with_index_spec.rb +6 -0
- data/spec/opal/core/exception_spec.rb +8 -0
- data/spec/opal/core/fixtures/require_tree_files/file 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 3.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 4.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 5.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/other/other 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
- data/spec/opal/core/hash/internals_spec.rb +339 -0
- data/spec/opal/core/helpers_spec.rb +14 -0
- data/spec/opal/core/iterable_props_spec.rb +53 -0
- data/spec/opal/core/kernel/at_exit_spec.rb +70 -0
- data/spec/opal/core/kernel/freeze_spec.rb +15 -0
- data/spec/opal/core/kernel/instance_variables_spec.rb +110 -0
- data/spec/opal/core/kernel/methods_spec.rb +25 -0
- data/spec/opal/core/kernel/public_methods_spec.rb +25 -0
- data/spec/opal/core/kernel/require_tree_spec.rb +18 -0
- data/spec/opal/core/kernel/respond_to_spec.rb +15 -0
- data/spec/opal/core/language/DATA/characters_support_spec.rb +9 -0
- data/spec/opal/core/language/DATA/empty___END___spec.rb +7 -0
- data/spec/opal/core/language/DATA/multiple___END___spec.rb +10 -0
- data/spec/opal/core/language/arguments/mlhs_arg_spec.rb +18 -0
- data/spec/opal/core/language/keyword_arguments_spec.rb +9 -0
- data/spec/opal/core/language/numblocks_spec.rb +16 -0
- data/spec/opal/core/language/safe_navigator_spec.rb +7 -0
- data/spec/opal/core/language/while_spec.rb +31 -0
- data/spec/opal/core/language_spec.rb +29 -0
- data/spec/opal/core/marshal/dump_spec.rb +81 -0
- data/spec/opal/core/marshal/load_spec.rb +13 -0
- data/spec/opal/core/module_spec.rb +27 -0
- data/spec/opal/core/object_id_spec.rb +56 -0
- data/spec/opal/core/regexp/interpolation_spec.rb +40 -0
- data/spec/opal/core/regexp/match_spec.rb +78 -0
- data/spec/opal/core/runtime/bridged_classes_spec.rb +123 -0
- data/spec/opal/core/runtime/constants_spec.rb +16 -0
- data/spec/opal/core/runtime/eval_spec.rb +5 -0
- data/spec/opal/core/runtime/exit_spec.rb +29 -0
- data/spec/opal/core/runtime/is_a_spec.rb +48 -0
- data/spec/opal/core/runtime/loaded_spec.rb +20 -0
- data/spec/opal/core/runtime/main_methods_spec.rb +39 -0
- data/spec/opal/core/runtime/method_missing_spec.rb +68 -0
- data/spec/opal/core/runtime/rescue_spec.rb +37 -0
- data/spec/opal/core/runtime/string_spec.rb +25 -0
- data/spec/opal/core/runtime/truthy_spec.rb +61 -0
- data/spec/opal/core/runtime_spec.rb +58 -0
- data/spec/opal/core/string/each_byte_spec.rb +19 -0
- data/spec/opal/core/string/gsub_spec.rb +35 -0
- data/spec/opal/core/string/to_sym_spec.rb +9 -0
- data/spec/opal/core/string_spec.rb +28 -0
- data/spec/opal/core/struct/dup_spec.rb +11 -0
- data/spec/opal/core/time_spec.rb +68 -0
- data/spec/opal/stdlib/erb/erb_spec.rb +30 -0
- data/spec/opal/stdlib/erb/inline_block.opalerb +3 -0
- data/spec/opal/stdlib/erb/quoted.opalerb +1 -0
- data/spec/opal/stdlib/erb/simple.opalerb +1 -0
- data/spec/opal/stdlib/js_spec.rb +72 -0
- data/spec/opal/stdlib/json/ext_spec.rb +55 -0
- data/spec/opal/stdlib/json/parse_spec.rb +37 -0
- data/spec/opal/stdlib/logger/logger_spec.rb +308 -0
- data/spec/opal/stdlib/native/alias_native_spec.rb +27 -0
- data/spec/opal/stdlib/native/array_spec.rb +11 -0
- data/spec/opal/stdlib/native/date_spec.rb +12 -0
- data/spec/opal/stdlib/native/deprecated_include_spec.rb +8 -0
- data/spec/opal/stdlib/native/each_spec.rb +13 -0
- data/spec/opal/stdlib/native/element_reference_spec.rb +16 -0
- data/spec/opal/stdlib/native/exposure_spec.rb +33 -0
- data/spec/opal/stdlib/native/ext_spec.rb +19 -0
- data/spec/opal/stdlib/native/hash_spec.rb +67 -0
- data/spec/opal/stdlib/native/initialize_spec.rb +17 -0
- data/spec/opal/stdlib/native/method_missing_spec.rb +51 -0
- data/spec/opal/stdlib/native/native_alias_spec.rb +26 -0
- data/spec/opal/stdlib/native/native_class_spec.rb +18 -0
- data/spec/opal/stdlib/native/native_module_spec.rb +13 -0
- data/spec/opal/stdlib/native/native_reader_spec.rb +22 -0
- data/spec/opal/stdlib/native/native_writer_spec.rb +30 -0
- data/spec/opal/stdlib/native/new_spec.rb +92 -0
- data/spec/opal/stdlib/native/struct_spec.rb +12 -0
- data/spec/opal/stdlib/pp_spec.rb +5 -0
- data/spec/opal/stdlib/promise/always_spec.rb +49 -0
- data/spec/opal/stdlib/promise/error_spec.rb +15 -0
- data/spec/opal/stdlib/promise/rescue_spec.rb +53 -0
- data/spec/opal/stdlib/promise/then_spec.rb +79 -0
- data/spec/opal/stdlib/promise/trace_spec.rb +51 -0
- data/spec/opal/stdlib/promise/value_spec.rb +15 -0
- data/spec/opal/stdlib/promise/when_spec.rb +34 -0
- data/spec/opal/stdlib/source_map_spec.rb +8 -0
- data/spec/opal/stdlib/strscan/scan_spec.rb +11 -0
- data/spec/opal/stdlib/template/paths_spec.rb +10 -0
- data/spec/opal/stdlib/thread/mutex_spec.rb +40 -0
- data/spec/opal/stdlib/thread/thread_queue_spec.rb +32 -0
- data/spec/opal/stdlib/thread/thread_spec.rb +60 -0
- data/spec/ruby_specs +183 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/support/guard_platform.rb +4 -0
- data/spec/support/match_helpers.rb +57 -0
- data/spec/support/mspec_rspec_adapter.rb +33 -0
- data/spec/support/rewriters_helper.rb +54 -0
- data/spec/support/source_map_helper.rb +190 -0
- data/stdlib/base64.rb +2 -2
- data/stdlib/bigdecimal.rb +15 -3
- data/stdlib/bigdecimal/bignumber.js.rb +1 -1
- data/stdlib/bigdecimal/util.rb +148 -0
- data/stdlib/delegate.rb +8 -0
- data/stdlib/nodejs/fileutils.rb +1 -1
- data/stdlib/nodejs/kernel.rb +0 -13
- data/stdlib/nodejs/stacktrace.rb +4 -179
- data/stdlib/ostruct.rb +5 -0
- data/stdlib/pp.rb +586 -19
- data/stdlib/prettyprint.rb +556 -0
- data/stdlib/rbconfig/sizeof.rb +2 -0
- data/stdlib/securerandom.rb +32 -0
- data/stdlib/set.rb +36 -0
- data/stdlib/strscan.rb +15 -0
- data/tasks/benchmarking.rake +1 -1
- data/tasks/linting.rake +3 -5
- data/tasks/releasing.rake +2 -5
- data/tasks/testing.rake +16 -11
- data/tasks/testing/mspec_special_calls.rb +1 -19
- data/test/nodejs/fixtures/cat.png +0 -0
- data/test/nodejs/fixtures/hello.rb +1 -0
- data/test/nodejs/fixtures/iso88591.txt +1 -0
- data/test/nodejs/fixtures/utf8.txt +1 -0
- data/test/nodejs/fixtures/win1258.txt +1 -0
- data/test/nodejs/test_dir.rb +39 -0
- data/test/nodejs/test_env.rb +62 -0
- data/test/nodejs/test_error.rb +29 -0
- data/test/nodejs/test_file.rb +206 -0
- data/test/nodejs/test_file_encoding.rb +20 -0
- data/test/nodejs/test_io.rb +18 -0
- data/test/nodejs/test_opal_builder.rb +12 -0
- data/test/nodejs/test_pathname.rb +16 -0
- data/test/opal/cat.png +0 -0
- data/test/opal/http_server.rb +52 -0
- data/test/opal/test_base64.rb +115 -0
- data/test/opal/test_keyword.rb +590 -0
- data/test/opal/test_matrix.rb +661 -0
- data/test/opal/test_openuri.rb +53 -0
- data/test/opal/unsupported_and_bugs.rb +39 -0
- data/yarn.lock +1355 -0
- metadata +905 -40
- data/.travis.yml +0 -109
- data/appveyor.yml +0 -35
- data/lib/opal/nodes/runtime_helpers.rb +0 -51
- data/opal/corelib/random/MersenneTwister.js +0 -137
- data/opal/corelib/random/mersenne_twister.js.rb +0 -13
- data/stdlib/bigdecimal/kernel.rb +0 -5
@@ -0,0 +1,78 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "StringScanner" do
|
3
|
+
fails "StringScanner#<< concatenates the given argument to self and returns self"
|
4
|
+
fails "StringScanner#<< raises a TypeError if the given argument can't be converted to a String"
|
5
|
+
fails "StringScanner#<< when passed a Fixnum doesn't call to_int on the argument"
|
6
|
+
fails "StringScanner#<< when passed a Fixnum raises a TypeError"
|
7
|
+
fails "StringScanner#<< when passed an Integer doesn't call to_int on the argument" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:0x28c>)
|
8
|
+
fails "StringScanner#<< when passed an Integer raises a TypeError" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:0x290>)
|
9
|
+
fails "StringScanner#[] raises a IndexError when there's no named capture"
|
10
|
+
fails "StringScanner#[] returns named capture"
|
11
|
+
fails "StringScanner#clear set the scan pointer to the end of the string and clear matching data."
|
12
|
+
fails "StringScanner#clear warns in verbose mode that the method is obsolete"
|
13
|
+
fails "StringScanner#concat concatenates the given argument to self and returns self"
|
14
|
+
fails "StringScanner#concat raises a TypeError if the given argument can't be converted to a String"
|
15
|
+
fails "StringScanner#concat when passed a Fixnum doesn't call to_int on the argument"
|
16
|
+
fails "StringScanner#concat when passed a Fixnum raises a TypeError"
|
17
|
+
fails "StringScanner#concat when passed an Integer doesn't call to_int on the argument" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:0x362>)
|
18
|
+
fails "StringScanner#concat when passed an Integer raises a TypeError" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:0x366>)
|
19
|
+
fails "StringScanner#dup copies previous match state"
|
20
|
+
fails "StringScanner#empty? returns false if the scan pointer is not at the end of the string" # NoMethodError: undefined method `empty?' for #<StringScanner:0x726>
|
21
|
+
fails "StringScanner#empty? returns true if the scan pointer is at the end of the string" # NoMethodError: undefined method `empty?' for #<StringScanner:0x72a>
|
22
|
+
fails "StringScanner#empty? warns in verbose mode that the method is obsolete"
|
23
|
+
fails "StringScanner#getbyte is not multi-byte character sensitive"
|
24
|
+
fails "StringScanner#getbyte returns an instance of String when passed a String subclass"
|
25
|
+
fails "StringScanner#getbyte returns nil at the end of the string"
|
26
|
+
fails "StringScanner#getbyte scans one byte and returns it"
|
27
|
+
fails "StringScanner#getbyte warns in verbose mode that the method is obsolete"
|
28
|
+
fails "StringScanner#getch is multi-byte character sensitive"
|
29
|
+
fails "StringScanner#initialize converts the argument into a string using #to_str"
|
30
|
+
fails "StringScanner#inspect returns a string that represents the StringScanner object"
|
31
|
+
fails "StringScanner#matched returns the last matched string"
|
32
|
+
fails "StringScanner#matched? returns false if there's no match"
|
33
|
+
fails "StringScanner#matched? returns true if the last match was successful"
|
34
|
+
fails "StringScanner#peek raises a ArgumentError when the passed argument is negative"
|
35
|
+
fails "StringScanner#peek raises a RangeError when the passed argument is a Bignum"
|
36
|
+
fails "StringScanner#peek returns at most the specified number of bytes from the current position" # Expected "ét" to equal "é"
|
37
|
+
fails "StringScanner#peep raises a ArgumentError when the passed argument is negative"
|
38
|
+
fails "StringScanner#peep raises a RangeError when the passed argument is a Bignum"
|
39
|
+
fails "StringScanner#peep returns an empty string when the passed argument is zero"
|
40
|
+
fails "StringScanner#peep returns an instance of String when passed a String subclass"
|
41
|
+
fails "StringScanner#peep returns at most the specified number of bytes from the current position" # NoMethodError: undefined method `peep' for #<StringScanner:0x590>
|
42
|
+
fails "StringScanner#peep returns at most the specified number of characters from the current position"
|
43
|
+
fails "StringScanner#peep warns in verbose mode that the method is obsolete"
|
44
|
+
fails "StringScanner#pointer returns 0 in the reset position"
|
45
|
+
fails "StringScanner#pointer returns the length of the string in the terminate position"
|
46
|
+
fails "StringScanner#pointer returns the position of the scan pointer"
|
47
|
+
fails "StringScanner#pointer= modify the scan pointer"
|
48
|
+
fails "StringScanner#pointer= positions from the end if the argument is negative"
|
49
|
+
fails "StringScanner#pointer= raises a RangeError if position too far backward"
|
50
|
+
fails "StringScanner#pointer= raises a RangeError when the passed argument is out of range"
|
51
|
+
fails "StringScanner#pos returns the position of the scan pointer"
|
52
|
+
fails "StringScanner#pos= raises a RangeError if position too far backward"
|
53
|
+
fails "StringScanner#pos= raises a RangeError when the passed argument is out of range"
|
54
|
+
fails "StringScanner#restsize is equivalent to rest.size"
|
55
|
+
fails "StringScanner#restsize returns the length of the rest of the string" # NoMethodError: undefined method `restsize' for #<StringScanner:0x4a4>
|
56
|
+
fails "StringScanner#restsize warns in verbose mode that the method is obsolete"
|
57
|
+
fails "StringScanner#scan raises a TypeError if pattern is a String" # Expected TypeError but no exception was raised (nil was returned)
|
58
|
+
fails "StringScanner#scan raises a TypeError if pattern isn't a Regexp nor String" # Expected TypeError but no exception was raised (nil was returned)
|
59
|
+
fails "StringScanner#scan raises a TypeError if pattern isn't a Regexp"
|
60
|
+
fails "StringScanner#scan treats String as the pattern itself" # Expected nil == "This" to be truthy but was false
|
61
|
+
fails "StringScanner#scan with fixed_anchor: true returns the matched string" # ArgumentError: [StringScanner#initialize] wrong number of arguments(2 for 1)
|
62
|
+
fails "StringScanner#scan with fixed_anchor: true treats \\A as matching from the beginning of string" # ArgumentError: [StringScanner#initialize] wrong number of arguments(2 for 1)
|
63
|
+
fails "StringScanner#scan with fixed_anchor: true treats ^ as matching from the beginning of line" # ArgumentError: [StringScanner#initialize] wrong number of arguments(2 for 1)
|
64
|
+
fails "StringScanner#scan_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true"
|
65
|
+
fails "StringScanner#scan_full returns the matched string if the third argument is true"
|
66
|
+
fails "StringScanner#scan_full returns the number of bytes advanced and advances the scan pointer if the second argument is true"
|
67
|
+
fails "StringScanner#scan_full returns the number of bytes advanced"
|
68
|
+
fails "StringScanner#search_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true"
|
69
|
+
fails "StringScanner#search_full returns the matched string if the third argument is true"
|
70
|
+
fails "StringScanner#search_full returns the number of bytes advanced and advances the scan pointer if the second argument is true"
|
71
|
+
fails "StringScanner#search_full returns the number of bytes advanced"
|
72
|
+
fails "StringScanner#string returns the string being scanned"
|
73
|
+
fails "StringScanner#string= changes the string being scanned to the argument and resets the scanner"
|
74
|
+
fails "StringScanner#string= converts the argument into a string using #to_str"
|
75
|
+
fails "StringScanner#unscan raises a ScanError when the previous match had failed"
|
76
|
+
fails "StringScanner#unscan set the scan pointer to the previous position"
|
77
|
+
fails "StringScanner.must_C_version returns self"
|
78
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Struct" do
|
3
|
+
fails "Struct#deconstruct returns an array of attribute values" # NoMethodError: undefined method `deconstruct' for #<struct x=1, y=2>
|
4
|
+
fails "Struct#deconstruct_keys accepts argument position number as well but returns them as keys" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=10, y=20, z=30>
|
5
|
+
fails "Struct#deconstruct_keys accepts nil argument and return all the attributes" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
|
6
|
+
fails "Struct#deconstruct_keys accepts string attribute names" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
|
7
|
+
fails "Struct#deconstruct_keys raise TypeError if passed anything accept nil or array" # Expected TypeError (/expected Array or nil/) but got: NoMethodError (undefined method `deconstruct_keys' for #<struct x=1, y=2>)
|
8
|
+
fails "Struct#deconstruct_keys requires one argument" # Expected ArgumentError (/wrong number of arguments \(given 0, expected 1\)/) but got: NoMethodError (undefined method `deconstruct_keys' for #<struct x=1>)
|
9
|
+
fails "Struct#deconstruct_keys returns a hash of attributes" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
|
10
|
+
fails "Struct#deconstruct_keys returns an empty hash when there are more keys than attributes" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
|
11
|
+
fails "Struct#deconstruct_keys returns at first not existing attribute name" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
|
12
|
+
fails "Struct#deconstruct_keys returns only specified keys" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2, z=3>
|
13
|
+
fails "Struct#hash returns different hashes for structs with different values when using keyword_init: true" # NameError: wrong constant name 1 non symbol member
|
14
|
+
fails "Struct#hash returns different hashes for structs with different values" # Expected "Hash" == "Hash" to be falsy but was true
|
15
|
+
fails "Struct#hash returns the same fixnum for structs with the same content"
|
16
|
+
fails "Struct#hash returns the same integer for structs with the same content" # Expected "Hash" (String) to be kind of Integer
|
17
|
+
fails "Struct#to_h with block coerces returned pair to Array with #to_ary" # Expected {"make"=>nil, "model"=>nil, "year"=>nil} == {"b"=>"b"} to be truthy but was false
|
18
|
+
fails "Struct#to_h with block converts [key, value] pairs returned by the block to a hash" # Expected {"make"=>"Ford", "model"=>"Ranger", "year"=>nil} == {"make"=>"ford", "model"=>"ranger", "year"=>""} to be truthy but was false
|
19
|
+
fails "Struct#to_h with block does not coerce returned pair to Array with #to_a" # Expected TypeError (/wrong element type MockObject/) but no exception was raised ({"make"=>nil, "model"=>nil, "year"=>nil} was returned)
|
20
|
+
fails "Struct#to_h with block raises ArgumentError if block returns longer or shorter array" # Expected ArgumentError (/element has wrong array length/) but no exception was raised ({"make"=>nil, "model"=>nil, "year"=>nil} was returned)
|
21
|
+
fails "Struct#to_h with block raises TypeError if block returns something other than Array" # Expected TypeError (/wrong element type String/) but no exception was raised ({"make"=>nil, "model"=>nil, "year"=>nil} was returned)
|
22
|
+
fails "Struct-based class#dup retains an included module in the ancestor chain for the struct's singleton class"
|
23
|
+
fails "Struct.new keyword_init: true option raises when there is a duplicate member" # Expected ArgumentError (duplicate member: foo) but no exception was raised (#<Class:0x294> was returned)
|
24
|
+
fails "Struct.new raises ArgumentError when there is a duplicate member" # Expected ArgumentError (duplicate member: foo) but no exception was raised (#<Class:0x256> was returned)
|
25
|
+
fails "Struct.new raises a ArgumentError if passed a Hash with an unknown key" # Just like "def m(a: nil); end; m(b: nil)" doesn't raise an error. That's a bug in the handling of kwargs
|
26
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Symbol" do
|
3
|
+
fails "Symbol#to_proc produces a Proc that always returns [[:req], [:rest]] for #parameters" # Expected [["rest", "args"], ["block", "block"]] == [["req"], ["rest"]] to be truthy but was false
|
4
|
+
fails "Symbol#to_proc produces a Proc that always returns [[:rest]] for #parameters" # Expected [["rest", "args"], ["block", "block"]] == [["rest"]] to be truthy but was false
|
5
|
+
fails "Symbol#to_proc produces a Proc with arity -2" # Expected -1 == -2 to be truthy but was false
|
6
|
+
fails "Symbol#to_proc returns a Proc with #lambda? true" # Expected #<Proc:0xd6f0>.lambda? to be truthy but was false
|
7
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Time" do
|
3
|
+
fails "Time#+ zone is a timezone object preserves time zone" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
4
|
+
fails "Time#- tracks microseconds from a Rational" # Expected 0 to equal 123456
|
5
|
+
fails "Time#- zone is a timezone object preserves time zone" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
6
|
+
fails "Time#ceil ceils to 0 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
7
|
+
fails "Time#ceil ceils to 2 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
8
|
+
fails "Time#ceil ceils to 4 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
9
|
+
fails "Time#ceil ceils to 7 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
10
|
+
fails "Time#ceil copies own timezone to the returning value" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
11
|
+
fails "Time#ceil defaults to ceiling to 0 places" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
12
|
+
fails "Time#ceil returns an instance of Time, even if #ceil is called on a subclass" # Expected Time to be identical to #<Class:0x38c06>
|
13
|
+
fails "Time#dup returns a clone of Time instance"
|
14
|
+
fails "Time#floor copies own timezone to the returning value" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
15
|
+
fails "Time#floor defaults to flooring to 0 places" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
16
|
+
fails "Time#floor floors to 0 decimal places with an explicit argument" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
17
|
+
fails "Time#floor floors to 7 decimal places with an explicit argument" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
18
|
+
fails "Time#floor returns an instance of Time, even if #floor is called on a subclass" # Expected Time to be identical to #<Class:0x188fa>
|
19
|
+
fails "Time#getlocal raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
|
20
|
+
fails "Time#getlocal with a timezone argument accepts timezone argument that must have #local_to_utc and #utc_to_local methods" # Expected to not get Exception but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
21
|
+
fails "Time#getlocal with a timezone argument does not raise exception if timezone does not implement #local_to_utc method" # Expected to not get Exception but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
22
|
+
fails "Time#getlocal with a timezone argument raises TypeError if timezone does not implement #utc_to_local method" # Expected TypeError (/can't convert \w+ into an exact number/) but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
23
|
+
fails "Time#getlocal with a timezone argument returns a Time in the timezone" # NoMethodError: undefined method `getlocal' for 2000-01-01 12:00:00 UTC
|
24
|
+
fails "Time#getlocal with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object if passed zone name as a timezone argument" # NoMethodError: undefined method `getlocal' for 2000-01-01 12:00:00 UTC
|
25
|
+
fails "Time#getlocal with a timezone argument subject's class implements .find_timezone method does not call .find_timezone if passed any not string/numeric/timezone timezone argument" # Expected TypeError (/can't convert \w+ into an exact number/) but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
26
|
+
fails "Time#gmtime converts self to UTC, modifying the receiver" # Expected 2007-01-09 03:00:00 UTC to equal 2007-01-09 12:00:00 UTC
|
27
|
+
fails "Time#hash returns an Integer" # Expected "Time:100000" (String) to be an instance of Integer
|
28
|
+
fails "Time#inspect formats nanoseconds as a Rational" # NoMethodError: undefined method `nsec' for 2007-11-01 15:25:00 UTC
|
29
|
+
fails "Time#inspect formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
|
30
|
+
fails "Time#inspect formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'" # Expected "2000-01-01 20:15:01 +1200" to equal "2000-01-01 20:15:01 +0100"
|
31
|
+
fails "Time#inspect preserves milliseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.123456 UTC" to be truthy but was false
|
32
|
+
fails "Time#localtime raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
|
33
|
+
fails "Time#nsec returns a positive value for dates before the epoch" # NoMethodError: undefined method `nsec' for 1969-11-12 13:18:57 UTC
|
34
|
+
fails "Time#round copies own timezone to the returning value"
|
35
|
+
fails "Time#round defaults to rounding to 0 places"
|
36
|
+
fails "Time#round returns an instance of Time, even if #round is called on a subclass"
|
37
|
+
fails "Time#round rounds to 0 decimal places with an explicit argument"
|
38
|
+
fails "Time#round rounds to 7 decimal places with an explicit argument"
|
39
|
+
fails "Time#strftime rounds an offset to the nearest second when formatting with %z"
|
40
|
+
fails "Time#strftime should be able to print the commercial year with leading zeroes"
|
41
|
+
fails "Time#strftime should be able to print the commercial year with only two digits"
|
42
|
+
fails "Time#strftime should be able to show the commercial week day"
|
43
|
+
fails "Time#strftime should be able to show the number of seconds since the unix epoch" # fails under FIJI et al TZs
|
44
|
+
fails "Time#strftime should be able to show the timezone if available"
|
45
|
+
fails "Time#strftime should be able to show the timezone of the date with a : separator"
|
46
|
+
fails "Time#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)"
|
47
|
+
fails "Time#strftime with %N formats the microseconds of the second with %6N"
|
48
|
+
fails "Time#strftime with %N formats the milliseconds of the second with %3N"
|
49
|
+
fails "Time#strftime with %N formats the nanoseconds of the second with %9N"
|
50
|
+
fails "Time#strftime with %N formats the nanoseconds of the second with %N"
|
51
|
+
fails "Time#strftime with %N formats the picoseconds of the second with %12N"
|
52
|
+
fails "Time#subsec returns 0 as an Integer for a Time with a whole number of seconds" # NoMethodError: undefined method `subsec' for 1970-01-01 01:01:40 +0100
|
53
|
+
fails "Time#succ is obsolete" # Expected warning to match: /Time#succ is obsolete/ but got: ""
|
54
|
+
fails "Time#to_f returns the float number of seconds + usecs since the epoch"
|
55
|
+
fails "Time#to_i rounds fractional seconds toward zero" # Expected -315619200 == -315619199 to be truthy but was false
|
56
|
+
fails "Time#to_s formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
|
57
|
+
fails "Time#to_s formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'" # Expected "2000-01-01 20:15:01 +1200" to equal "2000-01-01 20:15:01 +0100"
|
58
|
+
fails "Time#tv_sec rounds fractional seconds toward zero" # Expected -315619200 == -315619199 to be truthy but was false
|
59
|
+
fails "Time#usec returns a positive value for dates before the epoch" # Expected 0 to equal 404240
|
60
|
+
fails "Time#utc converts self to UTC, modifying the receiver" # Expected 2007-01-09 03:00:00 UTC to equal 2007-01-09 12:00:00 UTC
|
61
|
+
fails "Time#zone Encoding.default_internal is set returns an ASCII string"
|
62
|
+
fails "Time#zone defaults to UTC when bad zones given" # Expected 3600 to equal 0
|
63
|
+
fails "Time.at :in keyword argument could be UTC offset as a String in '+HH:MM or '-HH:MM' format" # TypeError: no implicit conversion of Hash into Integer
|
64
|
+
fails "Time.at :in keyword argument could be UTC offset as a number of seconds" # TypeError: no implicit conversion of Hash into Integer
|
65
|
+
fails "Time.at :in keyword argument could be a timezone object" # TypeError: no implicit conversion of Hash into Integer
|
66
|
+
fails "Time.at passed Numeric passed BigDecimal doesn't round input value"
|
67
|
+
fails "Time.at passed Numeric roundtrips a Rational produced by #to_r"
|
68
|
+
fails "Time.at passed [Time, Numeric, format] :microsecond format traits second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
69
|
+
fails "Time.at passed [Time, Numeric, format] :microsecond format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
70
|
+
fails "Time.at passed [Time, Numeric, format] :millisecond format traits second argument as milliseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
71
|
+
fails "Time.at passed [Time, Numeric, format] :millisecond format treats second argument as milliseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
72
|
+
fails "Time.at passed [Time, Numeric, format] :nanosecond format traits second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
73
|
+
fails "Time.at passed [Time, Numeric, format] :nanosecond format treats second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
74
|
+
fails "Time.at passed [Time, Numeric, format] :nsec format traits second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
75
|
+
fails "Time.at passed [Time, Numeric, format] :nsec format treats second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
76
|
+
fails "Time.at passed [Time, Numeric, format] :usec format traits second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
77
|
+
fails "Time.at passed [Time, Numeric, format] :usec format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
78
|
+
fails "Time.at passed [Time, Numeric, format] supports Float second argument" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
|
79
|
+
fails "Time.at passed non-Time, non-Numeric with an argument that responds to #to_r needs for the argument to respond to #to_int too" # Mock 'rational-but-no-to_int' expected to receive to_r("any_args") exactly 1 times but received it 0 times
|
80
|
+
fails "Time.gm handles fractional usec close to rounding limit" # NoMethodError: undefined method `nsec' for 2000-01-01 12:30:00 UTC:Time
|
81
|
+
fails "Time.gm raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 UTC was returned)
|
82
|
+
fails "Time.local raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 +0200 was returned)
|
83
|
+
fails "Time.mktime raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 +0200 was returned)
|
84
|
+
fails "Time.new has at least microsecond precision" # NoMethodError: undefined method `nsec' for 2019-05-16 23:25:01 +0200
|
85
|
+
fails "Time.new uses the local timezone" # Expected 10800 to equal -28800
|
86
|
+
fails "Time.new with a timezone argument #name method cannot marshal Time if #name method isn't implemented" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
87
|
+
fails "Time.new with a timezone argument #name method uses the optional #name method for marshaling" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
88
|
+
fails "Time.new with a timezone argument Time-like argument of #utc_to_local and #local_to_utc methods has attribute values the same as a Time object in UTC" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
89
|
+
fails "Time.new with a timezone argument Time-like argument of #utc_to_local and #local_to_utc methods implements subset of Time methods" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
90
|
+
fails "Time.new with a timezone argument accepts timezone argument that must have #local_to_utc and #utc_to_local methods" # Expected to not get Exception but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
91
|
+
fails "Time.new with a timezone argument does not raise exception if timezone does not implement #utc_to_local method" # Expected to not get Exception but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
92
|
+
fails "Time.new with a timezone argument raises TypeError if timezone does not implement #local_to_utc method" # Expected TypeError (/can't convert \w+ into an exact number/) but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
93
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could be Time instance" # Expected to not get Exception but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
94
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could be Time subclass instance" # Expected to not get Exception but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
95
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could be any object with #to_i method" # Expected to not get Exception but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
96
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could have any #zone and #utc_offset because they are ignored" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
97
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods leads to raising Argument error if difference between argument and result is too large" # Expected ArgumentError (utc_offset out of range) but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
98
|
+
fails "Time.new with a timezone argument returns a Time in the timezone" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
99
|
+
fails "Time.new with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object at loading marshaled data" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
100
|
+
fails "Time.new with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object if passed zone name as a timezone argument" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
101
|
+
fails "Time.new with a timezone argument subject's class implements .find_timezone method does not call .find_timezone if passed any not string/numeric/timezone timezone argument" # Expected TypeError (/can't convert \w+ into an exact number/) but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
102
|
+
fails "Time.new with a timezone argument the #abbr method is used by '%Z' in #strftime" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
103
|
+
fails "Time.new with a utc_offset argument raises ArgumentError if the month is greater than 12" # Expected ArgumentError (/(mon|argument) out of range/) but got: ArgumentError (Opal does not support explicitly specifying UTC offset for Time)
|
104
|
+
fails "Time.new with a utc_offset argument returns a Time with a UTC offset specified as +HH:MM:SS" # ArgumentError: Opal does not support explicitly specifying UTC offset for Time
|
105
|
+
fails "Time.now has at least microsecond precision" # NoMethodError: undefined method `nsec' for 2019-05-16 23:25:03 +0200
|
106
|
+
fails "Time.now uses the local timezone" # Expected 10800 to equal -28800
|
107
|
+
fails "Time.utc handles fractional usec close to rounding limit" # NoMethodError: undefined method `nsec' for 2000-01-01 12:30:00 UTC:Time
|
108
|
+
fails "Time.utc raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 UTC was returned)
|
109
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "UnboundMethod" do
|
3
|
+
fails "UnboundMethod#== returns true if both are aliases for a third method"
|
4
|
+
fails "UnboundMethod#== returns true if either is an alias for the other"
|
5
|
+
fails "UnboundMethod#== returns true if objects refer to the same method"
|
6
|
+
fails "UnboundMethod#== returns true if same method is extracted from the same subclass"
|
7
|
+
fails "UnboundMethod#arity for a Method generated by respond_to_missing? returns -1"
|
8
|
+
fails "UnboundMethod#bind returns Method returned for obj is equal to one directly returned by obj.method" # Expected #<Method: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)> to equal #<Method: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
9
|
+
fails "UnboundMethod#bind the returned Method is equal to the one directly returned by obj.method" # Expected #<Method: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)> to equal #<Method: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
10
|
+
fails "UnboundMethod#bind_call binds and calls a Kernel method retrieved from Object on BasicObject" # NoMethodError: undefined method `bind_call' for #<UnboundMethod: Object#instance_of? (defined in Kernel in <internal:corelib/kernel.rb>:253)>
|
11
|
+
fails "UnboundMethod#bind_call binds and calls a Parent's class method to any Child's class methods" # NoMethodError: undefined method `bind_call' for #<UnboundMethod: Class#class_method (defined in #<Class:UnboundMethodSpecs::Parent> in ruby/core/unboundmethod/fixtures/classes.rb:60)>
|
12
|
+
fails "UnboundMethod#bind_call binds and calls the method for any object kind_of? the Module the method is defined in" # NoMethodError: undefined method `bind_call' for #<UnboundMethod: UnboundMethodSpecs::Parent#foo (defined in UnboundMethodSpecs::Parent in ruby/core/unboundmethod/fixtures/classes.rb:59)>
|
13
|
+
fails "UnboundMethod#bind_call binds and calls the method if object is kind_of the Module the method defined in" # NoMethodError: undefined method `bind_call' for #<UnboundMethod: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
14
|
+
fails "UnboundMethod#bind_call binds and calls the method on any object when UnboundMethod is unbound from a module" # NoMethodError: undefined method `bind_call' for #<UnboundMethod: UnboundMethodSpecs::Mod#from_mod (defined in UnboundMethodSpecs::Mod in ruby/core/unboundmethod/fixtures/classes.rb:24)>
|
15
|
+
fails "UnboundMethod#bind_call raises TypeError if object is not kind_of? the Module the method defined in" # Expected TypeError but got: NoMethodError (undefined method `bind_call' for #<UnboundMethod: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>)
|
16
|
+
fails "UnboundMethod#bind_call will raise when binding a an object singleton's method to another object" # Expected TypeError but got: NoMethodError (undefined method `bind_call' for #<UnboundMethod: UnboundMethodSpecs::Parent#singleton_method (defined in #<Class:#<UnboundMethodSpecs::Parent:0x30e3e>> in ruby/core/unboundmethod/bind_call_spec.rb:44)>)
|
17
|
+
fails "UnboundMethod#clone returns a copy of the UnboundMethod"
|
18
|
+
fails "UnboundMethod#hash returns the same value for builtin methods that are eql?"
|
19
|
+
fails "UnboundMethod#hash returns the same value for user methods that are eql?"
|
20
|
+
fails "UnboundMethod#inspect returns a String including all details" # Expected "#<UnboundMethod: UnboundMethodSpecs::Methods#from_mod (defined in UnboundMethodSpecs::Mod in ruby/core/unboundmethod/fixtures/classes.rb:24)>".start_with? "#<UnboundMethod: UnboundMethodSpecs::Methods(UnboundMethodSpecs::Mod)#from_mod" to be truthy but was false
|
21
|
+
fails "UnboundMethod#original_name returns the name of the method" # NoMethodError: undefined method `original_name' for #<UnboundMethod: String#upcase (defined in String in corelib/string.rb:1672)>
|
22
|
+
fails "UnboundMethod#original_name returns the original name even when aliased twice" # NoMethodError: undefined method `original_name' for #<UnboundMethod: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
23
|
+
fails "UnboundMethod#original_name returns the original name" # NoMethodError: undefined method `original_name' for #<UnboundMethod: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
24
|
+
fails "UnboundMethod#source_location sets the first value to the path of the file in which the method was defined" # Expected "ruby/core/unboundmethod/fixtures/classes.rb" to equal "./ruby/core/unboundmethod/fixtures/classes.rb"
|
25
|
+
fails "UnboundMethod#source_location works for define_method methods"
|
26
|
+
fails "UnboundMethod#source_location works for define_singleton_method methods"
|
27
|
+
fails "UnboundMethod#super_method returns nil when the parent's method is removed"
|
28
|
+
fails "UnboundMethod#super_method returns nil when there's no super method in the parent"
|
29
|
+
fails "UnboundMethod#super_method returns the method that would be called by super in the method"
|
30
|
+
fails "UnboundMethod#to_s does not show the defining module if it is the same as the origin" # Expected "#<UnboundMethod:0x10e>".start_with? "#<UnboundMethod: UnboundMethodSpecs::A#baz" to be truthy but was false
|
31
|
+
fails "UnboundMethod#to_s returns a String including all details" # Expected "#<UnboundMethod:0x14c>".start_with? "#<UnboundMethod: UnboundMethodSpecs::Methods(UnboundMethodSpecs::Mod)#from_mod" to be truthy but was false
|
32
|
+
fails "UnboundMethod#to_s the String shows the method name, Module defined in and Module extracted from"
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "warnings" do
|
3
|
+
fails "Array#join when $, is not nil warns" # Expected warning to match: /warning: \$, is set to non-nil value/ but got: ""
|
4
|
+
fails "Constant resolution within methods with dynamically assigned constants returns the updated value when a constant is reassigned" # Expected warning to match: /already initialized constant/
|
5
|
+
fails "Fixnum is deprecated" # Expected warning to match: /constant ::Fixnum is deprecated/ but got: ""
|
6
|
+
fails "Hash#fetch gives precedence to the default block over the default argument when passed both" # Expected warning to match: /block supersedes default value argument/
|
7
|
+
fails "Hash.[] ignores elements that are not arrays" # Expected warning to match: /ignoring wrong elements/
|
8
|
+
fails "Integer#** bignum switch to a Float when the values is too big" # Expected warning to match: /warning: in a\*\*b, b may be too big/ but got: ""
|
9
|
+
fails "Integer#** fixnum returns Float::INFINITY when the number is too big" # Expected warning to match: /warning: in a\*\*b, b may be too big/ but got: ""
|
10
|
+
fails "Integer#pow one argument is passed fixnum returns Float::INFINITY when the number is too big" # Expected warning to match: /warning: in a\*\*b, b may be too big/ but got: ""
|
11
|
+
fails "Kernel#=~ is deprecated" # Expected warning to match: /deprecated Object#=~ is called on Object/ but got: ""
|
12
|
+
fails "Literal (A::X) constant resolution with dynamically assigned constants returns the updated value when a constant is reassigned" # Expected warning to match: /already initialized constant/
|
13
|
+
fails "Literal Regexps matches against $_ (last input) in a conditional if no explicit matchee provided" # Expected warning to match: /regex literal in condition/
|
14
|
+
fails "Module#const_get with dynamically assigned constants returns the updated value of a constant" # Expected warning to match: /already initialized constant/
|
15
|
+
fails "Optional variable assignments using compunded constants with &&= assignments" # Expected warning to match: /already initialized constant/
|
16
|
+
fails "Optional variable assignments using compunded constants with operator assignments" # Expected warning to match: /already initialized constant/
|
17
|
+
fails "Predefined global $, warns if assigned non-nil" # Expected warning to match: /warning: `\$,' is deprecated/ but got: ""
|
18
|
+
fails "Predefined global $; warns if assigned non-nil" # Expected warning to match: /warning: `\$;' is deprecated/ but got: ""
|
19
|
+
fails "Regexp.new given a Regexp does not honour options given as additional arguments" # Expected warning to match: /flags ignored/
|
20
|
+
fails "String#split with String when $; is not nil warns" # Expected warning to match: /warning: \$; is set to non-nil value/ but got: ""
|
21
|
+
fails "Struct.new overwrites previously defined constants with string as first argument" # Expected warning to match: /redefining constant/
|
22
|
+
fails "The defined? keyword for a variable scoped constant returns 'constant' if the constant is defined in the scope of the class variable" # Expected warning to match: /class variable access from toplevel/
|
23
|
+
fails "The defined? keyword for a variable scoped constant returns nil if the class scoped constant is not defined" # Expected warning to match: /class variable access from toplevel/
|
24
|
+
fails "The defined? keyword for an expression with logical connectives returns nil for an expression with '!' and an unset class variable" # Expected warning to match: /class variable access from toplevel/
|
25
|
+
fails "The defined? keyword for an expression with logical connectives returns nil for an expression with 'not' and an unset class variable" # Expected warning to match: /class variable access from toplevel/
|
26
|
+
fails "The for expression allows a constant as an iterator name" # Expected warning to match: /already initialized constant/
|
27
|
+
fails "The predefined global constants includes FALSE" # Expected warning to match: /constant ::FALSE is deprecated/
|
28
|
+
fails "The predefined global constants includes NIL" # Expected warning to match: /constant ::NIL is deprecated/
|
29
|
+
fails "The predefined global constants includes TRUE" # Expected warning to match: /constant ::TRUE is deprecated/
|
30
|
+
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_unsupported_filter "Array" do
|
3
|
+
fails "Array#* with a string with a tainted separator does not taint the result if the array has only one element"
|
4
|
+
fails "Array#* with a string with a tainted separator does not taint the result if the array is empty"
|
5
|
+
fails "Array#* with a string with a tainted separator taints the result if the array has two or more elements"
|
6
|
+
fails "Array#* with a string with an untrusted separator does not untrust the result if the array has only one element"
|
7
|
+
fails "Array#* with a string with an untrusted separator does not untrust the result if the array is empty"
|
8
|
+
fails "Array#* with a string with an untrusted separator untrusts the result if the array has two or more elements"
|
9
|
+
fails "Array#* with an integer copies the taint status of the original array even if the array is empty"
|
10
|
+
fails "Array#* with an integer copies the taint status of the original array even if the passed count is 0"
|
11
|
+
fails "Array#* with an integer copies the taint status of the original array if the passed count is not 0"
|
12
|
+
fails "Array#* with an integer copies the untrusted status of the original array even if the array is empty"
|
13
|
+
fails "Array#* with an integer copies the untrusted status of the original array even if the passed count is 0"
|
14
|
+
fails "Array#* with an integer copies the untrusted status of the original array if the passed count is not 0"
|
15
|
+
fails "Array#+ does not get infected even if an original array is tainted"
|
16
|
+
fails "Array#+ does not infected even if an original array is untrusted"
|
17
|
+
fails "Array#<< raises a RuntimeError on a frozen array"
|
18
|
+
fails "Array#[] raises a RangeError when the length is out of range of Fixnum"
|
19
|
+
fails "Array#[] raises a RangeError when the start index is out of range of Fixnum"
|
20
|
+
fails "Array#[]= checks frozen before attempting to coerce arguments"
|
21
|
+
fails "Array#[]= raises a RuntimeError on a frozen array"
|
22
|
+
fails "Array#clear keeps tainted status"
|
23
|
+
fails "Array#clear keeps untrusted status"
|
24
|
+
fails "Array#clear raises a RuntimeError on a frozen array"
|
25
|
+
fails "Array#clone copies frozen status from the original"
|
26
|
+
fails "Array#clone copies taint status from the original"
|
27
|
+
fails "Array#clone copies untrusted status from the original"
|
28
|
+
fails "Array#collect does not copy tainted status"
|
29
|
+
fails "Array#collect does not copy untrusted status"
|
30
|
+
fails "Array#collect! keeps tainted status"
|
31
|
+
fails "Array#collect! keeps untrusted status"
|
32
|
+
fails "Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty"
|
33
|
+
fails "Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator"
|
34
|
+
fails "Array#collect! when frozen raises a RuntimeError when empty"
|
35
|
+
fails "Array#collect! when frozen raises a RuntimeError"
|
36
|
+
fails "Array#compact does not keep tainted status even if all elements are removed"
|
37
|
+
fails "Array#compact does not keep untrusted status even if all elements are removed"
|
38
|
+
fails "Array#compact! keeps tainted status even if all elements are removed"
|
39
|
+
fails "Array#compact! keeps untrusted status even if all elements are removed"
|
40
|
+
fails "Array#compact! raises a RuntimeError on a frozen array"
|
41
|
+
fails "Array#concat is not infected by the other"
|
42
|
+
fails "Array#concat is not infected untrustedness by the other"
|
43
|
+
fails "Array#concat keeps tainted status"
|
44
|
+
fails "Array#concat keeps the tainted status of elements"
|
45
|
+
fails "Array#concat keeps the untrusted status of elements"
|
46
|
+
fails "Array#concat keeps untrusted status"
|
47
|
+
fails "Array#concat raises a RuntimeError when Array is frozen and modification occurs"
|
48
|
+
fails "Array#concat raises a RuntimeError when Array is frozen and no modification occurs"
|
49
|
+
fails "Array#delete keeps tainted status"
|
50
|
+
fails "Array#delete keeps untrusted status"
|
51
|
+
fails "Array#delete raises a RuntimeError on a frozen array"
|
52
|
+
fails "Array#delete_at keeps tainted status"
|
53
|
+
fails "Array#delete_at keeps untrusted status"
|
54
|
+
fails "Array#delete_at raises a RuntimeError on a frozen array"
|
55
|
+
fails "Array#delete_if keeps tainted status"
|
56
|
+
fails "Array#delete_if keeps untrusted status"
|
57
|
+
fails "Array#delete_if raises a RuntimeError on a frozen array"
|
58
|
+
fails "Array#delete_if raises a RuntimeError on an empty frozen array"
|
59
|
+
fails "Array#delete_if returns an Enumerator if no block given, and the array is frozen"
|
60
|
+
fails "Array#dup copies taint status from the original"
|
61
|
+
fails "Array#dup copies untrusted status from the original"
|
62
|
+
fails "Array#eql? returns false if any corresponding elements are not #eql?"
|
63
|
+
fails "Array#fill does not replicate the filler"
|
64
|
+
fails "Array#fill raises a RuntimeError on a frozen array"
|
65
|
+
fails "Array#fill raises a RuntimeError on an empty frozen array"
|
66
|
+
fails "Array#fill with (filler, index, length) raises an ArgumentError or RangeError for too-large sizes"
|
67
|
+
fails "Array#first raises a RangeError when count is a Bignum"
|
68
|
+
fails "Array#flatten returns a tainted array if self is tainted"
|
69
|
+
fails "Array#flatten returns an untrusted array if self is untrusted"
|
70
|
+
fails "Array#flatten! raises a RuntimeError on frozen arrays when the array is modified"
|
71
|
+
fails "Array#flatten! raises a RuntimeError on frozen arrays when the array would not be modified"
|
72
|
+
fails "Array#frozen? returns false for an array being sorted by #sort"
|
73
|
+
fails "Array#frozen? returns true if array is frozen"
|
74
|
+
fails "Array#hash calls to_int on result of calling hash on each element"
|
75
|
+
fails "Array#hash returns the same fixnum for arrays with the same content"
|
76
|
+
fails "Array#initialize is private"
|
77
|
+
fails "Array#initialize raises a RuntimeError on frozen arrays"
|
78
|
+
fails "Array#insert raises a RuntimeError on frozen arrays when the array is modified"
|
79
|
+
fails "Array#insert raises a RuntimeError on frozen arrays when the array would not be modified"
|
80
|
+
fails "Array#inspect does not taint the result if the Array is tainted but empty"
|
81
|
+
fails "Array#inspect does not untrust the result if the Array is untrusted but empty"
|
82
|
+
fails "Array#inspect represents a recursive element with '[...]'"
|
83
|
+
fails "Array#inspect taints the result if an element is tainted"
|
84
|
+
fails "Array#inspect taints the result if the Array is non-empty and tainted"
|
85
|
+
fails "Array#inspect untrusts the result if an element is untrusted"
|
86
|
+
fails "Array#inspect untrusts the result if the Array is untrusted"
|
87
|
+
fails "Array#inspect with encoding does not raise if inspected result is not default external encoding" # NoMethodError: undefined method `encode!' for "\"utf_16be あ\"":String
|
88
|
+
fails "Array#inspect with encoding raises if inspected result is not default external encoding"
|
89
|
+
fails "Array#inspect with encoding returns a US-ASCII string for an empty Array"
|
90
|
+
fails "Array#inspect with encoding use US-ASCII encoding if the default external encoding is not ascii compatible"
|
91
|
+
fails "Array#inspect with encoding use the default external encoding if it is ascii compatible"
|
92
|
+
fails "Array#join does not taint the result if the Array is tainted but empty"
|
93
|
+
fails "Array#join does not untrust the result if the Array is untrusted but empty"
|
94
|
+
fails "Array#join fails for arrays with incompatibly-encoded strings"
|
95
|
+
fails "Array#join returns a US-ASCII string for an empty Array"
|
96
|
+
fails "Array#join taints the result if the Array is tainted and non-empty"
|
97
|
+
fails "Array#join taints the result if the result of coercing an element is tainted"
|
98
|
+
fails "Array#join untrusts the result if the Array is untrusted and non-empty"
|
99
|
+
fails "Array#join untrusts the result if the result of coercing an element is untrusted"
|
100
|
+
fails "Array#join uses the first encoding when other strings are compatible"
|
101
|
+
fails "Array#join uses the widest common encoding when other strings are incompatible"
|
102
|
+
fails "Array#join with a tainted separator does not taint the result if the array has only one element"
|
103
|
+
fails "Array#join with a tainted separator does not taint the result if the array is empty"
|
104
|
+
fails "Array#join with a tainted separator taints the result if the array has two or more elements"
|
105
|
+
fails "Array#join with an untrusted separator does not untrust the result if the array has only one element"
|
106
|
+
fails "Array#join with an untrusted separator does not untrust the result if the array is empty"
|
107
|
+
fails "Array#join with an untrusted separator untrusts the result if the array has two or more elements"
|
108
|
+
fails "Array#keep_if on frozen objects returns an Enumerator if no block is given"
|
109
|
+
fails "Array#keep_if on frozen objects with falsy block keeps elements after any exception"
|
110
|
+
fails "Array#keep_if on frozen objects with falsy block raises a RuntimeError"
|
111
|
+
fails "Array#keep_if on frozen objects with truthy block keeps elements after any exception"
|
112
|
+
fails "Array#keep_if on frozen objects with truthy block raises a RuntimeError"
|
113
|
+
fails "Array#map does not copy tainted status"
|
114
|
+
fails "Array#map does not copy untrusted status"
|
115
|
+
fails "Array#map! keeps tainted status"
|
116
|
+
fails "Array#map! keeps untrusted status"
|
117
|
+
fails "Array#map! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty"
|
118
|
+
fails "Array#map! when frozen raises a RuntimeError when calling #each on the returned Enumerator"
|
119
|
+
fails "Array#map! when frozen raises a RuntimeError when empty"
|
120
|
+
fails "Array#map! when frozen raises a RuntimeError"
|
121
|
+
fails "Array#pop keeps taint status"
|
122
|
+
fails "Array#pop keeps untrusted status"
|
123
|
+
fails "Array#pop passed a number n as an argument keeps taint status"
|
124
|
+
fails "Array#pop passed a number n as an argument keeps untrusted status"
|
125
|
+
fails "Array#pop passed a number n as an argument raises a RuntimeError on a frozen array"
|
126
|
+
fails "Array#pop passed a number n as an argument returns a trusted array even if the array is untrusted"
|
127
|
+
fails "Array#pop passed a number n as an argument returns an untainted array even if the array is tainted"
|
128
|
+
fails "Array#pop raises a RuntimeError on a frozen array"
|
129
|
+
fails "Array#pop raises a RuntimeError on an empty frozen array"
|
130
|
+
fails "Array#push raises a RuntimeError on a frozen array"
|
131
|
+
fails "Array#reject! raises a RuntimeError on a frozen array"
|
132
|
+
fails "Array#reject! raises a RuntimeError on an empty frozen array"
|
133
|
+
fails "Array#reject! returns an Enumerator if no block given, and the array is frozen"
|
134
|
+
fails "Array#replace raises a RuntimeError on a frozen array"
|
135
|
+
fails "Array#reverse! raises a RuntimeError on a frozen array"
|
136
|
+
fails "Array#select! on frozen objects with falsy block keeps elements after any exception"
|
137
|
+
fails "Array#select! on frozen objects with falsy block raises a RuntimeError"
|
138
|
+
fails "Array#select! on frozen objects with truthy block keeps elements after any exception"
|
139
|
+
fails "Array#select! on frozen objects with truthy block raises a RuntimeError"
|
140
|
+
fails "Array#shift passed a number n as an argument keeps taint status"
|
141
|
+
fails "Array#shift passed a number n as an argument returns an untainted array even if the array is tainted"
|
142
|
+
fails "Array#shift raises a RuntimeError on a frozen array"
|
143
|
+
fails "Array#shift raises a RuntimeError on an empty frozen array"
|
144
|
+
fails "Array#shuffle! raises a RuntimeError on a frozen array"
|
145
|
+
fails "Array#slice raises a RangeError when the length is out of range of Fixnum"
|
146
|
+
fails "Array#slice raises a RangeError when the start index is out of range of Fixnum"
|
147
|
+
fails "Array#slice! raises a RuntimeError on a frozen array"
|
148
|
+
fails "Array#sort! raises a RuntimeError on a frozen array"
|
149
|
+
fails "Array#to_s does not taint the result if the Array is tainted but empty"
|
150
|
+
fails "Array#to_s does not untrust the result if the Array is untrusted but empty"
|
151
|
+
fails "Array#to_s represents a recursive element with '[...]'"
|
152
|
+
fails "Array#to_s taints the result if an element is tainted"
|
153
|
+
fails "Array#to_s taints the result if the Array is non-empty and tainted"
|
154
|
+
fails "Array#to_s untrusts the result if an element is untrusted"
|
155
|
+
fails "Array#to_s untrusts the result if the Array is untrusted"
|
156
|
+
fails "Array#to_s with encoding does not raise if inspected result is not default external encoding" # NoMethodError: undefined method `encode!' for "\"utf_16be あ\"":String
|
157
|
+
fails "Array#to_s with encoding raises if inspected result is not default external encoding"
|
158
|
+
fails "Array#to_s with encoding returns a US-ASCII string for an empty Array"
|
159
|
+
fails "Array#to_s with encoding use US-ASCII encoding if the default external encoding is not ascii compatible"
|
160
|
+
fails "Array#to_s with encoding use the default external encoding if it is ascii compatible"
|
161
|
+
fails "Array#uniq compares elements with matching hash codes with #eql?" #RubySpec uses taint, which is not supported on Opal.
|
162
|
+
fails "Array#uniq uses eql? semantics" #RubySpec expects 1.0 and 1 to be seen as different, which is not supported on Opal.
|
163
|
+
fails "Array#uniq! doesn't yield to the block on a frozen array"
|
164
|
+
fails "Array#uniq! raises a RuntimeError on a frozen array when the array is modified"
|
165
|
+
fails "Array#uniq! raises a RuntimeError on a frozen array when the array would not be modified"
|
166
|
+
fails "Array#unshift raises a RuntimeError on a frozen array when the array is modified"
|
167
|
+
fails "Array#unshift raises a RuntimeError on a frozen array when the array would not be modified"
|
168
|
+
end
|