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,451 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "language" do
|
3
|
+
fails "$LOAD_PATH.resolve_feature_path raises LoadError if feature cannot be found" # Expected LoadError but got: NoMethodError (undefined method `resolve_feature_path' for ["foo"])
|
4
|
+
fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, .rb file" # NoMethodError: undefined method `resolve_feature_path' for ["foo"]
|
5
|
+
fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, .so file" # NoMethodError: undefined method `resolve_feature_path' for ["foo"]
|
6
|
+
fails "A Symbol literal with invalid bytes raises an EncodingError at parse time" # Actually passes, the error comes from the difference between MRI's opal and compiled opal-parser
|
7
|
+
fails "A block yielded a single Array assigns elements to mixed argument types" # Expected [1, 2, [], 3, 2, {"x"=>9}] == [1, 2, [3], {"x"=>9}, 2, {}] to be truthy but was false
|
8
|
+
fails "A block yielded a single Array assigns elements to required arguments when a keyword rest argument is present"
|
9
|
+
fails "A block yielded a single Array assigns non-symbol keys to non-keyword arguments"
|
10
|
+
fails "A block yielded a single Array assigns symbol keys from a Hash returned by #to_hash to keyword arguments"
|
11
|
+
fails "A block yielded a single Array assigns symbol keys from a Hash to keyword arguments"
|
12
|
+
fails "A block yielded a single Array assigns the last element to a non-keyword argument if #to_hash returns nil"
|
13
|
+
fails "A block yielded a single Array calls #to_hash on the argument and uses resulting hash as first argument when optional argument and keyword argument accepted" # Expected [nil, {"a"=>1, "b"=>2}] == [{"a"=>1, "b"=>2}, {}] to be truthy but was false
|
14
|
+
fails "A block yielded a single Array calls #to_hash on the argument but does not use the result when no keywords are present"
|
15
|
+
fails "A block yielded a single Array calls #to_hash on the argument" # Expected [nil, {"a"=>1, "b"=>2}] to equal [{"a"=>1, "b"=>2}, {}]
|
16
|
+
fails "A block yielded a single Array does not call #to_hash on final argument to get keyword arguments and does not autosplat" # ArgumentError: expected kwargs
|
17
|
+
fails "A block yielded a single Array does not call #to_hash on the argument when optional argument and keyword argument accepted and does not autosplat" # ArgumentError: expected kwargs
|
18
|
+
fails "A block yielded a single Array does not call #to_hash on the last element if keyword arguments are present" # ArgumentError: expected kwargs
|
19
|
+
fails "A block yielded a single Array does not call #to_hash on the last element when there are more arguments than parameters" # ArgumentError: expected kwargs
|
20
|
+
fails "A block yielded a single Array does not treat final Hash as keyword arguments and does not autosplat" # Expected [nil, {"a"=>10}] == [[{"a"=>10}], {}] to be truthy but was false
|
21
|
+
fails "A block yielded a single Array does not treat hashes with string keys as keyword arguments and does not autosplat" # Expected [nil, {"a"=>10}] == [[{"a"=>10}], {}] to be truthy but was false
|
22
|
+
fails "A block yielded a single Array does not treat hashes with string keys as keyword arguments"
|
23
|
+
fails "A block yielded a single Array raises a TypeError if #to_hash does not return a Hash"
|
24
|
+
fails "A block yielded a single Array when non-symbol keys are in a keyword arguments Hash does not separate non-symbol keys and symbol keys and does not autosplat" # Expected [nil, {"a"=>10, "b"=>2}] == [[{"a"=>10, "b"=>2}], {}] to be truthy but was false
|
25
|
+
fails "A block yielded a single Array when non-symbol keys are in a keyword arguments Hash separates non-symbol keys and symbol keys" # Expected [nil, {"a"=>10, "b"=>2}] to equal [{"a"=>10}, {"b"=>2}]
|
26
|
+
fails "A class definition allows using self as the superclass if self is a class"
|
27
|
+
fails "A class definition extending an object (sclass) allows accessing the block of the original scope" # Opal::SyntaxError: undefined method `uses_block!' for nil
|
28
|
+
fails "A class definition extending an object (sclass) can use return to cause the enclosing method to return"
|
29
|
+
fails "A class definition extending an object (sclass) raises a TypeError when trying to extend non-Class" # Expected TypeError (/superclass must be a.* Class/) but no exception was raised (nil was returned)
|
30
|
+
fails "A class definition extending an object (sclass) raises a TypeError when trying to extend numbers"
|
31
|
+
fails "A class definition raises TypeError if any constant qualifying the class is not a Module"
|
32
|
+
fails "A class definition raises TypeError if the constant qualifying the class is nil"
|
33
|
+
fails "A class definition raises a TypeError if inheriting from a metaclass"
|
34
|
+
fails "A lambda expression 'lambda { ... }' assigns variables from parameters for definition '@a = lambda { |*, **k| k }'" # ArgumentError: expected kwargs
|
35
|
+
fails "A lambda expression 'lambda { ... }' assigns variables from parameters for definition \n def m(a) yield a end\n def m2() yield end\n @a = lambda { |a, | a }"
|
36
|
+
fails "A lambda expression 'lambda { ... }' requires a block"
|
37
|
+
fails "A lambda expression 'lambda { ... }' with an implicit block can be created"
|
38
|
+
fails "A lambda expression 'lambda { ... }' with an implicit block raises ArgumentError" # Expected ArgumentError (/tried to create Proc object without a block/) but no exception was raised (nil was returned)
|
39
|
+
fails "A lambda literal -> () { } assigns variables from parameters for definition '@a = -> (*, **k) { k }'" # ArgumentError: expected kwargs
|
40
|
+
fails "A lambda literal -> () { } assigns variables from parameters with circular optional argument reference shadows an existing local with the same name as the argument"
|
41
|
+
fails "A lambda literal -> () { } assigns variables from parameters with circular optional argument reference shadows an existing method with the same name as the argument"
|
42
|
+
fails "A lambda literal -> () { } assigns variables from parameters with circular optional argument reference warns and uses a nil value when there is an existing local variable with same name" # Expected warning to match: /circular argument reference/ but got: ""
|
43
|
+
fails "A lambda literal -> () { } assigns variables from parameters with circular optional argument reference warns and uses a nil value when there is an existing method with same name" # Expected warning to match: /circular argument reference/ but got: ""
|
44
|
+
fails "A method assigns local variables from method parameters for definition 'def m() end'" # ArgumentError: [SpecEvaluate#m] wrong number of arguments(1 for 0)
|
45
|
+
fails "A method assigns local variables from method parameters for definition 'def m(*a) a end'" # Expected [{}] to equal []
|
46
|
+
fails "A method assigns local variables from method parameters for definition 'def m(*a, **) a end'"
|
47
|
+
fails "A method assigns local variables from method parameters for definition 'def m(*a, **k) [a, k] end'"
|
48
|
+
fails "A method assigns local variables from method parameters for definition 'def m(*a, b: 1) [a, b] end'"
|
49
|
+
fails "A method assigns local variables from method parameters for definition 'def m(*a, b:) [a, b] end'"
|
50
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a = nil, **k) [a, k] end'"
|
51
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a, **) a end'" # Expected ArgumentError but no exception was raised ({"a"=>1, "b"=>2} was returned)
|
52
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a, **k) [a, k] end'" # Expected ArgumentError but no exception was raised ([{"a"=>1, "b"=>2}, {}] was returned)
|
53
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a, **nil); a end;'" # Opal::SyntaxError: Unsupported arg type kwnilarg
|
54
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a, b: 1) [a, b] end'" # Expected ArgumentError but no exception was raised ([{"a"=>1, "b"=>2}, 1] was returned)
|
55
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:) a end'"
|
56
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:, **k) [a, k] end'"
|
57
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:, b: 1) [a, b] end'"
|
58
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:, b:) [a, b] end'"
|
59
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a=1, b: 2) [a, b] end'"
|
60
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a=1, b:) [a, b] end'"
|
61
|
+
fails "A method assigns local variables from method parameters for definition \n def m(a, b = nil, c = nil, d, e: nil, **f)\n [a, b, c, d, e, f]\n end" # Exception: Cannot read property '$$is_array' of undefined
|
62
|
+
fails "A method definition in an eval creates a class method"
|
63
|
+
fails "A method definition in an eval creates a singleton method"
|
64
|
+
fails "A method definition in an eval creates an instance method"
|
65
|
+
fails "A method raises ArgumentError if passing hash as keyword arguments for definition 'def m(a: nil); a; end'" # Expected ArgumentError but no exception was raised (1 was returned)
|
66
|
+
fails "A method when passing an empty keyword splat to a method that does not accept keywords for definition 'def m(*a); a; end'" # Expected [{}] == [] to be truthy but was false
|
67
|
+
fails "A method when passing an empty keyword splat to a method that does not accept keywords for definition 'def m(a); a; end'" # Expected ArgumentError but no exception was raised (nil was returned)
|
68
|
+
fails "A nested method definition creates a class method when evaluated in a class method"
|
69
|
+
fails "A nested method definition creates a method in the surrounding context when evaluated in a def expr.method"
|
70
|
+
fails "A nested method definition creates an instance method inside Class.new" # NoMethodError: undefined method `new_def' for #<#<Class:0x40de>:0x40dc>
|
71
|
+
fails "A nested method definition creates an instance method when evaluated in an instance method"
|
72
|
+
fails "A number literal can be a decimal literal with trailing 'r' to represent a Rational" # requires String#to_r
|
73
|
+
fails "A number literal can be a float literal with trailing 'r' to represent a Rational" # Expected (5030569068109113/288230376151711740) == (136353847812057/7812500000000000) to be truthy but was false
|
74
|
+
fails "A singleton class doesn't have singleton class"
|
75
|
+
fails "A singleton class raises a TypeError for Fixnum's"
|
76
|
+
fails "A singleton class raises a TypeError for symbols"
|
77
|
+
fails "A singleton method definition can be declared for a global variable"
|
78
|
+
fails "A singleton method definition raises FrozenError with the correct class name" # Expected FrozenError but no exception was raised ("foo" was returned)
|
79
|
+
fails "Allowed characters allows non-ASCII lowercased characters at the beginning" # Expected nil == 1 to be truthy but was false
|
80
|
+
fails "Allowed characters allows not ASCII characters in the middle of a name" # NoMethodError: undefined method `mod' for #<MSpecEnv:0xa920>
|
81
|
+
fails "Allowed characters allows not ASCII upcased characters at the beginning" # NameError: wrong constant name ἍBB
|
82
|
+
fails "Allowed characters does not allow non-ASCII upcased characters at the beginning" # Expected SyntaxError (/dynamic constant assignment/) but no exception was raised ("test" was returned)
|
83
|
+
fails "An ensure block inside 'do end' block is executed even when a symbol is thrown in it's corresponding begin block" # Expected ["begin", "rescue", "ensure"] to equal ["begin", "ensure"]
|
84
|
+
fails "An ensure block inside a begin block is executed even when a symbol is thrown in it's corresponding begin block"
|
85
|
+
fails "An ensure block inside a class is executed even when a symbol is thrown" # Expected ["class", "rescue", "ensure"] to equal ["class", "ensure"]
|
86
|
+
fails "An instance method definition with a splat requires the presence of any arguments that precede the *" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(1 for -3)
|
87
|
+
fails "An instance method raises FrozenError with the correct class name" # Expected FrozenError but no exception was raised (#<Module:0x225b4> was returned)
|
88
|
+
fails "An instance method raises an error with too few arguments" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(1 for 2)
|
89
|
+
fails "An instance method raises an error with too many arguments" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(2 for 1)
|
90
|
+
fails "An instance method with a default argument evaluates the default when required arguments precede it" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(0 for -2)
|
91
|
+
fails "An instance method with a default argument prefers to assign to a default argument before a splat argument" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(0 for -2)
|
92
|
+
fails "An instance method with a default argument shadows an existing method with the same name as the local"
|
93
|
+
fails "An instance method with a default argument warns and uses a nil value when there is an existing local method with same name" # Expected warning to match: /circular argument reference/ but got: ""
|
94
|
+
fails "Assigning an anonymous module to a constant sets the name of a module scoped by an anonymous module" # NoMethodError: undefined method `end_with?' for nil
|
95
|
+
fails "Constant resolution within methods with dynamically assigned constants searches Object as a lexical scope only if Object is explicitly opened"
|
96
|
+
fails "Constant resolution within methods with statically assigned constants searches Object as a lexical scope only if Object is explicitly opened"
|
97
|
+
fails "Executing break from within a block raises LocalJumpError when converted into a proc during a a super call" # Expected LocalJumpError but no exception was raised (1 was returned)
|
98
|
+
fails "Executing break from within a block returns from the original invoking method even in case of chained calls"
|
99
|
+
fails "Executing break from within a block works when passing through a super call" # Expected to not get Exception
|
100
|
+
fails "Execution variable $: is initialized to an array of strings"
|
101
|
+
fails "Execution variable $: is read-only"
|
102
|
+
fails "Execution variable $: is the same object as $LOAD_PATH and $-I"
|
103
|
+
fails "Global variable $-a is read-only"
|
104
|
+
fails "Global variable $-d is an alias of $DEBUG"
|
105
|
+
fails "Global variable $-l is read-only"
|
106
|
+
fails "Global variable $-p is read-only"
|
107
|
+
fails "Global variable $-v is an alias of $VERBOSE"
|
108
|
+
fails "Global variable $-w is an alias of $VERBOSE"
|
109
|
+
fails "Global variable $0 is the path given as the main script and the same as __FILE__"
|
110
|
+
fails "Global variable $0 raises a TypeError when not given an object that can be coerced to a String"
|
111
|
+
fails "Global variable $< is read-only"
|
112
|
+
fails "Global variable $? is read-only"
|
113
|
+
fails "Global variable $? is thread-local"
|
114
|
+
fails "Global variable $FILENAME is read-only"
|
115
|
+
fails "Global variable $VERBOSE converts truthy values to true" # Expected 1 to be true
|
116
|
+
fails "Global variable $\" is read-only"
|
117
|
+
fails "Hash literal expands a BasicObject using ** into the containing Hash literal initialization" # NoMethodError: undefined method `respond_to?' for BasicObject
|
118
|
+
fails "Heredoc string allow HEREDOC with <<\"identifier\", interpolated" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
119
|
+
fails "Heredoc string allows HEREDOC with <<'identifier', no interpolation" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
120
|
+
fails "Heredoc string allows HEREDOC with <<-'identifier', allowing to indent identifier, no interpolation" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
121
|
+
fails "Heredoc string allows HEREDOC with <<-\"identifier\", allowing to indent identifier, interpolated" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
122
|
+
fails "Heredoc string allows HEREDOC with <<-identifier, allowing to indent identifier, interpolated" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
123
|
+
fails "Heredoc string allows HEREDOC with <<identifier, interpolated" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
124
|
+
fails "Heredoc string prints a warning if quoted HEREDOC identifier is ending not on same line" # Opal::SyntaxError: unterminated string meets end of file
|
125
|
+
fails "Instantiating a singleton class raises a TypeError when allocate is called"
|
126
|
+
fails "Instantiating a singleton class raises a TypeError when new is called"
|
127
|
+
fails "Invoking a method expands the Array elements from the splat after executing the arguments and block if no other arguments follow the splat" # Expected [[1, nil], nil] to equal [[1], nil]
|
128
|
+
fails "Literal (A::X) constant resolution uses the module or class #inspect to craft the error message if they are anonymous" # Expected NameError (/uninitialized constant <unusable info>::DOES_NOT_EXIST/) but got: NameError (uninitialized constant #<Module:0x50c0>::DOES_NOT_EXIST)
|
129
|
+
fails "Literal (A::X) constant resolution uses the module or class #name to craft the error message" # Expected NameError (/uninitialized constant ModuleName::DOES_NOT_EXIST/) but got: NameError (uninitialized constant #<Module:0x50ba>::DOES_NOT_EXIST)
|
130
|
+
fails "Literal (A::X) constant resolution with dynamically assigned constants evaluates the right hand side before evaluating a constant path"
|
131
|
+
fails "Literal Ranges creates beginless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
132
|
+
fails "Literal Ranges creates endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
133
|
+
fails "Literal Regexps caches the Regexp object"
|
134
|
+
fails "Literal Regexps raises a RegexpError for lookbehind with specific characters" # Expected RegexpError but no exception was raised (0 was returned)
|
135
|
+
fails "Literal Regexps support handling unicode 9.0 characters with POSIX bracket expressions" # Expected "" to equal "𐓘"
|
136
|
+
fails "Literal Regexps supports (?# )"
|
137
|
+
fails "Literal Regexps supports (?> ) (embedded subexpression)"
|
138
|
+
fails "Literal Regexps supports \\g (named backreference)"
|
139
|
+
fails "Literal Regexps supports character class composition"
|
140
|
+
fails "Literal Regexps supports conditional regular expressions with named capture groups" # Exception: named captures are not supported in javascript: "^(?<word>foo)?(?(<word>)(T)|(F))$"
|
141
|
+
fails "Literal Regexps supports conditional regular expressions with positional capture groups" # Exception: Invalid regular expression: /^(foo)?(?(1)(T)|(F))$/: Invalid group
|
142
|
+
fails "Literal Regexps supports escaping characters when used as a terminator" # Expected "!" to equal "(?-mix:!)"
|
143
|
+
fails "Literal Regexps supports possessive quantifiers"
|
144
|
+
fails "Literal Regexps throws SyntaxError for malformed literals"
|
145
|
+
fails "Literal Regexps treats an escaped non-escapable character normally when used as a terminator" # Expected "\\$" to equal "(?-mix:\\$)"
|
146
|
+
fails "Local variable shadowing does not warn in verbose mode" # Expected nil == [3, 3, 3] to be truthy but was false
|
147
|
+
fails "Local variable shadowing leads to warning in verbose mode" # Expected warning to match: /shadowing outer local variable/ but got: ""
|
148
|
+
fails "Magic comment is optional"
|
149
|
+
fails "Magic comments in a loaded file are case-insensitive" # LoadError: cannot load such file -- ruby/language/fixtures/case_magic_comment
|
150
|
+
fails "Magic comments in a loaded file are optional" # LoadError: cannot load such file -- ruby/language/fixtures/no_magic_comment
|
151
|
+
fails "Magic comments in a loaded file can be after the shebang" # LoadError: cannot load such file -- ruby/language/fixtures/shebang_magic_comment
|
152
|
+
fails "Magic comments in a loaded file can take Emacs style" # LoadError: cannot load such file -- ruby/language/fixtures/emacs_magic_comment
|
153
|
+
fails "Magic comments in a loaded file can take vim style" # LoadError: cannot load such file -- ruby/language/fixtures/vim_magic_comment
|
154
|
+
fails "Magic comments in a loaded file determine __ENCODING__" # LoadError: cannot load such file -- ruby/language/fixtures/magic_comment
|
155
|
+
fails "Magic comments in a loaded file do not cause bytes to be mangled by passing them through the wrong encoding" # LoadError: cannot load such file -- ruby/language/fixtures/bytes_magic_comment
|
156
|
+
fails "Magic comments in a loaded file must be at the first line" # LoadError: cannot load such file -- ruby/language/fixtures/second_line_magic_comment
|
157
|
+
fails "Magic comments in a loaded file must be the first token of the line" # LoadError: cannot load such file -- ruby/language/fixtures/second_token_magic_comment
|
158
|
+
fails "Magic comments in a required file are case-insensitive" # NameError: uninitialized constant Encoding::Big5
|
159
|
+
fails "Magic comments in a required file are optional" # Expected nil to equal "UTF-8"
|
160
|
+
fails "Magic comments in a required file can be after the shebang" # NameError: uninitialized constant Encoding::Big5
|
161
|
+
fails "Magic comments in a required file can take Emacs style" # NameError: uninitialized constant Encoding::Big5
|
162
|
+
fails "Magic comments in a required file can take vim style" # NameError: uninitialized constant Encoding::Big5
|
163
|
+
fails "Magic comments in a required file determine __ENCODING__" # NameError: uninitialized constant Encoding::Big5
|
164
|
+
fails "Magic comments in a required file do not cause bytes to be mangled by passing them through the wrong encoding" # Expected nil to equal "[167, 65, 166, 110]"
|
165
|
+
fails "Magic comments in a required file must be at the first line" # Expected nil to equal "UTF-8"
|
166
|
+
fails "Magic comments in a required file must be the first token of the line" # Expected nil to equal "UTF-8"
|
167
|
+
fails "Magic comments in an -e argument are case-insensitive" # ArgumentError: unknown encoding name - locale
|
168
|
+
fails "Magic comments in an -e argument are optional" # ArgumentError: unknown encoding name - locale
|
169
|
+
fails "Magic comments in an -e argument can be after the shebang" # ArgumentError: unknown encoding name - locale
|
170
|
+
fails "Magic comments in an -e argument can take Emacs style" # ArgumentError: unknown encoding name - locale
|
171
|
+
fails "Magic comments in an -e argument can take vim style" # ArgumentError: unknown encoding name - locale
|
172
|
+
fails "Magic comments in an -e argument determine __ENCODING__" # ArgumentError: unknown encoding name - locale
|
173
|
+
fails "Magic comments in an -e argument do not cause bytes to be mangled by passing them through the wrong encoding" # ArgumentError: unknown encoding name - locale
|
174
|
+
fails "Magic comments in an -e argument must be at the first line" # ArgumentError: unknown encoding name - locale
|
175
|
+
fails "Magic comments in an -e argument must be the first token of the line" # ArgumentError: unknown encoding name - locale
|
176
|
+
fails "Magic comments in an eval are case-insensitive" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
177
|
+
fails "Magic comments in an eval are optional" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
178
|
+
fails "Magic comments in an eval can be after the shebang" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
179
|
+
fails "Magic comments in an eval can take Emacs style" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
180
|
+
fails "Magic comments in an eval can take vim style" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
181
|
+
fails "Magic comments in an eval determine __ENCODING__" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
182
|
+
fails "Magic comments in an eval do not cause bytes to be mangled by passing them through the wrong encoding" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
183
|
+
fails "Magic comments in an eval must be at the first line" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
184
|
+
fails "Magic comments in an eval must be the first token of the line" # ArgumentError: [File.read] wrong number of arguments(2 for 1)
|
185
|
+
fails "Magic comments in stdin are case-insensitive" # ArgumentError: unknown encoding name - locale
|
186
|
+
fails "Magic comments in stdin are optional" # ArgumentError: unknown encoding name - locale
|
187
|
+
fails "Magic comments in stdin can be after the shebang" # ArgumentError: unknown encoding name - locale
|
188
|
+
fails "Magic comments in stdin can take Emacs style" # ArgumentError: unknown encoding name - locale
|
189
|
+
fails "Magic comments in stdin can take vim style" # ArgumentError: unknown encoding name - locale
|
190
|
+
fails "Magic comments in stdin determine __ENCODING__" # ArgumentError: unknown encoding name - locale
|
191
|
+
fails "Magic comments in stdin do not cause bytes to be mangled by passing them through the wrong encoding" # ArgumentError: unknown encoding name - locale
|
192
|
+
fails "Magic comments in stdin must be at the first line" # ArgumentError: unknown encoding name - locale
|
193
|
+
fails "Magic comments in stdin must be the first token of the line" # ArgumentError: unknown encoding name - locale
|
194
|
+
fails "Magic comments in the main file are case-insensitive" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
195
|
+
fails "Magic comments in the main file are optional" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
196
|
+
fails "Magic comments in the main file can be after the shebang" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
197
|
+
fails "Magic comments in the main file can take Emacs style" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
198
|
+
fails "Magic comments in the main file can take vim style" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
199
|
+
fails "Magic comments in the main file determine __ENCODING__" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
200
|
+
fails "Magic comments in the main file do not cause bytes to be mangled by passing them through the wrong encoding" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
201
|
+
fails "Magic comments in the main file must be at the first line" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
202
|
+
fails "Magic comments in the main file must be the first token of the line" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x8aa2e>
|
203
|
+
fails "NoMethodError#message calls receiver.inspect only when calling Exception#message" # Expected ["inspect_called"] to equal []
|
204
|
+
fails "NoMethodError#message fallbacks to a simpler representation of the receiver when receiver.inspect raises an exception" # NoMethodError: undefined method `name' for #<NoMethodErrorSpecs::InstanceException: NoMethodErrorSpecs::InstanceException>
|
205
|
+
fails "Numbered parameters does not support more than 9 parameters" # Expected NameError (/undefined local variable or method `_10'/) but got: NoMethodError (undefined method `_10' for #<MSpecEnv:0x5d700>)
|
206
|
+
fails "Operators * / % are left-associative"
|
207
|
+
fails "Optional variable assignments using compounded constants with &&= assignments" # Expected warning to match: /already initialized constant/ but got: ""
|
208
|
+
fails "Optional variable assignments using compounded constants with operator assignments" # Expected warning to match: /already initialized constant/ but got: ""
|
209
|
+
fails "Optional variable assignments using compunded constants with ||= assignments"
|
210
|
+
fails "Pattern matching AS pattern binds a variable to a value if pattern matches" # Opal::SyntaxError: `n' is not allowed as a local variable name
|
211
|
+
fails "Pattern matching AS pattern can be used as a nested pattern" # Opal::SyntaxError: `ary' is not allowed as a local variable name
|
212
|
+
fails "Pattern matching Array pattern accepts a subclass of Array from #deconstruct" # Opal::SyntaxError: Unsupported sexp: case_match
|
213
|
+
fails "Pattern matching Array pattern binds variables" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
214
|
+
fails "Pattern matching Array pattern calls #deconstruct even on objects that are already an array" # Opal::SyntaxError: Unsupported sexp: case_match
|
215
|
+
fails "Pattern matching Array pattern calls #deconstruct once for multiple patterns, caching the result" # Opal::SyntaxError: Unsupported sexp: case_match
|
216
|
+
fails "Pattern matching Array pattern does match partially from the array beginning if list + , syntax used" # Opal::SyntaxError: Unsupported sexp: case_match
|
217
|
+
fails "Pattern matching Array pattern does not match object if Constant === object returns false" # Opal::SyntaxError: Unsupported sexp: case_match
|
218
|
+
fails "Pattern matching Array pattern does not match object if elements of array returned by #deconstruct method does not match elements in pattern" # Opal::SyntaxError: Unsupported sexp: case_match
|
219
|
+
fails "Pattern matching Array pattern does not match object without #deconstruct method" # Mock '#<Object:0x75326>' expected to receive respond_to?("deconstruct") exactly 1 times but received it 0 times
|
220
|
+
fails "Pattern matching Array pattern does not match partially by default" # Opal::SyntaxError: Unsupported sexp: case_match
|
221
|
+
fails "Pattern matching Array pattern matches [] with []" # Opal::SyntaxError: Unsupported sexp: case_match
|
222
|
+
fails "Pattern matching Array pattern matches an object with #deconstruct method which returns an array and each element in array matches element in pattern" # Opal::SyntaxError: Unsupported sexp: case_match
|
223
|
+
fails "Pattern matching Array pattern matches anything with *" # Opal::SyntaxError: Unsupported sexp: case_match
|
224
|
+
fails "Pattern matching Array pattern raises TypeError if #deconstruct method does not return array" # Expected TypeError (/deconstruct must return Array/) but got: Opal::SyntaxError (Unsupported sexp: case_match)
|
225
|
+
fails "Pattern matching Array pattern supports form Constant(pat, pat, ...)" # Opal::SyntaxError: Unsupported sexp: case_match
|
226
|
+
fails "Pattern matching Array pattern supports form Constant[pat, pat, ...]" # Opal::SyntaxError: Unsupported sexp: case_match
|
227
|
+
fails "Pattern matching Array pattern supports form [pat, pat, ...]" # Opal::SyntaxError: Unsupported sexp: case_match
|
228
|
+
fails "Pattern matching Array pattern supports form pat, pat, ..." # Opal::SyntaxError: Unsupported sexp: case_match
|
229
|
+
fails "Pattern matching Array pattern supports splat operator *rest" # Opal::SyntaxError: `rest' is not allowed as a local variable name
|
230
|
+
fails "Pattern matching Hash pattern binds variables" # Opal::SyntaxError: `x' is not allowed as a local variable name
|
231
|
+
fails "Pattern matching Hash pattern calls #deconstruct_keys per pattern" # Opal::SyntaxError: Unsupported sexp: case_match
|
232
|
+
fails "Pattern matching Hash pattern can match partially" # Opal::SyntaxError: Unsupported sexp: case_match
|
233
|
+
fails "Pattern matching Hash pattern can mix key (a:) and key-value (a: b) declarations" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
234
|
+
fails "Pattern matching Hash pattern does not match object if #deconstruct_keys method does not return Hash" # Expected TypeError (/deconstruct_keys must return Hash/) but got: Opal::SyntaxError (Unsupported sexp: case_match)
|
235
|
+
fails "Pattern matching Hash pattern does not match object if #deconstruct_keys method returns Hash with non-symbol keys" # Opal::SyntaxError: Unsupported sexp: case_match
|
236
|
+
fails "Pattern matching Hash pattern does not match object if Constant === object returns false" # Opal::SyntaxError: Unsupported sexp: case_match
|
237
|
+
fails "Pattern matching Hash pattern does not match object if elements of Hash returned by #deconstruct_keys method does not match values in pattern" # Opal::SyntaxError: Unsupported sexp: case_match
|
238
|
+
fails "Pattern matching Hash pattern does not match object without #deconstruct_keys method" # Mock '#<Object:0x78c14>' expected to receive respond_to?("deconstruct_keys") exactly 1 times but received it 0 times
|
239
|
+
fails "Pattern matching Hash pattern matches an object with #deconstruct_keys method which returns a Hash with equal keys and each value in Hash matches value in pattern" # Opal::SyntaxError: Unsupported sexp: case_match
|
240
|
+
fails "Pattern matching Hash pattern matches anything with **" # Opal::SyntaxError: Unsupported sexp: case_match
|
241
|
+
fails "Pattern matching Hash pattern matches {} with {}" # Opal::SyntaxError: Unsupported sexp: case_match
|
242
|
+
fails "Pattern matching Hash pattern passes keys specified in pattern as arguments to #deconstruct_keys method" # Opal::SyntaxError: Unsupported sexp: case_match
|
243
|
+
fails "Pattern matching Hash pattern passes keys specified in pattern to #deconstruct_keys method if pattern contains double splat operator **" # Opal::SyntaxError: Unsupported sexp: case_match
|
244
|
+
fails "Pattern matching Hash pattern passes nil to #deconstruct_keys method if pattern contains double splat operator **rest" # Opal::SyntaxError: `rest' is not allowed as a local variable name
|
245
|
+
fails "Pattern matching Hash pattern raise SyntaxError when keys duplicate in pattern" # Expected SyntaxError (/duplicated key name/) but got: Opal::SyntaxError (duplicate hash pattern key a)
|
246
|
+
fails "Pattern matching Hash pattern supports 'string': key literal" # Opal::SyntaxError: Unsupported sexp: case_match
|
247
|
+
fails "Pattern matching Hash pattern supports a: which means a: a" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
248
|
+
fails "Pattern matching Hash pattern supports double splat operator **rest" # Opal::SyntaxError: `rest' is not allowed as a local variable name
|
249
|
+
fails "Pattern matching Hash pattern supports form Constant(id: pat, id: pat, ...)" # Opal::SyntaxError: Unsupported sexp: case_match
|
250
|
+
fails "Pattern matching Hash pattern supports form Constant[id: pat, id: pat, ...]" # Opal::SyntaxError: Unsupported sexp: case_match
|
251
|
+
fails "Pattern matching Hash pattern supports form id: pat, id: pat, ..." # Opal::SyntaxError: Unsupported sexp: case_match
|
252
|
+
fails "Pattern matching Hash pattern supports form {id: pat, id: pat, ...}" # Opal::SyntaxError: Unsupported sexp: case_match
|
253
|
+
fails "Pattern matching Hash pattern treats **nil like there should not be any other keys in a matched Hash" # Opal::SyntaxError: Unsupported sexp: case_match
|
254
|
+
fails "Pattern matching allows using then operator" # Opal::SyntaxError: Unsupported sexp: case_match
|
255
|
+
fails "Pattern matching alternative pattern does not support variable binding" # Expected SyntaxError (/illegal variable in alternative pattern/) but got: Opal::SyntaxError (`a' is not allowed as a local variable name)
|
256
|
+
fails "Pattern matching alternative pattern matches if any of patterns matches" # Opal::SyntaxError: Unsupported sexp: case_match
|
257
|
+
fails "Pattern matching alternative pattern support underscore prefixed variables in alternation" # Opal::SyntaxError: `_' is not allowed as a local variable name
|
258
|
+
fails "Pattern matching binds variables" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
259
|
+
fails "Pattern matching can be standalone assoc operator that deconstructs value" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
260
|
+
fails "Pattern matching cannot mix in and when operators" # Expected SyntaxError (/syntax error, unexpected `in'/) but got: Opal::SyntaxError (unexpected token kIN)
|
261
|
+
fails "Pattern matching checks patterns until the first matching" # Opal::SyntaxError: Unsupported sexp: case_match
|
262
|
+
fails "Pattern matching evaluates the case expression once for multiple patterns, caching the result" # Opal::SyntaxError: Unsupported sexp: case_match
|
263
|
+
fails "Pattern matching executes else clause if no pattern matches" # Opal::SyntaxError: Unsupported sexp: case_match
|
264
|
+
fails "Pattern matching extends case expression with case/in construction" # Opal::SyntaxError: Unsupported sexp: case_match
|
265
|
+
fails "Pattern matching guards does not evaluate guard if pattern does not match" # Opal::SyntaxError: Unsupported sexp: case_match
|
266
|
+
fails "Pattern matching guards executes else clause if no guarded pattern matches" # Opal::SyntaxError: Unsupported sexp: case_match
|
267
|
+
fails "Pattern matching guards makes bound variables visible in guard" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
268
|
+
fails "Pattern matching guards raises NoMatchingPatternError if no guarded pattern matches and no else clause" # NameError: uninitialized constant NoMatchingPatternError
|
269
|
+
fails "Pattern matching guards supports if guard" # Opal::SyntaxError: Unsupported sexp: case_match
|
270
|
+
fails "Pattern matching guards supports unless guard" # Opal::SyntaxError: Unsupported sexp: case_match
|
271
|
+
fails "Pattern matching guards takes guards into account when there are several matching patterns" # Opal::SyntaxError: Unsupported sexp: case_match
|
272
|
+
fails "Pattern matching raises NoMatchingPatternError if no pattern matches and no else clause" # NameError: uninitialized constant NoMatchingPatternError
|
273
|
+
fails "Pattern matching refinements are used for #=== in constant pattern" # NoMethodError: undefined method `refine' for #<Module:0x79d4c>
|
274
|
+
fails "Pattern matching refinements are used for #deconstruct" # NoMethodError: undefined method `refine' for #<Module:0x79d50>
|
275
|
+
fails "Pattern matching refinements are used for #deconstruct_keys" # NoMethodError: undefined method `refine' for #<Module:0x79d54>
|
276
|
+
fails "Pattern matching value pattern allows string literal with interpolation" # Opal::SyntaxError: Unsupported sexp: case_match
|
277
|
+
fails "Pattern matching value pattern matches an object such that pattern === object" # Opal::SyntaxError: Unsupported sexp: case_match
|
278
|
+
fails "Pattern matching variable pattern allow using _ name to drop values" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
279
|
+
fails "Pattern matching variable pattern allows applying ^ operator to bound variables" # Opal::SyntaxError: `n' is not allowed as a local variable name
|
280
|
+
fails "Pattern matching variable pattern create local variables even if a pattern doesn't match" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
281
|
+
fails "Pattern matching variable pattern does not support using variable name (except _) several times" # Expected SyntaxError (/duplicated variable name/) but got: Opal::SyntaxError (`a' is not allowed as a local variable name)
|
282
|
+
fails "Pattern matching variable pattern makes bounded variable visible outside a case statement scope" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
283
|
+
fails "Pattern matching variable pattern matches a value and binds variable name to this value" # Opal::SyntaxError: `a' is not allowed as a local variable name
|
284
|
+
fails "Pattern matching variable pattern requires bound variable to be specified in a pattern before ^ operator when it relies on a bound variable" # Expected SyntaxError (/n: no such local variable/) but got: Opal::SyntaxError (no such local variable: `n')
|
285
|
+
fails "Pattern matching variable pattern supports existing variables in a pattern specified with ^ operator" # Opal::SyntaxError: no such local variable: `a'
|
286
|
+
fails "Pattern matching variable pattern supports using _ in a pattern several times" # Opal::SyntaxError: `_' is not allowed as a local variable name
|
287
|
+
fails "Pattern matching variable pattern supports using any name with _ at the beginning in a pattern several times" # Opal::SyntaxError: `_x' is not allowed as a local variable name
|
288
|
+
fails "Pattern matching warning warns about pattern matching is experimental feature" # NameError: uninitialized constant Warning
|
289
|
+
fails "Post-args with optional args with a circular argument reference shadows an existing local with the same name as the argument"
|
290
|
+
fails "Post-args with optional args with a circular argument reference shadows an existing method with the same name as the argument"
|
291
|
+
fails "Post-args with optional args with a circular argument reference warns and uses a nil value when there is an existing local variable with same name" # Expected warning to match: /circular argument reference/ but got: ""
|
292
|
+
fails "Post-args with optional args with a circular argument reference warns and uses a nil value when there is an existing method with same name" # Expected warning to match: /circular argument reference/ but got: ""
|
293
|
+
fails "Predefined global $+ captures the last non nil capture"
|
294
|
+
fails "Predefined global $+ is equivalent to $~.captures.last"
|
295
|
+
fails "Predefined global $, raises TypeError if assigned a non-String"
|
296
|
+
fails "Predefined global $-0 changes $/"
|
297
|
+
fails "Predefined global $-0 does not call #to_str to convert the object to a String"
|
298
|
+
fails "Predefined global $-0 raises a TypeError if assigned a Fixnum"
|
299
|
+
fails "Predefined global $-0 raises a TypeError if assigned a boolean"
|
300
|
+
fails "Predefined global $-0 raises a TypeError if assigned an Integer" # Expected TypeError but no exception was raised (1 was returned)
|
301
|
+
fails "Predefined global $. can be assigned a Float" # Expected 123.5 to equal 123
|
302
|
+
fails "Predefined global $. raises TypeError if object can't be converted to an Integer" # Expected TypeError but no exception was raised (#<MockObject:0x518b4> was returned)
|
303
|
+
fails "Predefined global $. should call #to_int to convert the object to an Integer" # Expected #<MockObject:0x518c2> to equal 321
|
304
|
+
fails "Predefined global $/ changes $-0"
|
305
|
+
fails "Predefined global $/ does not call #to_str to convert the object to a String"
|
306
|
+
fails "Predefined global $/ raises a TypeError if assigned a Fixnum"
|
307
|
+
fails "Predefined global $/ raises a TypeError if assigned a boolean"
|
308
|
+
fails "Predefined global $/ raises a TypeError if assigned an Integer" # Expected TypeError but no exception was raised (#<Number>(#pretty_inspect raised #<TypeError: no implicit conversion of Number into String>) was returned)
|
309
|
+
fails "Predefined global $_ is Thread-local"
|
310
|
+
fails "Predefined global $_ is set at the method-scoped level rather than block-scoped"
|
311
|
+
fails "Predefined global $_ is set to the last line read by e.g. StringIO#gets"
|
312
|
+
fails "Predefined global $stdout raises TypeError error if assigned to nil"
|
313
|
+
fails "Predefined global $stdout raises TypeError error if assigned to object that doesn't respond to #write"
|
314
|
+
fails "Predefined global $~ is set at the method-scoped level rather than block-scoped"
|
315
|
+
fails "Predefined global $~ raises an error if assigned an object not nil or instanceof MatchData"
|
316
|
+
fails "Ruby String interpolation returns a string with the source encoding by default" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT (dummy)> to be truthy but was false
|
317
|
+
fails "Ruby String interpolation returns a string with the source encoding, even if the components have another encoding" # ArgumentError: unknown encoding name - euc-jp
|
318
|
+
fails "Safe navigator allows assignment methods"
|
319
|
+
fails "Safe navigator allows assignment operators"
|
320
|
+
fails "Safe navigator does not call the operator method lazily with an assignment operator"
|
321
|
+
fails "The =~ operator with named captures on syntax of 'string_literal' =~ /regexp/ does not set local variables" # Exception: named captures are not supported in javascript: "(?<matched>foo)(?<unmatched>bar)?"
|
322
|
+
fails "The =~ operator with named captures on syntax of /regexp/ =~ string_variable sets local variables by the captured pairs"
|
323
|
+
fails "The =~ operator with named captures on syntax of regexp_variable =~ string_variable does not set local variables"
|
324
|
+
fails "The =~ operator with named captures on syntax of string_variable =~ /regexp/ does not set local variables"
|
325
|
+
fails "The =~ operator with named captures on the method calling does not set local variables"
|
326
|
+
fails "The BEGIN keyword accesses variables outside the eval scope"
|
327
|
+
fails "The BEGIN keyword runs first in a given code unit"
|
328
|
+
fails "The BEGIN keyword runs in a shared scope"
|
329
|
+
fails "The BEGIN keyword runs multiple begins in FIFO order"
|
330
|
+
fails "The BEGIN keyword uses top-level for self" # NameError: uninitialized constant TOPLEVEL_BINDING
|
331
|
+
fails "The END keyword runs last in a given code unit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1e972>
|
332
|
+
fails "The END keyword runs multiple ends in LIFO order" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1e972>
|
333
|
+
fails "The END keyword runs only once for multiple calls" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1e972>
|
334
|
+
fails "The __ENCODING__ pseudo-variable is US-ASCII by default"
|
335
|
+
fails "The __ENCODING__ pseudo-variable is the encoding specified by a magic comment in the file"
|
336
|
+
fails "The __ENCODING__ pseudo-variable is the encoding specified by a magic comment inside an eval"
|
337
|
+
fails "The __ENCODING__ pseudo-variable is the evaluated strings's one inside an eval"
|
338
|
+
fails "The __FILE__ pseudo-variable equals the absolute path of a file loaded by a relative path" # we can't clear $LOADED_FEATURES, should be treated as readonly
|
339
|
+
fails "The __FILE__ pseudo-variable equals the absolute path of a file loaded by an absolute path" # we can't clear $LOADED_FEATURES, should be treated as readonly
|
340
|
+
fails "The __LINE__ pseudo-variable equals the line number of the text in a loaded file"
|
341
|
+
fails "The alias keyword can create a new global variable, synonym of the original" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x4478>
|
342
|
+
fails "The alias keyword can override an existing global variable and make them synonyms" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x4478>
|
343
|
+
fails "The alias keyword is not allowed against Fixnum or String instances"
|
344
|
+
fails "The alias keyword is not allowed against Integer or String instances" # Expected TypeError but got: Exception (Cannot read property '$to_s' of undefined)
|
345
|
+
fails "The alias keyword on top level defines the alias on Object"
|
346
|
+
fails "The alias keyword operates on methods defined via attr, attr_reader, and attr_accessor"
|
347
|
+
fails "The alias keyword operates on the object's metaclass when used in instance_eval"
|
348
|
+
fails "The alias keyword supports aliasing twice the same global variables" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x22a72>
|
349
|
+
fails "The break statement in a captured block from a scope that has returned raises a LocalJumpError when calling the block from a method"
|
350
|
+
fails "The break statement in a captured block from a scope that has returned raises a LocalJumpError when yielding to the block"
|
351
|
+
fails "The break statement in a captured block from another thread raises a LocalJumpError when getting the value from another thread" # NameError: uninitialized constant Thread
|
352
|
+
fails "The break statement in a captured block when the invocation of the scope creating the block is still active raises a LocalJumpError when invoking the block from a method"
|
353
|
+
fails "The break statement in a captured block when the invocation of the scope creating the block is still active raises a LocalJumpError when invoking the block from the scope creating the block"
|
354
|
+
fails "The break statement in a captured block when the invocation of the scope creating the block is still active raises a LocalJumpError when yielding to the block"
|
355
|
+
fails "The break statement in a lambda created at the toplevel returns a value when invoking from a block"
|
356
|
+
fails "The break statement in a lambda created at the toplevel returns a value when invoking from a method"
|
357
|
+
fails "The break statement in a lambda created at the toplevel returns a value when invoking from the toplevel"
|
358
|
+
fails "The break statement in a lambda from a scope that has returned raises a LocalJumpError when yielding to a lambda passed as a block argument"
|
359
|
+
fails "The break statement in a lambda from a scope that has returned returns a value to the block scope invoking the lambda in a method" # Exception: $brk is not defined
|
360
|
+
fails "The break statement in a lambda from a scope that has returned returns a value to the method scope invoking the lambda" # Exception: $brk is not defined
|
361
|
+
fails "The break statement in a lambda returns from the call site if the lambda is passed as a block" # Expected ["before", "unreachable1", "unreachable2", "after"] to equal ["before", "after"]
|
362
|
+
fails "The break statement in a lambda when the invocation of the scope creating the lambda is still active returns a value to a block scope invoking the lambda in a method below" # Exception: $brk is not defined
|
363
|
+
fails "The break statement in a lambda when the invocation of the scope creating the lambda is still active returns a value to the method scope below invoking the lambda" # Exception: $brk is not defined
|
364
|
+
fails "The break statement in a lambda when the invocation of the scope creating the lambda is still active returns a value to the scope creating and calling the lambda" # Exception: $brk is not defined
|
365
|
+
fails "The break statement in a lambda when the invocation of the scope creating the lambda is still active returns from the lambda" # Exception: unexpected break
|
366
|
+
fails "The break statement in a lambda when the invocation of the scope creating the lambda is still active returns nil when not passed an argument" # Exception: $brk is not defined
|
367
|
+
fails "The class keyword does not raise a SyntaxError when opening a class without a semicolon" # NameError: uninitialized constant ClassSpecsKeywordWithoutSemicolon
|
368
|
+
fails "The def keyword within a closure looks outside the closure for the visibility"
|
369
|
+
fails "The defined? keyword for a scoped constant returns nil when a constant is defined on top-level but not on the class" # Expected "constant" to be nil
|
370
|
+
fails "The defined? keyword for variables returns 'instance-variable' for an instance variable that has been assigned to nil"
|
371
|
+
fails "The defined? keyword for variables returns nil for a global variable that has been read but not assigned to"
|
372
|
+
fails "The defined? keyword for variables when a Regexp matches a String returns nil for non-captures"
|
373
|
+
fails "The defined? keyword for variables when a String matches a Regexp returns nil for non-captures"
|
374
|
+
fails "The if expression accepts multiple assignments in conditional expression with nil values" # NoMethodError: undefined method `ary' for #<MSpecEnv:0x50754>
|
375
|
+
fails "The if expression accepts multiple assignments in conditional expression with non-nil values" # NoMethodError: undefined method `ary' for #<MSpecEnv:0x50754>
|
376
|
+
fails "The if expression with a boolean range ('flip-flop' operator) allows combining two flip-flops"
|
377
|
+
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with exclusive-end range"
|
378
|
+
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with inclusive-end range"
|
379
|
+
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the second conditions lazily with exclusive-end range"
|
380
|
+
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the second conditions lazily with inclusive-end range"
|
381
|
+
fails "The if expression with a boolean range ('flip-flop' operator) keeps flip-flops from interfering"
|
382
|
+
fails "The if expression with a boolean range ('flip-flop' operator) mimics a sed conditional with a many-element exclusive-end range"
|
383
|
+
fails "The if expression with a boolean range ('flip-flop' operator) mimics a sed conditional with a zero-element exclusive-end range"
|
384
|
+
fails "The if expression with a boolean range ('flip-flop' operator) mimics an awk conditional with a many-element inclusive-end range"
|
385
|
+
fails "The if expression with a boolean range ('flip-flop' operator) mimics an awk conditional with a single-element inclusive-end range"
|
386
|
+
fails "The if expression with a boolean range ('flip-flop' operator) scopes state by flip-flop"
|
387
|
+
fails "The or operator has a lower precedence than 'next' in 'next true or false'"
|
388
|
+
fails "The predefined global constants includes TOPLEVEL_BINDING"
|
389
|
+
fails "The redo statement in a method is invalid and raises a SyntaxError"
|
390
|
+
fails "The redo statement triggers ensure block when re-executing a block"
|
391
|
+
fails "The rescue keyword can capture the raised exception using a setter method" # NoMethodError: undefined method `message' for nil
|
392
|
+
fails "The rescue keyword can capture the raised exception using a square brackets setter" # ArgumentError: [SquareBracketsCaptor#[]=] wrong number of arguments(1 for 2)
|
393
|
+
fails "The rescue keyword inline form can be inlined" # Expected Infinity to equal 1
|
394
|
+
fails "The rescue keyword only accepts Module or Class in rescue clauses" # RuntimeError: error
|
395
|
+
fails "The rescue keyword only accepts Module or Class in splatted rescue clauses" # RuntimeError: error
|
396
|
+
fails "The rescue keyword rescues the exception in the deepest rescue block declared to handle the appropriate exception type" # Expected "StandardError: an error occurred" to include ":in `raise_standard_error'"
|
397
|
+
fails "The rescue keyword will execute an else block even without rescue and ensure" # Expected warning to match: /else without rescue is useless/ but got: ""
|
398
|
+
fails "The rescue keyword without rescue expression will not rescue exceptions except StandardError" # NameError: uninitialized constant SystemStackError
|
399
|
+
fails "The retry keyword inside a begin block's rescue block causes the begin block to be executed again"
|
400
|
+
fails "The retry statement raises a SyntaxError when used outside of a begin statement"
|
401
|
+
fails "The retry statement re-executes the closest block"
|
402
|
+
fails "The return keyword at top level return with argument warns but does not affect exit status" # Exception: path.substr is not a function
|
403
|
+
fails "The return keyword at top level within a block within a class is allowed" # Exception: path.substr is not a function
|
404
|
+
fails "The return keyword at top level within a block within a class is not allowed" # Exception: path.substr is not a function
|
405
|
+
fails "The super keyword passes along modified rest args when they were originally empty"
|
406
|
+
fails "The super keyword passes along modified rest args when they weren't originally empty"
|
407
|
+
fails "The super keyword passes along reassigned rest args" # Expected ["bar"] to equal ["foo"]
|
408
|
+
fails "The super keyword uses block argument given to method when used in a block" # LocalJumpError: no block given
|
409
|
+
fails "The super keyword uses given block even if arguments are passed explicitly"
|
410
|
+
fails "The super keyword when using keyword arguments passes any given keyword arguments including optional and required ones to the parent"
|
411
|
+
fails "The super keyword when using keyword arguments passes default argument values to the parent" # Expected {} to equal {"b"=>"b"}
|
412
|
+
fails "The super keyword when using regular and keyword arguments passes default argument values to the parent" # Expected ["a", {}] to equal ["a", {"c"=>"c"}]
|
413
|
+
fails "The super keyword without explicit arguments passes arguments and rest arguments including any modifications"
|
414
|
+
fails "The super keyword without explicit arguments passes arguments, rest arguments including modifications, and post arguments" # Expected [1, 2, 3] == [1, 14, 3] to be truthy but was false
|
415
|
+
fails "The super keyword without explicit arguments passes optional arguments that have a default value but were modified"
|
416
|
+
fails "The super keyword without explicit arguments passes optional arguments that have a default value"
|
417
|
+
fails "The super keyword without explicit arguments passes optional arguments that have a non-default value but were modified"
|
418
|
+
fails "The super keyword without explicit arguments passes rest arguments including any modifications"
|
419
|
+
fails "The super keyword without explicit arguments that are '_' including any modifications" # Expected [1, 2] to equal [14, 2]
|
420
|
+
fails "The super keyword wraps into array and passes along reassigned rest args with non-array scalar value" # Expected ["bar"] to equal ["foo"]
|
421
|
+
fails "The throw keyword raises an UncaughtThrowError if used to exit a thread" # NotImplementedError: Thread creation not available
|
422
|
+
fails "The unpacking splat operator (*) when applied to a BasicObject coerces it to Array if it respond_to?(:to_a)" # NoMethodError: undefined method `respond_to?' for BasicObject
|
423
|
+
fails "The until expression restarts the current iteration without reevaluating condition with redo"
|
424
|
+
fails "The until modifier restarts the current iteration without reevaluating condition with redo"
|
425
|
+
fails "The until modifier with begin .. end block evaluates condition after block execution"
|
426
|
+
fails "The until modifier with begin .. end block restart the current iteration without reevaluating condition with redo" # Expected [1] to equal [0, 0, 0, 1, 2]
|
427
|
+
fails "The until modifier with begin .. end block runs block at least once (even if the expression is true)"
|
428
|
+
fails "The until modifier with begin .. end block skips to end of body with next"
|
429
|
+
fails "The while expression stops running body if interrupted by break in a begin ... end element op-assign value"
|
430
|
+
fails "The while expression stops running body if interrupted by break in a parenthesized element op-assign value"
|
431
|
+
fails "The while modifier with begin .. end block evaluates condition after block execution"
|
432
|
+
fails "The while modifier with begin .. end block restarts the current iteration without reevaluating condition with redo" # Expected [1, 1, 1, 2] to equal [0, 0, 0, 1, 2]
|
433
|
+
fails "The while modifier with begin .. end block runs block at least once (even if the expression is false)"
|
434
|
+
fails "The while modifier with begin .. end block skips to end of body with next"
|
435
|
+
fails "The yield call taking a single argument yielding to a lambda should not destructure an Array into multiple arguments" # Expected ArgumentError but no exception was raised ([1, 2] was returned)
|
436
|
+
fails "The yield call taking no arguments ignores assignment to the explicit block argument and calls the passed block"
|
437
|
+
fails "a method definition that sets more than one default parameter all to the same value only allows overriding the default value of the first such parameter in each set" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(2 for -1)
|
438
|
+
fails "a method definition that sets more than one default parameter all to the same value treats the argument after the multi-parameter normally" # ArgumentError: [MSpecEnv#bar] wrong number of arguments(3 for -1)
|
439
|
+
fails "delegation with def(...) delegates block" # Opal::SyntaxError: Unsupported sexp: forward_args
|
440
|
+
fails "delegation with def(...) delegates rest and kwargs" # Opal::SyntaxError: Unsupported sexp: forward_args
|
441
|
+
fails "delegation with def(...) parses as open endless Range when brackets are omitted" # Opal::SyntaxError: Unsupported sexp: forward_args
|
442
|
+
fails "self in a metaclass body (class << obj) raises a TypeError for numbers"
|
443
|
+
fails "self in a metaclass body (class << obj) raises a TypeError for symbols"
|
444
|
+
fails "self.send(:block_given?) returns false when a method defined by define_method is called with a block"
|
445
|
+
fails "self.send(:block_given?) returns true if and only if a block is supplied"
|
446
|
+
fails "top-level constant lookup on a class does not search Object after searching other scopes" # Expected NameError but no exception was raised (Hash was returned)
|
447
|
+
fails_badly "The while expression stops running body if interrupted by break in a begin ... end attribute op-assign-or value"
|
448
|
+
fails_badly "The while expression stops running body if interrupted by break in a parenthesized attribute op-assign-or value"
|
449
|
+
fails_badly "The while expression stops running body if interrupted by break with unless in a begin ... end attribute op-assign-or value"
|
450
|
+
fails_badly "The while expression stops running body if interrupted by break with unless in a parenthesized attribute op-assign-or value"
|
451
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Marshal" do
|
3
|
+
fails "Marshal.dump ignores the recursion limit if the limit is negative" # no support yet
|
4
|
+
fails "Marshal.dump raises a TypeError if dumping a Mutex instance" # Expected TypeError but no exception was raised ("\u0004\bo:\nMutex\u0006:\f@lockedF" was returned)
|
5
|
+
fails "Marshal.dump when passed a StringIO should raise an error" # Expected TypeError but no exception was raised ("\u0004\bo:\rStringIO\a:\f@string\"\u0000:\u000E@positioni\u0000" was returned)
|
6
|
+
fails "Marshal.dump with a Range dumps a Range with extra instance variables" # Expected nil to equal 42
|
7
|
+
fails "Marshal.dump with a Regexp dumps a Regexp subclass" # requires Class.new(Regexp).new("").class != Regexp
|
8
|
+
fails "Marshal.dump with a Regexp dumps a Regexp with instance variables" # //.source.should == ''
|
9
|
+
fails "Marshal.dump with a Time dumps the zone and the offset"
|
10
|
+
fails "Marshal.dump with a Time dumps the zone, but not the offset if zone is UTC" # NoMethodError: undefined method `default_internal' for Encoding
|
11
|
+
fails "Marshal.dump with an Exception contains the filename in the backtrace"
|
12
|
+
fails "Marshal.dump with an Exception dumps an empty Exception"
|
13
|
+
fails "Marshal.dump with an Exception dumps instance variables if they exist" # Expected "\u0004\bo:\u000EException\a: @name\"\u000EException: @ivari\u0006" == "\u0004\bo:\u000EException\b:\tmesg\"\bfoo:\abt0: @ivari\u0006" to be truthy but was false
|
14
|
+
fails "Marshal.dump with an Exception dumps the cause for the exception" # NoMethodError: undefined method `cause' for #<RuntimeError: the consequence>
|
15
|
+
fails "Marshal.dump with an Exception dumps the message for the exception"
|
16
|
+
fails "Marshal.dump with an Object dumps a BasicObject subclass if it defines respond_to?"
|
17
|
+
fails "Marshal.dump with an Object dumps an Object with a non-US-ASCII instance variable" # NameError: '@é' is not allowed as an instance variable name
|
18
|
+
fails "Marshal.dump with an Object raises if an Object has a singleton class and singleton methods" # Expected TypeError (singleton can't be dumped) but no exception was raised ("\u0004\bo:\vObject\u0000" was returned)
|
19
|
+
fails "Marshal.dump with an object responding to #_dump dumps the object returned by #marshal_dump"
|
20
|
+
fails "Marshal.load for a Module loads an old module"
|
21
|
+
fails "Marshal.load for a Regexp loads a extended_user_regexp having ivar"
|
22
|
+
fails "Marshal.load for a Regexp loads an extended Regexp" # Expected /[a-z]/ == /(?:)/ to be truthy but was false
|
23
|
+
fails "Marshal.load for a String loads a String as BINARY if no encoding is specified at the end" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
24
|
+
fails "Marshal.load for a Struct does not call initialize on the unmarshaled struct"
|
25
|
+
fails "Marshal.load for a Symbol loads a Symbol" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
26
|
+
fails "Marshal.load for a Symbol loads a binary encoded Symbol" # Expected "â\u0086\u0092" to equal "→"
|
27
|
+
fails "Marshal.load for a Symbol loads an encoded Symbol" # Expected "â\u0086\u0092" to equal "→"
|
28
|
+
fails "Marshal.load for a Time loads nanoseconds"
|
29
|
+
fails "Marshal.load for a Time loads"
|
30
|
+
fails "Marshal.load for a user Class raises ArgumentError if the object from an 'o' stream is not dumpable as 'o' type user class"
|
31
|
+
fails "Marshal.load for a user Class that extends a core type other than Object or BasicObject raises ArgumentError if the resulting class does not extend the same type"
|
32
|
+
fails "Marshal.load for a user object that extends a core type other than Object or BasicObject raises ArgumentError if the resulting class does not extend the same type" # TypeError: no implicit conversion of Hash into Integer
|
33
|
+
fails "Marshal.load for an Exception loads a marshalled exception with a backtrace"
|
34
|
+
fails "Marshal.load for an Exception loads a marshalled exception with a message"
|
35
|
+
fails "Marshal.load for an Exception loads a marshalled exception with no message"
|
36
|
+
fails "Marshal.load for an Exception loads an marshalled exception with ivars" # Expected "Exception" == "foo" to be truthy but was false
|
37
|
+
fails "Marshal.load for an Integer loads an Integer -2361183241434822606847" # Expected -2 == -2.3611832414348226e+21 to be truthy but was false
|
38
|
+
fails "Marshal.load for an Integer loads an Integer 2361183241434822606847" # Expected 2 == 2.3611832414348226e+21 to be truthy but was false
|
39
|
+
fails "Marshal.load for an Object loads an Object with a non-US-ASCII instance variable" # NameError: '@é' is not allowed as an instance variable name
|
40
|
+
fails "Marshal.load for an Object raises ArgumentError if the object from an 'o' stream is not dumpable as 'o' type user class" # Expected ArgumentError but no exception was raised (#<File:0x3b160> was returned)
|
41
|
+
fails "Marshal.load loads a Integer 2**90" # Expected 1 == 1.2379400392853803e+27 to be truthy but was false
|
42
|
+
fails "Marshal.load loads a Regexp" # anchors difference
|
43
|
+
fails "Marshal.load loads an array containing objects having _dump method, and with proc"
|
44
|
+
fails "Marshal.load loads an array containing objects having marshal_dump method, and with proc"
|
45
|
+
fails "Marshal.load when a class does not exist in the namespace raises an ArgumentError" # an issue with constant resolving, e.g. String::Array
|
46
|
+
fails "Marshal.load when called with a proc calls the proc for recursively visited data"
|
47
|
+
fails "Marshal.load when called with a proc loads an Array with proc"
|
48
|
+
fails "Marshal.load when called with a proc returns the value of the proc"
|
49
|
+
fails "Marshal.load when called with nil for the proc argument behaves as if no proc argument was passed" # ArgumentError: [Marshal.load] wrong number of arguments(2 for 1)
|
50
|
+
end
|