opal 1.0.4 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.codeclimate.yml +13 -12
- data/.gitattributes +1 -1
- data/.github/workflows/build.yml +23 -10
- 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 +138 -1
- data/Gemfile +1 -2
- 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/remove-filters +39 -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 +10 -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/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 +2 -1
- 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/releasing.rake +0 -3
- 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 +1114 -3
- metadata +893 -33
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac8b5ed5a8d6ca758a11a21e74a5f2d04f97e90dfdd0e5a6a95322c44cc22c38
|
|
4
|
+
data.tar.gz: 85a1a6c74a8a25628f56a72ad1731692fb0e02a969712bf0f44cf3bc9f643c22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a60db99a26bd216ef138b5b085d9da2ee2a741a870c4bd524445fef3e0d16ad28cf4e0d485c16113da022d35fda782849ccfe5c604a01f99e55ff14045daa86
|
|
7
|
+
data.tar.gz: b068c7a82210a814f8c6a9420823a3aaa16834e25028ef179172570435e26858dcce888e2a4d0e80a611e08e2654facaa5a7bb0c2f829773eea3e917d0447456
|
data/.codeclimate.yml
CHANGED
|
@@ -38,15 +38,16 @@ plugins:
|
|
|
38
38
|
channel: rubocop-0-53
|
|
39
39
|
|
|
40
40
|
exclude_patterns:
|
|
41
|
-
- "benchmark/*"
|
|
42
|
-
- "build/*"
|
|
43
|
-
- "coverage/*"
|
|
44
|
-
- "docs/*"
|
|
45
|
-
- "examples/*"
|
|
46
|
-
- "tasks/*"
|
|
47
|
-
- "spec/*"
|
|
48
|
-
- "test/*"
|
|
49
|
-
- "vendored-minitest/*"
|
|
50
|
-
- "**/node_modules/*"
|
|
51
|
-
- stdlib/nodejs/js-yaml-3-6-1.js
|
|
52
|
-
- lib/opal/source_map/vlq.rb
|
|
41
|
+
- "benchmark/*"
|
|
42
|
+
- "build/*"
|
|
43
|
+
- "coverage/*"
|
|
44
|
+
- "docs/*"
|
|
45
|
+
- "examples/*"
|
|
46
|
+
- "tasks/*"
|
|
47
|
+
- "spec/*"
|
|
48
|
+
- "test/*"
|
|
49
|
+
- "vendored-minitest/*"
|
|
50
|
+
- "**/node_modules/*"
|
|
51
|
+
- stdlib/nodejs/js-yaml-3-6-1.js
|
|
52
|
+
- lib/opal/source_map/vlq.rb
|
|
53
|
+
- lib/opal/cli_runners/source-map-support*.js
|
data/.gitattributes
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
UNRELEASED.md merge=union
|
data/.github/workflows/build.yml
CHANGED
|
@@ -17,23 +17,36 @@ jobs:
|
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
19
|
combo:
|
|
20
|
+
- name: mspec-nodejs
|
|
21
|
+
ruby: 3.0
|
|
22
|
+
command: bin/rake mspec_nodejs
|
|
23
|
+
- name: mspec-chrome
|
|
24
|
+
ruby: 3.0
|
|
25
|
+
command: bin/rake mspec_chrome
|
|
26
|
+
- name: minitest
|
|
27
|
+
ruby: 3.0
|
|
28
|
+
command: bin/rake minitest
|
|
20
29
|
- name: current-ruby
|
|
21
|
-
|
|
22
|
-
ruby: 2.7
|
|
30
|
+
ruby: 3.0
|
|
23
31
|
- name: previous-ruby
|
|
24
|
-
ruby: 2.
|
|
32
|
+
ruby: 2.7
|
|
25
33
|
- name: older-ruby
|
|
34
|
+
ruby: 2.6
|
|
35
|
+
- name: near-eol-ruby
|
|
26
36
|
ruby: 2.5
|
|
37
|
+
- name: smoke-test
|
|
38
|
+
ruby: 3.0
|
|
39
|
+
command: bin/rake smoke_test
|
|
27
40
|
- name: windows
|
|
28
41
|
# These two fail because of broken stacktraces on windows: minitest_node_nodejs mspec_nodejs
|
|
29
42
|
command: bundle exec rake rspec minitest_nodejs
|
|
30
|
-
ruby:
|
|
43
|
+
ruby: 3.0
|
|
31
44
|
os: windows-latest
|
|
32
45
|
- name: lint
|
|
33
46
|
command: bin/rake lint
|
|
34
|
-
ruby:
|
|
47
|
+
ruby: 3.0
|
|
35
48
|
- name: timezone
|
|
36
|
-
ruby:
|
|
49
|
+
ruby: 3.0
|
|
37
50
|
|
|
38
51
|
# Currently failing:
|
|
39
52
|
# - ruby: truffleruby
|
|
@@ -49,12 +62,12 @@ jobs:
|
|
|
49
62
|
# NOTE: Bundler 2.2.0 fails to install libv8
|
|
50
63
|
# https://github.com/rubyjs/libv8/issues/310
|
|
51
64
|
bundler: "2.1.4"
|
|
52
|
-
bundler-cache:
|
|
65
|
+
bundler-cache: false
|
|
53
66
|
- run: ruby bin/git-submodule-fast-install
|
|
54
67
|
- run: bundle lock
|
|
55
68
|
- uses: actions/cache@v2
|
|
56
69
|
with:
|
|
57
|
-
path: vendor/bundle
|
|
70
|
+
path: ./vendor/bundle
|
|
58
71
|
key: ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}-${{ hashFiles('**/Gemfile.lock') }}
|
|
59
72
|
restore-keys: |
|
|
60
73
|
${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}
|
|
@@ -62,7 +75,7 @@ jobs:
|
|
|
62
75
|
${{ runner.os }}-${{ matrix.combo.ruby }}-gems-
|
|
63
76
|
- uses: actions/cache@v2
|
|
64
77
|
with:
|
|
65
|
-
path: node_modules
|
|
78
|
+
path: ./node_modules
|
|
66
79
|
key: ${{ runner.os }}-npm-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
|
|
67
80
|
restore-keys: |
|
|
68
81
|
${{ runner.os }}-npm-${{ github.ref }}
|
|
@@ -71,7 +84,7 @@ jobs:
|
|
|
71
84
|
- run: yarn install
|
|
72
85
|
- name: bundle install
|
|
73
86
|
run: |
|
|
74
|
-
bundle config path vendor/bundle
|
|
87
|
+
bundle config path $PWD/vendor/bundle
|
|
75
88
|
bundle install --jobs 4 --retry 3
|
|
76
89
|
bundle clean
|
|
77
90
|
- run: ${{ matrix.combo.command || 'bin/rake rspec' }}
|
data/.jshintrc
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"undef" : true, // Prohibit the use of explicitly undeclared variables
|
|
11
11
|
"unused" : true, // Warn when you define and never use your variables
|
|
12
12
|
|
|
13
|
-
"predef" : ["Opal", "JSON", "Java", "OpalNode", "jsyaml"],
|
|
13
|
+
"predef" : ["Opal", "JSON", "Java", "OpalNode", "jsyaml", "globalThis"],
|
|
14
14
|
|
|
15
15
|
"browser": true,
|
|
16
16
|
"node": true,
|
data/.overcommit.yml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Use this file to configure the Overcommit hooks you wish to use. This will
|
|
2
|
+
# extend the default configuration defined in:
|
|
3
|
+
# https://github.com/sds/overcommit/blob/master/config/default.yml
|
|
4
|
+
#
|
|
5
|
+
# At the topmost level of this YAML file is a key representing type of hook
|
|
6
|
+
# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
|
|
7
|
+
# customize each hook, such as whether to only run it on certain files (via
|
|
8
|
+
# `include`), whether to only display output if it fails (via `quiet`), etc.
|
|
9
|
+
#
|
|
10
|
+
# For a complete list of hooks, see:
|
|
11
|
+
# https://github.com/sds/overcommit/tree/master/lib/overcommit/hook
|
|
12
|
+
#
|
|
13
|
+
# For a complete list of options that you can use to customize hooks, see:
|
|
14
|
+
# https://github.com/sds/overcommit#configuration
|
|
15
|
+
#
|
|
16
|
+
# Uncomment the following lines to make the configuration take effect.
|
|
17
|
+
|
|
18
|
+
gemfile: Gemfile
|
|
19
|
+
|
|
20
|
+
PreCommit:
|
|
21
|
+
RuboCop:
|
|
22
|
+
enabled: true
|
|
23
|
+
on_warn: fail # Treat all warnings as failures
|
|
24
|
+
|
|
25
|
+
TrailingWhitespace:
|
|
26
|
+
enabled: true
|
|
27
|
+
# exclude:
|
|
28
|
+
# - '**/db/structure.sql' # Ignore trailing whitespace in generated files
|
|
29
|
+
|
|
30
|
+
#PostCheckout:
|
|
31
|
+
# ALL: # Special hook name that customizes all hooks of this type
|
|
32
|
+
# quiet: true # Change all post-checkout hooks to only display output on failure
|
|
33
|
+
#
|
|
34
|
+
# IndexTags:
|
|
35
|
+
# enabled: true # Generate a tags file with `ctags` each time HEAD changes
|
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
require: rubocop-performance
|
|
2
|
+
inherit_from: .rubocop/todo.yml
|
|
2
3
|
|
|
3
4
|
AllCops:
|
|
4
5
|
TargetRubyVersion: 2.5
|
|
@@ -49,6 +50,8 @@ AllCops:
|
|
|
49
50
|
- 'stdlib/e2mmap.rb'
|
|
50
51
|
- 'stdlib/matrix.rb'
|
|
51
52
|
- 'stdlib/matrix/*.rb'
|
|
53
|
+
- 'stdlib/pp.rb'
|
|
54
|
+
- 'stdlib/prettyprint.rb'
|
|
52
55
|
|
|
53
56
|
inherit_mode:
|
|
54
57
|
merge:
|
|
@@ -69,6 +72,10 @@ Layout/CommentIndentation:
|
|
|
69
72
|
- 'lib/opal/rewriters/binary_operator_assignment.rb'
|
|
70
73
|
- 'lib/opal/rewriters/logical_operator_assignment.rb'
|
|
71
74
|
|
|
75
|
+
# We need to support older rubies
|
|
76
|
+
Layout/IndentHeredoc:
|
|
77
|
+
Enabled: false
|
|
78
|
+
|
|
72
79
|
Style/FrozenStringLiteralComment:
|
|
73
80
|
Exclude:
|
|
74
81
|
- 'opal/**/*.rb'
|
|
@@ -116,6 +123,10 @@ Lint/LiteralAsCondition:
|
|
|
116
123
|
- 'opal/**/*.rb'
|
|
117
124
|
- 'stdlib/**/*.rb'
|
|
118
125
|
|
|
126
|
+
# Allow the use of if/unless inside blocks
|
|
127
|
+
Style/Next:
|
|
128
|
+
Enabled: false
|
|
129
|
+
|
|
119
130
|
Lint/RescueException:
|
|
120
131
|
Exclude:
|
|
121
132
|
# That's what MRI does
|
|
@@ -243,12 +254,18 @@ Style/InverseMethods:
|
|
|
243
254
|
- 'opal/corelib/basic_object.rb'
|
|
244
255
|
- 'opal/corelib/kernel.rb'
|
|
245
256
|
|
|
246
|
-
Style/
|
|
247
|
-
# Base Opal classes simply can't call super for #method_missing
|
|
257
|
+
Style/MethodMissingSuper:
|
|
258
|
+
# Base Opal classes simply can't or shouldn't call super for #method_missing
|
|
248
259
|
Exclude:
|
|
249
260
|
- 'opal/corelib/basic_object.rb'
|
|
250
261
|
- 'opal/corelib/kernel.rb'
|
|
251
262
|
- 'opal/corelib/string/inheritance.rb'
|
|
263
|
+
- 'stdlib/native.rb'
|
|
264
|
+
- 'stdlib/delegate.rb'
|
|
265
|
+
- 'stdlib/ostruct.rb'
|
|
266
|
+
|
|
267
|
+
Style/MissingRespondToMissing:
|
|
268
|
+
Enabled: true
|
|
252
269
|
|
|
253
270
|
Style/NumericPredicate:
|
|
254
271
|
Enabled: false
|
|
@@ -257,6 +274,8 @@ Style/ParallelAssignment:
|
|
|
257
274
|
Enabled: false
|
|
258
275
|
|
|
259
276
|
Style/PercentLiteralDelimiters:
|
|
277
|
+
PreferredDelimiters:
|
|
278
|
+
default: '{}'
|
|
260
279
|
Exclude:
|
|
261
280
|
# Opal has a convention of %x{}
|
|
262
281
|
- 'opal/**/*.rb'
|
|
@@ -326,10 +345,6 @@ Style/RegexpLiteral:
|
|
|
326
345
|
# Rubocop doesn't check for backslashes, so this rule is disabled.
|
|
327
346
|
Enabled: false
|
|
328
347
|
|
|
329
|
-
Style/PercentLiteralDelimiters:
|
|
330
|
-
PreferredDelimiters:
|
|
331
|
-
default: '{}'
|
|
332
|
-
|
|
333
348
|
Naming/FileName:
|
|
334
349
|
Exclude:
|
|
335
350
|
- 'stdlib/opal-builder.rb'
|
|
@@ -396,3 +411,25 @@ Style/ConditionalAssignment:
|
|
|
396
411
|
Naming/MemoizedInstanceVariableName:
|
|
397
412
|
Exclude:
|
|
398
413
|
- lib/opal/parser/patch.rb # it's a monkey-patch on the parser gem
|
|
414
|
+
|
|
415
|
+
Style/AccessModifierDeclarations:
|
|
416
|
+
Enabled: false
|
|
417
|
+
|
|
418
|
+
Style/MultipleComparison:
|
|
419
|
+
Enabled: false
|
|
420
|
+
|
|
421
|
+
Layout/EmptyLineAfterGuardClause:
|
|
422
|
+
Enabled: false
|
|
423
|
+
|
|
424
|
+
Layout/AlignHash:
|
|
425
|
+
Enabled: false
|
|
426
|
+
|
|
427
|
+
# No way to set multiple preferred names
|
|
428
|
+
Naming/RescuedExceptionsVariableName:
|
|
429
|
+
Enabled: false
|
|
430
|
+
|
|
431
|
+
Style/Semicolon:
|
|
432
|
+
AllowAsExpressionSeparator: true
|
|
433
|
+
|
|
434
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
|
435
|
+
Enabled: false
|
|
@@ -33,12 +33,11 @@ Style/MutableConstant:
|
|
|
33
33
|
- 'lib/opal/nodes/call.rb'
|
|
34
34
|
- 'lib/opal/util.rb'
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Lint/HandleExceptions:
|
|
37
37
|
Exclude:
|
|
38
|
-
- 'stdlib/native.rb'
|
|
39
|
-
- 'stdlib/delegate.rb'
|
|
40
38
|
- 'stdlib/ostruct.rb'
|
|
41
39
|
|
|
42
|
-
Lint/
|
|
40
|
+
Lint/ToJSON:
|
|
43
41
|
Exclude:
|
|
44
|
-
- '
|
|
42
|
+
- 'lib/opal/source_map/map.rb'
|
|
43
|
+
- 'stdlib/json.rb'
|
data/CHANGELOG.md
CHANGED
|
@@ -15,7 +15,144 @@ Changes are grouped as follows:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
## [1.
|
|
18
|
+
## [1.1.1](https://github.com/opal/opal/compare/v1.1.0...v1.1.1) - 2021-02-23
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- The default runner (nodejs) wasn't starting to a bad require in the improved stack-traces ([#2182](https://github.com/opal/opal/pull/2182))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [1.1.0](https://github.com/opal/opal/compare/v1.0.5...v1.1.0) - 2021-02-19
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Basic support for `uplevel:` keyword argument in `Kernel#warn` ([#2006](https://github.com/opal/opal/pull/2006))
|
|
34
|
+
- Added a `#respond_to_missing?` implementation for `BasicObject`, `Delegator`, `OpenStruct`, that's meant for future support in the Opal runtime, which currently ignores it ([#2007](https://github.com/opal/opal/pull/2007))
|
|
35
|
+
- `Opal::Compiler#magic_comments` that allows to access magic-comments format and converts it to a hash ([#2038](https://github.com/opal/opal/pull/2038))
|
|
36
|
+
- Use magic-comments to declare helpers required by the file ([#2038](https://github.com/opal/opal/pull/2038))
|
|
37
|
+
- `Opal.$$` is now a shortcut for `Opal.const_get_relative` ([#2038](https://github.com/opal/opal/pull/2038))
|
|
38
|
+
- `Opal.$$$` is now a shortcut for `Opal.const_get_qualified` ([#2038](https://github.com/opal/opal/pull/2038))
|
|
39
|
+
- Added support for `globalThis` as the generic global object accessor ([#2047](https://github.com/opal/opal/pull/2047))
|
|
40
|
+
- `Opal::Compiler#magic_comments` that allows to access magic-comments format and converts it to a hash
|
|
41
|
+
- Use magic-comments to declare helpers required by the file
|
|
42
|
+
- `Opal.$$` is now a shortcut for `Opal.const_get_relative`
|
|
43
|
+
- `Opal.$$$` is now a shortcut for `Opal.const_get_qualified`
|
|
44
|
+
- Source-map support for Node.js in the default runner ([#2045](https://github.com/opal/opal/pull/2045))
|
|
45
|
+
- SecureRandom#hex(n) ([#2050](https://github.com/opal/opal/pull/2050))
|
|
46
|
+
- Added a generic implementation of Kernel#caller and #warn(uplevel:) that works with sourcemaps in Node.js and Chrome ([#2065](https://github.com/opal/opal/pull/2065))
|
|
47
|
+
- Added support for numblocks `-> { _1 + _2 }.call(3, 4) # => 7` ([#2149](https://github.com/opal/opal/pull/2149))
|
|
48
|
+
- Support `<internal:…>` and `<js:…>` in stacktraces, like MRI we now distinguish internal lines from lib/app lines ([#2154](https://github.com/opal/opal/pull/2154))
|
|
49
|
+
- `Array#difference`, `Array#intersection`, `Array#union` as aliases respectively to `Array#{-,&,|}` ([#2151](https://github.com/opal/opal/pull/2151))
|
|
50
|
+
- Aliases `filter{,!}` to `select{,!}` throughout the corelib classes ([#2151](https://github.com/opal/opal/pull/2151))
|
|
51
|
+
- `Enumerable#filter_map`, `Enumerable#tally` ([#2151](https://github.com/opal/opal/pull/2151))
|
|
52
|
+
- Alias `Kernel#then` for `Kernel#yield_self` ([#2151](https://github.com/opal/opal/pull/2151))
|
|
53
|
+
- Method chaining: `{Proc,Method}#{<<,>>}` ([#2151](https://github.com/opal/opal/pull/2151))
|
|
54
|
+
- Added Integer#to_d ([#2006](https://github.com/opal/opal/pull/2006))
|
|
55
|
+
- Added a compiler option `use_strict` which can also be set by the `use_strict` magic comment ([#1959](https://github.com/opal/opal/pull/1959))
|
|
56
|
+
- Add `--rbrequire (-q)` option to `opal` command line executable ([#2120](https://github.com/opal/opal/pull/2120))
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- Array#delete_if ([#2069](https://github.com/opal/opal/pull/2069))
|
|
61
|
+
- Array#keep_if ([#2069](https://github.com/opal/opal/pull/2069))
|
|
62
|
+
- Array#reject! ([#2069](https://github.com/opal/opal/pull/2069))
|
|
63
|
+
- Array#select! ([#2069](https://github.com/opal/opal/pull/2069))
|
|
64
|
+
- Struct#dup ([#1995](https://github.com/opal/opal/pull/1995))
|
|
65
|
+
- Integer#gcdlcm ([#1972](https://github.com/opal/opal/pull/1972))
|
|
66
|
+
- Enumerable#to_h ([#1979](https://github.com/opal/opal/pull/1979))
|
|
67
|
+
- Enumerator#size ([#1980](https://github.com/opal/opal/pull/1980))
|
|
68
|
+
- Enumerable#min ([#1982](https://github.com/opal/opal/pull/1982))
|
|
69
|
+
- Enumerable#min_by ([#1985](https://github.com/opal/opal/pull/1985))
|
|
70
|
+
- Enumerable#max_by ([#1985](https://github.com/opal/opal/pull/1985))
|
|
71
|
+
- Set#intersect? ([#1988](https://github.com/opal/opal/pull/1988))
|
|
72
|
+
- Set#disjoint? ([#1988](https://github.com/opal/opal/pull/1988))
|
|
73
|
+
- Set#keep_if ([#1987](https://github.com/opal/opal/pull/1987))
|
|
74
|
+
- Set#select! ([#1987](https://github.com/opal/opal/pull/1987))
|
|
75
|
+
- Set#reject! ([#1987](https://github.com/opal/opal/pull/1987))
|
|
76
|
+
- String#unicode_normalize ([#2175](https://github.com/opal/opal/pull/2175))
|
|
77
|
+
- Module#alias_method ([#1983](https://github.com/opal/opal/pull/1983))
|
|
78
|
+
- Enumerable#minmax_by ([#1981](https://github.com/opal/opal/pull/1981))
|
|
79
|
+
- Enumerator#each_with_index ([#1990](https://github.com/opal/opal/pull/1990))
|
|
80
|
+
- Range#== ([#1992](https://github.com/opal/opal/pull/1992))
|
|
81
|
+
- Range#each ([#1991](https://github.com/opal/opal/pull/1991))
|
|
82
|
+
- Enumerable#zip ([#1986](https://github.com/opal/opal/pull/1986))
|
|
83
|
+
- String#getbyte ([#2141](https://github.com/opal/opal/pull/2141))
|
|
84
|
+
- Struct#dup not copying `$$data` ([#1995](https://github.com/opal/opal/pull/1995))
|
|
85
|
+
- Fixed usage of semicolon in single-line backticks ([#2004](https://github.com/opal/opal/pull/2004))
|
|
86
|
+
- Module#attr with multiple arguments ([#2003](https://github.com/opal/opal/pull/2003))
|
|
87
|
+
- `PathReader` used to try to read missing files instead of respecting the `missing_require_severity` configuration value ([#2044](https://github.com/opal/opal/pull/2044))
|
|
88
|
+
- Removed some unused variables from the runtime ([#2052](https://github.com/opal/opal/pull/2052))
|
|
89
|
+
- Fixed a typo in the runtime ([#2054](https://github.com/opal/opal/pull/2054))
|
|
90
|
+
- Fix Regexp interpolation, previously interpolating with other regexps was broken ([#2062](https://github.com/opal/opal/pull/2062))
|
|
91
|
+
- Set match on StringScanner#skip and StringScanner#scan_until ([#2061](https://github.com/opal/opal/pull/2061))
|
|
92
|
+
- Fix ruby 2.7 warnings ([#2071](https://github.com/opal/opal/pull/2071))
|
|
93
|
+
- Improve the --help descriptions ([#2146](https://github.com/opal/opal/pull/2146))
|
|
94
|
+
- Remove BasicObject#class ([#2166](https://github.com/opal/opal/pull/2166))
|
|
95
|
+
- Time#strftime %j leading zeros ([#2161](https://github.com/opal/opal/pull/2161))
|
|
96
|
+
- Fix `call { true or next }` producing invalid code ([#2160](https://github.com/opal/opal/pull/2160))
|
|
97
|
+
- `define_method` can now be called on the main object ([#2029](https://github.com/opal/opal/pull/2029))
|
|
98
|
+
- Fix nested for-loops ([#2033](https://github.com/opal/opal/pull/2033))
|
|
99
|
+
- Fix Number#round for Integers ([#2030](https://github.com/opal/opal/pull/2030))
|
|
100
|
+
- Fix parsing Unicode characters from Opal ([#2073](https://github.com/opal/opal/pull/2073))
|
|
101
|
+
- Integer#===: improve Integer recognition ([#2089](https://github.com/opal/opal/pull/2089))
|
|
102
|
+
- Regexp: ensure ignoreCase is never undefined ([#2098](https://github.com/opal/opal/pull/2098))
|
|
103
|
+
- Hash#delete: ensure String keys are converted to values ([#2106](https://github.com/opal/opal/pull/2106))
|
|
104
|
+
- Array#shift: improve performance on v8 >7.1 ([#2115](https://github.com/opal/opal/pull/2115))
|
|
105
|
+
- Array#pop(1): improve performance ([#2130](https://github.com/opal/opal/pull/2130))
|
|
106
|
+
- Object#pretty_inspect ([#2139](https://github.com/opal/opal/pull/2139))
|
|
107
|
+
- Fix conversion from UTF-8 to bytes ([#2138](https://github.com/opal/opal/pull/2138))
|
|
108
|
+
- Restore compatibility with Chrome 38, used by Cordova and many mobile browsers ([#2109](https://github.com/opal/opal/pull/2109))
|
|
109
|
+
|
|
110
|
+
### Changed
|
|
111
|
+
|
|
112
|
+
- Updated outdated parser version ([#2013](https://github.com/opal/opal/pull/2013))
|
|
113
|
+
- Nashorn has been deprecated but GraalVM still supports it ([#1997](https://github.com/opal/opal/pull/1997))
|
|
114
|
+
- "opal/mini" now includes "opal/io" ([#2002](https://github.com/opal/opal/pull/2002))
|
|
115
|
+
- Regexps assigned to constants are now frozen ([#2007](https://github.com/opal/opal/pull/2007))
|
|
116
|
+
- `Opal.$$` changed from being the constant cache of Object to being a shortcut for `Opal.const_get_relative` ([#2038](https://github.com/opal/opal/pull/2038))
|
|
117
|
+
- Moved REPL implementation from bin/ to its own lib/ file as `opal/repl.rb` ([#2048](https://github.com/opal/opal/pull/2048))
|
|
118
|
+
- `Encoding.default_external` is now initialized with `__ENCODING__` ([#2072](https://github.com/opal/opal/pull/2072))
|
|
119
|
+
- Keep the MersenneTwister implementation private ([#2108](https://github.com/opal/opal/pull/2108))
|
|
120
|
+
- Change parser to 3.0 ([#2148](https://github.com/opal/opal/pull/2148))
|
|
121
|
+
- Fix forwarding a rescued error to a global var: `rescue => $gvar` ([#2154](https://github.com/opal/opal/pull/2154))
|
|
122
|
+
- Now using Parser v3.0 and targeting Ruby 3.0 ([#2156](https://github.com/opal/opal/pull/2156))
|
|
123
|
+
- `Comparable#clamp` to support a Range argument ([#2151](https://github.com/opal/opal/pull/2151))
|
|
124
|
+
- `#to_h` method to support a block (shortform for `.map(&block).to_h`) ([#2151](https://github.com/opal/opal/pull/2151))
|
|
125
|
+
- BigDecimal is now a subclass of Numeric ([#2006](https://github.com/opal/opal/pull/2006))
|
|
126
|
+
- PP to be rebased on upstream Ruby version ([#2083](https://github.com/opal/opal/pull/2083))
|
|
127
|
+
- String to report UTF-8 encoding by default, as MRI does ([#2117](https://github.com/opal/opal/pull/2117))
|
|
128
|
+
- Don't output "Failed to load WithCLexer, using pure Ruby lexer" warning unless in $DEBUG mode ([#2174](https://github.com/opal/opal/pull/2174))
|
|
129
|
+
|
|
130
|
+
### Deprecated
|
|
131
|
+
|
|
132
|
+
- Requiring nodejs/stacktrace has been deprecated, source-maps are already
|
|
133
|
+
supported by the default Node.js runner or by requiring https://github.com/evanw/node-source-map-support
|
|
134
|
+
before loading code compiled by Opal ([#2045](https://github.com/opal/opal/pull/2045))
|
|
135
|
+
|
|
136
|
+
### Removed
|
|
137
|
+
|
|
138
|
+
- Removed special compilation for the `Opal.truthy?` and `Opal.falsy?` helpers ([#2076](https://github.com/opal/opal/pull/2076))
|
|
139
|
+
- Removed the deprecated `tainting` compiler config option ([#2072](https://github.com/opal/opal/pull/2072))
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## [1.0.5](https://github.com/opal/opal/compare/v1.0.4...v1.0.5) - 2020-12-23
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Fixed
|
|
148
|
+
|
|
149
|
+
- [Backported] Add --rbrequire (-q) option to opal cmdline tool ([#2120](https://github.com/opal/opal/pull/2120))
|
|
150
|
+
- Improve the --help descriptions ([#2146](https://github.com/opal/opal/pull/2146))
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## [1.0.4](https://github.com/opal/opal/compare/v1.0.3...v1.0.4) - 2020-12-13
|
|
19
156
|
|
|
20
157
|
|
|
21
158
|
### Fixed
|
data/Gemfile
CHANGED
|
@@ -11,7 +11,6 @@ sprockets_version = ENV['SPROCKETS_VERSION']
|
|
|
11
11
|
|
|
12
12
|
gem 'json', '< 1.8.1', platform: :ruby if ruby_version < v['2.2']
|
|
13
13
|
gem 'rack-test', '< 0.8' if ruby_version <= v['2.0']
|
|
14
|
-
gem 'rubysl', platform: :rbx
|
|
15
14
|
gem 'coveralls', platform: :mri
|
|
16
15
|
|
|
17
16
|
# Some browsers have problems with WEBrick
|
|
@@ -51,5 +50,5 @@ group :doc do
|
|
|
51
50
|
end unless ENV['CI']
|
|
52
51
|
|
|
53
52
|
platforms :ruby, :mswin, :mswin64, :mingw, :x64_mingw do
|
|
54
|
-
gem 'c_lexer', '~> 2.6' unless RUBY_ENGINE == 'truffleruby'
|
|
53
|
+
#gem 'c_lexer', '~> 2.6' unless RUBY_ENGINE == 'truffleruby'
|
|
55
54
|
end
|