opal 1.8.0.alpha1 → 1.8.0.beta1
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/.eslintrc.js +1 -0
- data/README.md +7 -7
- data/UNRELEASED.md +14 -0
- data/docs/releasing.md +8 -16
- data/lib/opal/cli_runners/chrome.rb +5 -1
- data/lib/opal/nodes/closure.rb +15 -7
- data/lib/opal/nodes/defined.rb +1 -1
- data/lib/opal/nodes/literal.rb +10 -6
- data/lib/opal/nodes/rescue.rb +1 -1
- data/lib/opal/simple_server.rb +2 -2
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/array.rb +39 -21
- data/opal/corelib/class.rb +26 -8
- data/opal/corelib/complex.rb +1 -1
- data/opal/corelib/constants.rb +2 -2
- data/opal/corelib/enumerator/arithmetic_sequence.rb +1 -1
- data/opal/corelib/error.rb +10 -0
- data/opal/corelib/hash.rb +30 -18
- data/opal/corelib/kernel.rb +0 -1
- data/opal/corelib/module.rb +44 -5
- data/opal/corelib/number.rb +28 -1
- data/opal/corelib/range.rb +1 -1
- data/opal/corelib/rational.rb +1 -1
- data/opal/corelib/runtime.js +124 -42
- data/opal/corelib/string.rb +36 -8
- data/opal/corelib/struct.rb +1 -1
- data/opal/corelib/time.rb +1 -1
- data/spec/filters/bugs/array.rb +58 -0
- data/spec/filters/bugs/basicobject.rb +7 -0
- data/spec/filters/bugs/bigdecimal.rb +1 -2
- data/spec/filters/bugs/binding.rb +1 -0
- data/spec/filters/bugs/class.rb +2 -3
- data/spec/filters/bugs/complex.rb +3 -0
- data/spec/filters/bugs/date.rb +5 -2
- data/spec/filters/bugs/datetime.rb +1 -0
- data/spec/filters/bugs/delegate.rb +1 -2
- data/spec/filters/bugs/encoding.rb +1 -1
- data/spec/filters/bugs/enumerable.rb +11 -0
- data/spec/filters/bugs/enumerator.rb +15 -2
- data/spec/filters/bugs/exception.rb +9 -4
- data/spec/filters/bugs/file.rb +2 -0
- data/spec/filters/bugs/float.rb +1 -0
- data/spec/filters/bugs/freeze.rb +5 -49
- data/spec/filters/bugs/hash.rb +1 -0
- data/spec/filters/bugs/integer.rb +5 -6
- data/spec/filters/bugs/kernel.rb +12 -5
- data/spec/filters/bugs/language.rb +33 -15
- data/spec/filters/bugs/marshal.rb +63 -4
- data/spec/filters/bugs/method.rb +2 -10
- data/spec/filters/bugs/module.rb +18 -7
- data/spec/filters/bugs/objectspace.rb +2 -0
- data/spec/filters/bugs/pathname.rb +1 -0
- data/spec/filters/bugs/proc.rb +4 -2
- data/spec/filters/bugs/random.rb +0 -3
- data/spec/filters/bugs/range.rb +1 -1
- data/spec/filters/bugs/rational.rb +2 -0
- data/spec/filters/bugs/refinement.rb +19 -0
- data/spec/filters/bugs/regexp.rb +27 -5
- data/spec/filters/bugs/ruby-32.rb +0 -4
- data/spec/filters/bugs/set.rb +10 -2
- data/spec/filters/bugs/singleton.rb +0 -2
- data/spec/filters/bugs/string.rb +140 -1
- data/spec/filters/bugs/struct.rb +15 -5
- data/spec/filters/bugs/time.rb +56 -2
- data/spec/filters/bugs/trace_point.rb +1 -0
- data/spec/filters/bugs/unboundmethod.rb +4 -9
- data/spec/filters/bugs/warnings.rb +0 -1
- data/spec/filters/platform/firefox/exception.rb +3 -3
- data/spec/filters/platform/firefox/kernel.rb +1 -0
- data/spec/filters/platform/safari/exception.rb +2 -2
- data/spec/filters/platform/safari/float.rb +1 -0
- data/spec/filters/platform/safari/kernel.rb +1 -0
- data/spec/filters/platform/safari/literal_regexp.rb +2 -2
- data/spec/filters/unsupported/hash.rb +1 -1
- data/spec/lib/compiler_spec.rb +4 -0
- data/spec/opal/core/class/clone_spec.rb +36 -0
- data/spec/opal/core/object_id_spec.rb +0 -6
- data/spec/opal/language/predefined_spec.rb +20 -0
- data/spec/opal/language/yield_spec.rb +43 -0
- data/spec/ruby_specs +0 -2
- data/stdlib/bigdecimal.rb +2 -0
- data/stdlib/delegate.rb +3 -4
- data/stdlib/pathname.rb +1 -1
- data/stdlib/promise/v2.rb +22 -7
- data/stdlib/stringio.rb +2 -0
- data/tasks/testing.rake +15 -11
- data/test/opal/promisev2/test_always.rb +14 -0
- data/test/opal/unsupported_and_bugs.rb +0 -8
- metadata +10 -6
@@ -60,4 +60,18 @@ class TestPromiseAlways < Test::Unit::TestCase
|
|
60
60
|
|
61
61
|
assert_raise(ArgumentError) { p.always! {} }
|
62
62
|
end
|
63
|
+
|
64
|
+
def test_gets_the_value_from_the_previous_successful_block
|
65
|
+
PromiseV2.value(23)
|
66
|
+
.then { 123 }
|
67
|
+
.rescue { 234 }
|
68
|
+
.always { |v| assert_equal(123, v) }
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_gets_the_value_from_the_previous_rescued_block
|
72
|
+
PromiseV2.reject(23)
|
73
|
+
.then { 123 }
|
74
|
+
.rescue { 234 }
|
75
|
+
.always { |v| assert_equal(234, v) }
|
76
|
+
end
|
63
77
|
end
|
@@ -30,14 +30,6 @@ class TestBase64
|
|
30
30
|
bug :test_urlsafe_decode64_unpadded
|
31
31
|
end
|
32
32
|
|
33
|
-
class TestCall
|
34
|
-
# They work fine if `"a".sub! "b"` is replaced by `[].slice 1`
|
35
|
-
unsupported :test_safe_call_block_command
|
36
|
-
unsupported :test_safe_call_block_call
|
37
|
-
unsupported :test_safe_call_block_call_brace
|
38
|
-
unsupported :test_safe_call_block_call_command
|
39
|
-
end
|
40
|
-
|
41
33
|
class TestBenchmark
|
42
34
|
# sleep is unsupported if not awaited
|
43
35
|
unsupported :test_realtime_output
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.0.
|
4
|
+
version: 1.8.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elia Schito
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ast
|
@@ -737,6 +737,7 @@ files:
|
|
737
737
|
- spec/filters/bugs/random.rb
|
738
738
|
- spec/filters/bugs/range.rb
|
739
739
|
- spec/filters/bugs/rational.rb
|
740
|
+
- spec/filters/bugs/refinement.rb
|
740
741
|
- spec/filters/bugs/regexp.rb
|
741
742
|
- spec/filters/bugs/ruby-32.rb
|
742
743
|
- spec/filters/bugs/set.rb
|
@@ -853,6 +854,7 @@ files:
|
|
853
854
|
- spec/opal/core/array/uniq_spec.rb
|
854
855
|
- spec/opal/core/array/zip_spec.rb
|
855
856
|
- spec/opal/core/boolean_spec.rb
|
857
|
+
- spec/opal/core/class/clone_spec.rb
|
856
858
|
- spec/opal/core/class/inherited_spec.rb
|
857
859
|
- spec/opal/core/enumerable/all_break_spec.rb
|
858
860
|
- spec/opal/core/enumerable/any_break_spec.rb
|
@@ -951,6 +953,8 @@ files:
|
|
951
953
|
- spec/opal/core/string_spec.rb
|
952
954
|
- spec/opal/core/struct/dup_spec.rb
|
953
955
|
- spec/opal/core/time_spec.rb
|
956
|
+
- spec/opal/language/predefined_spec.rb
|
957
|
+
- spec/opal/language/yield_spec.rb
|
954
958
|
- spec/opal/stdlib/erb/erb_spec.rb
|
955
959
|
- spec/opal/stdlib/erb/inline_block.opalerb
|
956
960
|
- spec/opal/stdlib/erb/quoted.opalerb
|
@@ -1221,10 +1225,10 @@ licenses:
|
|
1221
1225
|
metadata:
|
1222
1226
|
homepage_uri: https://opalrb.com/
|
1223
1227
|
bug_tracker_uri: https://github.com/opal/opal/issues
|
1224
|
-
changelog_uri: https://github.com/opal/opal/blob/v1.8.0.
|
1225
|
-
readme_uri: https://github.com/opal/opal/blob/v1.8.0.
|
1226
|
-
api_documentation_uri: http://opalrb.com/docs/api/v1.8.0.
|
1227
|
-
guides_uri: http://opalrb.com/docs/guides/v1.8.0.
|
1228
|
+
changelog_uri: https://github.com/opal/opal/blob/v1.8.0.beta1/CHANGELOG.md
|
1229
|
+
readme_uri: https://github.com/opal/opal/blob/v1.8.0.beta1/README.md
|
1230
|
+
api_documentation_uri: http://opalrb.com/docs/api/v1.8.0.beta1/index.html
|
1231
|
+
guides_uri: http://opalrb.com/docs/guides/v1.8.0.beta1/index.html
|
1228
1232
|
chat_uri: https://gitter.im/opal/opal
|
1229
1233
|
source_code_uri: https://github.com/opal/opal
|
1230
1234
|
post_install_message:
|