opal 1.6.0 → 1.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +17 -0
- data/CHANGELOG.md +15 -1
- data/Gemfile +2 -0
- data/HACKING.md +47 -26
- data/UNRELEASED.md +27 -0
- data/benchmark/benchmarks +415 -103
- data/benchmark/bm_call_overhead.yml +28 -0
- data/benchmark/run.rb +61 -40
- data/docs/cdp_common.json +3364 -0
- data/docs/cdp_common.md +18 -0
- data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +8 -2
- data/lib/opal/builder_processors.rb +5 -3
- data/lib/opal/builder_scheduler.rb +1 -1
- data/lib/opal/cache.rb +1 -7
- data/lib/opal/cli_options.rb +72 -58
- data/lib/opal/cli_runners/chrome.rb +47 -9
- data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
- data/lib/opal/cli_runners/compiler.rb +146 -13
- data/lib/opal/cli_runners/deno.rb +32 -0
- data/lib/opal/cli_runners/firefox.rb +350 -0
- data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
- data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
- data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
- data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
- data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
- data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
- data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
- data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
- data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
- data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
- data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
- data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
- data/lib/opal/cli_runners/package-lock.json +62 -0
- data/lib/opal/cli_runners/package.json +1 -1
- data/lib/opal/cli_runners.rb +26 -4
- data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
- data/lib/opal/nodes/def.rb +8 -8
- data/lib/opal/nodes/iter.rb +12 -12
- data/lib/opal/nodes/logic.rb +1 -1
- data/lib/opal/nodes/masgn.rb +2 -2
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/paths.rb +14 -0
- data/lib/opal/rewriter.rb +2 -0
- data/lib/opal/rewriters/forward_args.rb +52 -4
- data/lib/opal/rewriters/targeted_patches.rb +94 -0
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/basic_object.rb +1 -1
- data/opal/corelib/boolean.rb +2 -2
- data/opal/corelib/class.rb +11 -0
- data/opal/corelib/constants.rb +3 -3
- data/opal/corelib/enumerable.rb +4 -0
- data/opal/corelib/enumerator.rb +1 -1
- data/opal/corelib/hash.rb +2 -2
- data/opal/corelib/helpers.rb +1 -1
- data/opal/corelib/kernel.rb +3 -3
- data/opal/corelib/method.rb +1 -1
- data/opal/corelib/module.rb +29 -8
- data/opal/corelib/proc.rb +7 -5
- data/opal/corelib/runtime.js +141 -78
- data/opal/corelib/set.rb +252 -0
- data/opal/corelib/string.rb +2 -1
- data/opal/corelib/time.rb +2 -2
- data/opal/opal.rb +1 -0
- data/opal.gemspec +1 -0
- data/spec/filters/bugs/array.rb +22 -13
- data/spec/filters/bugs/base64.rb +5 -5
- data/spec/filters/bugs/basicobject.rb +16 -8
- data/spec/filters/bugs/bigdecimal.rb +161 -160
- data/spec/filters/bugs/binding.rb +10 -10
- data/spec/filters/bugs/class.rb +8 -8
- data/spec/filters/bugs/complex.rb +2 -1
- data/spec/filters/bugs/date.rb +79 -81
- data/spec/filters/bugs/datetime.rb +29 -29
- data/spec/filters/bugs/delegate.rb +1 -3
- data/spec/filters/bugs/encoding.rb +69 -69
- data/spec/filters/bugs/enumerable.rb +22 -20
- data/spec/filters/bugs/enumerator.rb +88 -85
- data/spec/filters/bugs/exception.rb +46 -40
- data/spec/filters/bugs/file.rb +32 -32
- data/spec/filters/bugs/float.rb +26 -21
- data/spec/filters/bugs/freeze.rb +88 -0
- data/spec/filters/bugs/hash.rb +39 -38
- data/spec/filters/bugs/integer.rb +57 -44
- data/spec/filters/bugs/io.rb +1 -1
- data/spec/filters/bugs/kernel.rb +349 -269
- data/spec/filters/bugs/language.rb +220 -188
- data/spec/filters/bugs/main.rb +5 -3
- data/spec/filters/bugs/marshal.rb +38 -38
- data/spec/filters/bugs/math.rb +2 -1
- data/spec/filters/bugs/method.rb +73 -62
- data/spec/filters/bugs/module.rb +163 -143
- data/spec/filters/bugs/numeric.rb +6 -6
- data/spec/filters/bugs/objectspace.rb +16 -16
- data/spec/filters/bugs/openstruct.rb +1 -1
- data/spec/filters/bugs/pack_unpack.rb +51 -51
- data/spec/filters/bugs/pathname.rb +7 -7
- data/spec/filters/bugs/proc.rb +63 -63
- data/spec/filters/bugs/random.rb +7 -6
- data/spec/filters/bugs/range.rb +12 -9
- data/spec/filters/bugs/rational.rb +8 -7
- data/spec/filters/bugs/regexp.rb +49 -48
- data/spec/filters/bugs/ruby-32.rb +56 -0
- data/spec/filters/bugs/set.rb +30 -30
- data/spec/filters/bugs/singleton.rb +4 -4
- data/spec/filters/bugs/string.rb +187 -99
- data/spec/filters/bugs/stringio.rb +7 -0
- data/spec/filters/bugs/stringscanner.rb +68 -68
- data/spec/filters/bugs/struct.rb +11 -9
- data/spec/filters/bugs/symbol.rb +1 -1
- data/spec/filters/bugs/time.rb +78 -63
- data/spec/filters/bugs/trace_point.rb +4 -4
- data/spec/filters/bugs/unboundmethod.rb +32 -17
- data/spec/filters/bugs/warnings.rb +8 -12
- data/spec/filters/unsupported/array.rb +24 -107
- data/spec/filters/unsupported/basicobject.rb +12 -12
- data/spec/filters/unsupported/bignum.rb +27 -52
- data/spec/filters/unsupported/class.rb +1 -2
- data/spec/filters/unsupported/delegator.rb +3 -3
- data/spec/filters/unsupported/enumerable.rb +2 -9
- data/spec/filters/unsupported/enumerator.rb +2 -11
- data/spec/filters/unsupported/file.rb +1 -1
- data/spec/filters/unsupported/float.rb +28 -47
- data/spec/filters/unsupported/hash.rb +8 -14
- data/spec/filters/unsupported/integer.rb +75 -91
- data/spec/filters/unsupported/kernel.rb +17 -35
- data/spec/filters/unsupported/language.rb +11 -19
- data/spec/filters/unsupported/marshal.rb +22 -41
- data/spec/filters/unsupported/matchdata.rb +28 -52
- data/spec/filters/unsupported/math.rb +1 -1
- data/spec/filters/unsupported/privacy.rb +229 -285
- data/spec/filters/unsupported/range.rb +1 -5
- data/spec/filters/unsupported/regexp.rb +40 -66
- data/spec/filters/unsupported/set.rb +2 -2
- data/spec/filters/unsupported/singleton.rb +4 -4
- data/spec/filters/unsupported/string.rb +305 -508
- data/spec/filters/unsupported/struct.rb +3 -4
- data/spec/filters/unsupported/symbol.rb +15 -18
- data/spec/filters/unsupported/thread.rb +1 -7
- data/spec/filters/unsupported/time.rb +159 -202
- data/spec/filters/unsupported/usage_of_files.rb +170 -259
- data/spec/lib/builder_spec.rb +14 -4
- data/spec/lib/rewriters/forward_args_spec.rb +32 -12
- data/spec/mspec-opal/runner.rb +2 -0
- data/spec/ruby_specs +4 -0
- data/stdlib/deno/base.rb +28 -0
- data/stdlib/deno/file.rb +340 -0
- data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
- data/stdlib/headless_browser/file.rb +15 -0
- data/stdlib/headless_browser.rb +4 -0
- data/stdlib/native.rb +1 -1
- data/stdlib/nodejs/file.rb +5 -0
- data/stdlib/opal/platform.rb +8 -6
- data/stdlib/opal-platform.rb +14 -8
- data/stdlib/set.rb +1 -258
- data/tasks/benchmarking.rake +62 -19
- data/tasks/building.rake +6 -2
- data/tasks/performance.rake +1 -1
- data/tasks/testing.rake +5 -3
- data/test/nodejs/test_file.rb +29 -10
- data/test/opal/http_server.rb +28 -11
- data/test/opal/unsupported_and_bugs.rb +2 -1
- metadata +92 -53
- data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
- data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
- data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
- data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
- data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
- data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
- data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
- data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
- data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
- data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
- data/spec/filters/bugs/boolean.rb +0 -3
- data/spec/filters/bugs/matrix.rb +0 -3
- data/spec/filters/unsupported/fixnum.rb +0 -15
- data/spec/filters/unsupported/freeze.rb +0 -102
- data/spec/filters/unsupported/pathname.rb +0 -4
- data/spec/filters/unsupported/proc.rb +0 -4
- data/spec/filters/unsupported/random.rb +0 -5
- data/spec/filters/unsupported/taint.rb +0 -162
@@ -1,12 +1,12 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "language" do
|
3
|
-
fails "$LOAD_PATH.resolve_feature_path return nil if feature cannot be found" # NoMethodError: undefined method `resolve_feature_path' for [
|
4
|
-
fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, .rb file" # NoMethodError: undefined method `resolve_feature_path' for [
|
5
|
-
fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, .so file" # NoMethodError: undefined method `resolve_feature_path' for [
|
3
|
+
fails "$LOAD_PATH.resolve_feature_path return nil if feature cannot be found" # NoMethodError: undefined method `resolve_feature_path' for []
|
4
|
+
fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, .rb file" # NoMethodError: undefined method `resolve_feature_path' for []
|
5
|
+
fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, .so file" # NoMethodError: undefined method `resolve_feature_path' for []
|
6
6
|
fails "A Proc taking |*a, **kw| arguments does not autosplat keyword arguments" # Expected [[1], {"a"=>1}] == [[[1, {"a"=>1}]], {}] to be truthy but was false
|
7
|
-
fails "A Symbol literal with invalid bytes raises an EncodingError at parse time" #
|
7
|
+
fails "A Symbol literal with invalid bytes raises an EncodingError at parse time" # Expected EncodingError (/invalid/) but no exception was raised ("Ã" was returned)
|
8
8
|
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
|
9
|
-
fails "A block yielded a single Array
|
9
|
+
fails "A block yielded a single Array autosplats single argument to required arguments when a keyword rest argument is present" # ArgumentError: expected kwargs
|
10
10
|
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
|
11
11
|
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
|
12
12
|
fails "A block yielded a single Array does not call #to_hash on the last element if keyword arguments are present" # ArgumentError: expected kwargs
|
@@ -14,107 +14,130 @@ opal_filter "language" do
|
|
14
14
|
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
|
15
15
|
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
|
16
16
|
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
|
17
|
-
fails "A
|
18
|
-
fails "A class definition extending an object (sclass)
|
19
|
-
fails "A class definition raises TypeError
|
20
|
-
fails "A class definition raises TypeError if
|
21
|
-
fails "A class definition raises
|
17
|
+
fails "A block yielded a single Object receives the object if it does not respond to #respond_to?" # NoMethodError: undefined method `respond_to?' for #<BasicObject:0x551e>
|
18
|
+
fails "A class definition extending an object (sclass) can use return to cause the enclosing method to return" # Expected "outer" == "inner" to be truthy but was false
|
19
|
+
fails "A class definition extending an object (sclass) raises a TypeError when trying to extend numbers" # Expected TypeError but got: Exception (Object.defineProperty called on non-object)
|
20
|
+
fails "A class definition raises TypeError if any constant qualifying the class is not a Module" # Expected TypeError but no exception was raised (nil was returned)
|
21
|
+
fails "A class definition raises TypeError if the constant qualifying the class is nil" # Expected TypeError but no exception was raised (nil was returned)
|
22
|
+
fails "A class definition raises a TypeError if inheriting from a metaclass" # Expected TypeError but no exception was raised (nil was returned)
|
22
23
|
fails "A lambda expression 'lambda { ... }' assigns variables from parameters for definition '@a = lambda { |*, **k| k }'" # ArgumentError: expected kwargs
|
23
|
-
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 }"
|
24
|
-
fails "A lambda expression 'lambda { ... }' requires a block"
|
25
|
-
fails "A lambda expression 'lambda { ... }' with an implicit block raises ArgumentError" # Expected ArgumentError (/tried to create Proc object without a block/) but
|
24
|
+
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 }" # ArgumentError: `block in <main>': wrong number of arguments (given 2, expected 1)
|
25
|
+
fails "A lambda expression 'lambda { ... }' requires a block" # Expected ArgumentError but got: Exception (Cannot add property $$is_lambda, object is not extensible)
|
26
|
+
fails "A lambda expression 'lambda { ... }' with an implicit block raises ArgumentError" # Expected ArgumentError (/tried to create Proc object without a block/) but got: Exception (Cannot add property $$is_lambda, object is not extensible)
|
26
27
|
fails "A lambda literal -> () { } assigns variables from parameters for definition '@a = -> (*, **k) { k }'" # ArgumentError: expected kwargs
|
27
|
-
fails "A method assigns local variables from method parameters for definition 'def m() end'" # ArgumentError: [SpecEvaluate#m] wrong number of arguments(1
|
28
|
-
fails "A method assigns local variables from method parameters for definition 'def m(*a) a end'" # Expected [{}] to
|
28
|
+
fails "A method assigns local variables from method parameters for definition 'def m() end'" # ArgumentError: [SpecEvaluate#m] wrong number of arguments (given 1, expected 0)
|
29
|
+
fails "A method assigns local variables from method parameters for definition 'def m(*a) a end'" # Expected [{}] == [] to be truthy but was false
|
29
30
|
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)
|
30
31
|
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)
|
31
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a, **nil); a end;'" #
|
32
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a, **nil); a end;'" # Expected ArgumentError but no exception was raised ({"a"=>1} was returned)
|
32
33
|
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)
|
33
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a:) a end'"
|
34
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a:, **k) [a, k] end'"
|
35
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a:, b: 1) [a, b] end'"
|
36
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a:, b:) [a, b] end'"
|
37
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a=1, b: 2) [a, b] end'"
|
38
|
-
fails "A method assigns local variables from method parameters for definition 'def m(a=1, b:) [a, b] end'"
|
39
|
-
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" #
|
40
|
-
fails "A method assigns the last Hash to the last optional argument if the Hash contains non-Symbol keys and is not passed as keywords" #
|
41
|
-
fails "A method definition in an eval creates a class method"
|
42
|
-
fails "A method definition in an eval creates an instance method"
|
34
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:) a end'" # Expected ArgumentError but no exception was raised (1 was returned)
|
35
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:, **k) [a, k] end'" # Expected [1, {"b"=>2}] == [1, {"a"=>1, "b"=>2}] to be truthy but was false
|
36
|
+
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 ([1, 2] was returned)
|
37
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a:, b:) [a, b] end'" # Expected ArgumentError but no exception was raised ([1, 2] was returned)
|
38
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a=1, b: 2) [a, b] end'" # Expected ArgumentError but no exception was raised ([1, 2] was returned)
|
39
|
+
fails "A method assigns local variables from method parameters for definition 'def m(a=1, b:) [a, b] end'" # Expected ArgumentError but no exception was raised ([1, 2] was returned)
|
40
|
+
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" # Expected [1, nil, nil, 2, nil, {"foo"=>"bar"}] == [1, 2, nil, {"foo"=>"bar"}, nil, {}] to be truthy but was false
|
41
|
+
fails "A method assigns the last Hash to the last optional argument if the Hash contains non-Symbol keys and is not passed as keywords" # Expected ["a", {}, false] == ["a", {"key"=>"value"}, false] to be truthy but was false
|
42
|
+
fails "A method definition in an eval creates a class method" # NoMethodError: undefined method `an_eval_class_method' for DefSpecNestedB
|
43
|
+
fails "A method definition in an eval creates an instance method" # NoMethodError: undefined method `an_eval_instance_method' for #<DefSpecNested:0x108f2>
|
43
44
|
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)
|
44
45
|
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
|
45
46
|
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)
|
46
|
-
fails "A nested method definition creates a class method when evaluated in a class method"
|
47
|
-
fails "A nested method definition creates a method in the surrounding context when evaluated in a def expr.method"
|
48
|
-
fails "A nested method definition creates an instance method inside Class.new" # NoMethodError: undefined method `new_def' for #<#<Class:
|
49
|
-
fails "A nested method definition creates an instance method when evaluated in an instance method"
|
50
|
-
fails "A number literal can be a decimal literal with trailing 'r' to represent a Rational" #
|
47
|
+
fails "A nested method definition creates a class method when evaluated in a class method" # NoMethodError: undefined method `a_class_method' for DefSpecNested
|
48
|
+
fails "A nested method definition creates a method in the surrounding context when evaluated in a def expr.method" # Expected DefSpecNested to have instance method 'inherited_method' but it does not
|
49
|
+
fails "A nested method definition creates an instance method inside Class.new" # NoMethodError: undefined method `new_def' for #<#<Class:0x10642>:0x10640>
|
50
|
+
fails "A nested method definition creates an instance method when evaluated in an instance method" # NoMethodError: undefined method `an_instance_method' for #<DefSpecNested:0x1064c>
|
51
|
+
fails "A number literal can be a decimal literal with trailing 'r' to represent a Rational" # Expected (5404319552844595/18014398509481984) == (3/10) to be truthy but was false
|
51
52
|
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
|
52
|
-
fails "A singleton class doesn't have singleton class"
|
53
|
-
fails "A singleton class raises a TypeError for symbols"
|
54
|
-
fails "A singleton method definition can be declared for a global variable"
|
55
|
-
fails "A singleton method definition raises FrozenError with the correct class name" # Expected "can't modify frozen Class: #<Class:#<Object:
|
53
|
+
fails "A singleton class doesn't have singleton class" # Expected TypeError but got: Exception (Object.defineProperty called on non-object)
|
54
|
+
fails "A singleton class raises a TypeError for symbols" # Expected TypeError but no exception was raised (#<Class:#<String:0x9093e>> was returned)
|
55
|
+
fails "A singleton method definition can be declared for a global variable" # TypeError: can't define singleton
|
56
|
+
fails "A singleton method definition raises FrozenError with the correct class name" # Expected "can't modify frozen Class: #<Class:#<Object:0x10574>>".start_with? "can't modify frozen object" to be truthy but was false
|
56
57
|
fails "Accessing a class variable raises a RuntimeError when a class variable is overtaken in an ancestor class" # Expected RuntimeError (/class variable @@cvar_overtaken of .+ is overtaken by .+/) but no exception was raised ("subclass" was returned)
|
57
58
|
fails "Accessing a class variable raises a RuntimeError when accessed from the toplevel scope (not in some module or class)" # Expected RuntimeError (class variable access from toplevel) but got: NameError (uninitialized class variable @@cvar_toplevel1 in MSpecEnv)
|
58
59
|
fails "Allowed characters allows non-ASCII lowercased characters at the beginning" # Expected nil == 1 to be truthy but was false
|
59
60
|
fails "Allowed characters allows not ASCII upcased characters at the beginning" # NameError: wrong constant name ἍBB
|
60
|
-
fails "Allowed characters
|
61
|
-
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"]
|
62
|
-
fails "An ensure block inside a begin block is executed even when a symbol is thrown in it's corresponding begin block"
|
63
|
-
fails "An ensure block inside a class is executed even when a symbol is thrown" # Expected ["class", "rescue", "ensure"]
|
64
|
-
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
|
65
|
-
fails "An instance method raises FrozenError with the correct class name" # Expected "can't modify frozen Module: #<Module:
|
66
|
-
fails "An instance method raises an error with too few arguments" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(1
|
67
|
-
fails "An instance method raises an error with too many arguments" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(2
|
68
|
-
fails "An instance method with a default argument evaluates the default when required arguments precede it" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(0
|
69
|
-
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
|
61
|
+
fails "Allowed characters parses a non-ASCII upcased character as a constant identifier" # Expected SyntaxError (/dynamic constant assignment/) but no exception was raised ("test" was returned)
|
62
|
+
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"] == ["begin", "ensure"] to be truthy but was false
|
63
|
+
fails "An ensure block inside a begin block is executed even when a symbol is thrown in it's corresponding begin block" # Expected ["begin", "rescue", "ensure"] == ["begin", "ensure"] to be truthy but was false
|
64
|
+
fails "An ensure block inside a class is executed even when a symbol is thrown" # Expected ["class", "rescue", "ensure"] == ["class", "ensure"] to be truthy but was false
|
65
|
+
fails "An instance method definition with a splat requires the presence of any arguments that precede the *" # Expected ArgumentError (wrong number of arguments (given 1, expected 2+)) but got: ArgumentError ([MSpecEnv#foo] wrong number of arguments (given 1, expected -3))
|
66
|
+
fails "An instance method raises FrozenError with the correct class name" # Expected "can't modify frozen Module: #<Module:0x103d8>".start_with? "can't modify frozen module" to be truthy but was false
|
67
|
+
fails "An instance method raises an error with too few arguments" # Expected ArgumentError (wrong number of arguments (given 1, expected 2)) but got: ArgumentError ([MSpecEnv#foo] wrong number of arguments (given 1, expected 2))
|
68
|
+
fails "An instance method raises an error with too many arguments" # Expected ArgumentError (wrong number of arguments (given 2, expected 1)) but got: ArgumentError ([MSpecEnv#foo] wrong number of arguments (given 2, expected 1))
|
69
|
+
fails "An instance method with a default argument evaluates the default when required arguments precede it" # Expected ArgumentError (wrong number of arguments (given 0, expected 1..2)) but got: ArgumentError ([MSpecEnv#foo] wrong number of arguments (given 0, expected -2))
|
70
|
+
fails "An instance method with a default argument prefers to assign to a default argument before a splat argument" # Expected ArgumentError (wrong number of arguments (given 0, expected 1+)) but got: ArgumentError ([MSpecEnv#foo] wrong number of arguments (given 0, expected -2))
|
70
71
|
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
|
71
72
|
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)
|
72
|
-
fails "Executing break from within a block works when passing through a super call" # Expected to not get Exception
|
73
|
-
fails "Execution variable $:
|
74
|
-
fails "Execution variable $: is
|
75
|
-
fails "Execution variable $: is
|
76
|
-
fails "
|
77
|
-
fails "Global variable $-
|
78
|
-
fails "Global variable $-
|
79
|
-
fails "Global variable $-
|
80
|
-
fails "Global variable $-
|
81
|
-
fails "Global variable $-
|
82
|
-
fails "Global variable
|
83
|
-
fails "Global variable $0
|
84
|
-
fails "Global variable
|
85
|
-
fails "Global variable
|
86
|
-
fails "Global variable $? is
|
87
|
-
fails "Global variable
|
73
|
+
fails "Executing break from within a block works when passing through a super call" # Expected to not get Exception
|
74
|
+
fails "Execution variable $: default $LOAD_PATH entries until sitelibdir included have @gem_prelude_index set" # Expected [].include? nil to be truthy but was false
|
75
|
+
fails "Execution variable $: is initialized to an array of strings" # Expected false == true to be truthy but was false
|
76
|
+
fails "Execution variable $: is read-only" # Expected NameError but no exception was raised ([] was returned)
|
77
|
+
fails "Execution variable $: is the same object as $LOAD_PATH and $-I" # Expected 688882 == 4 to be truthy but was false
|
78
|
+
fails "Global variable $-a is read-only" # Expected NameError but no exception was raised (true was returned)
|
79
|
+
fails "Global variable $-d is an alias of $DEBUG" # Expected nil to be true
|
80
|
+
fails "Global variable $-l is read-only" # Expected NameError but no exception was raised (true was returned)
|
81
|
+
fails "Global variable $-p is read-only" # Expected NameError but no exception was raised (true was returned)
|
82
|
+
fails "Global variable $-v is an alias of $VERBOSE" # Expected nil to be true
|
83
|
+
fails "Global variable $-w is an alias of $VERBOSE" # Expected nil to be true
|
84
|
+
fails "Global variable $0 is the path given as the main script and the same as __FILE__" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0xa7382 @old_stdout=#<IO:0xa @fd=1 @flags="w" @eof=false @closed="read" @write_proc=#<Proc:0xaa7e6> @tty=true> @verbose=nil @dollar_slash="\n" @dollar_dash_zero=nil @dollar_backslash=nil @debug=false @method=nil @object=nil @orig_program_name=nil>
|
85
|
+
fails "Global variable $0 raises a TypeError when not given an object that can be coerced to a String" # Expected TypeError but no exception was raised (nil was returned)
|
86
|
+
fails "Global variable $< is read-only" # Expected NameError but no exception was raised (nil was returned)
|
87
|
+
fails "Global variable $? is read-only" # Expected NameError but no exception was raised (nil was returned)
|
88
|
+
fails "Global variable $? is thread-local" # NoMethodError: undefined method `system' for #<MSpecEnv:0xa7382 @old_stdout=#<IO:0xa @fd=1 @flags="w" @eof=false @closed="read" @write_proc=#<Proc:0xaa7e6> @tty=true> @verbose=nil @dollar_slash="\n" @dollar_dash_zero=nil @dollar_backslash=nil>
|
89
|
+
fails "Global variable $FILENAME is read-only" # Expected NameError but no exception was raised ("-" was returned)
|
88
90
|
fails "Global variable $VERBOSE converts truthy values to true" # Expected 1 to be true
|
89
|
-
fails "Global variable $\" is
|
91
|
+
fails "Global variable $\" is an alias for $LOADED_FEATURES" # Expected [] to be identical to ["corelib/runtime", "opal", "opal/base", "corelib/helpers", "corelib/module", ...]
|
92
|
+
fails "Global variable $\" is read-only" # Expected NameError but no exception was raised ([] was returned)
|
90
93
|
fails "Hash literal checks duplicated float keys on initialization" # Expected warning to match: /key 1.0 is duplicated|duplicated key/ but got: ""
|
91
94
|
fails "Hash literal checks duplicated keys on initialization" # Expected warning to match: /key 1000 is duplicated|duplicated key/ but got: ""
|
92
|
-
fails "Hash literal expands a BasicObject using ** into the containing Hash literal initialization" # NoMethodError: undefined method `respond_to?' for BasicObject
|
93
|
-
fails "Heredoc string allow HEREDOC with <<\"identifier\", interpolated" # Expected #<Encoding:UTF-
|
94
|
-
fails "Heredoc string allows HEREDOC with <<'identifier', no interpolation" # Expected #<Encoding:UTF-
|
95
|
-
fails "Heredoc string allows HEREDOC with <<-'identifier', allowing to indent identifier, no interpolation" # Expected #<Encoding:UTF-
|
96
|
-
fails "Heredoc string allows HEREDOC with <<-\"identifier\", allowing to indent identifier, interpolated" # Expected #<Encoding:UTF-
|
97
|
-
fails "Heredoc string allows HEREDOC with <<-identifier, allowing to indent identifier, interpolated" # Expected #<Encoding:UTF-
|
98
|
-
fails "Heredoc string allows HEREDOC with <<identifier, interpolated" # Expected #<Encoding:UTF-
|
99
|
-
fails "
|
100
|
-
fails "
|
95
|
+
fails "Hash literal expands a BasicObject using ** into the containing Hash literal initialization" # NoMethodError: undefined method `respond_to?' for #<BasicObject:0xab798>
|
96
|
+
fails "Heredoc string allow HEREDOC with <<\"identifier\", interpolated" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
97
|
+
fails "Heredoc string allows HEREDOC with <<'identifier', no interpolation" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
98
|
+
fails "Heredoc string allows HEREDOC with <<-'identifier', allowing to indent identifier, no interpolation" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
99
|
+
fails "Heredoc string allows HEREDOC with <<-\"identifier\", allowing to indent identifier, interpolated" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
100
|
+
fails "Heredoc string allows HEREDOC with <<-identifier, allowing to indent identifier, interpolated" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
101
|
+
fails "Heredoc string allows HEREDOC with <<identifier, interpolated" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
102
|
+
fails "Inside 'endless' method definitions allows method calls without parenthesis" # NoMethodError: undefined method `concat' for "Hi, "
|
103
|
+
fails "Instance variables global variable when global variable is uninitialized warns about accessing uninitialized global variable in verbose mode" # Expected warning to match: /warning: global variable `\$specs_uninitialized_global_variable' not initialized/ but got: ""
|
104
|
+
fails "Instantiating a singleton class raises a TypeError when allocate is called" # Expected TypeError but no exception was raised (#<Object:0x90a56> was returned)
|
105
|
+
fails "Instantiating a singleton class raises a TypeError when new is called" # Expected TypeError but no exception was raised (#<Object:0x90a74> was returned)
|
106
|
+
fails "Interrupt shows the backtrace and has a signaled exit status" # NoMethodError: undefined method `popen' for IO
|
101
107
|
fails "Keyword arguments are now separated from positional arguments when the method takes a ** parameter does not convert a positional Hash to keyword arguments" # Expected ArgumentError (wrong number of arguments (given 4, expected 3)) but no exception was raised (42 was returned)
|
102
108
|
fails "Keyword arguments are now separated from positional arguments when the method takes a key: parameter when it's called with a positional Hash and no ** raises ArgumentError" # Expected ArgumentError (wrong number of arguments (given 4, expected 3)) but no exception was raised (42 was returned)
|
103
|
-
fails "
|
104
|
-
fails "
|
105
|
-
fails "
|
106
|
-
fails "
|
107
|
-
fails "
|
108
|
-
fails "
|
109
|
-
fails "
|
110
|
-
fails "
|
111
|
-
fails "
|
112
|
-
fails "
|
109
|
+
fails "Keyword arguments are separated from positional arguments" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
110
|
+
fails "Keyword arguments delegation does not work with (*args)" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
111
|
+
fails "Keyword arguments delegation omitted values accepts short notation 'key' for 'key: value' syntax" # NameError: uninitialized constant MSpecEnv::a
|
112
|
+
fails "Keyword arguments delegation works with (*args, **kwargs)" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
113
|
+
fails "Keyword arguments delegation works with (...)" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
114
|
+
fails "Keyword arguments delegation works with -> (*args, **kwargs) {}" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
115
|
+
fails "Keyword arguments delegation works with call(*ruby2_keyword_args) with missing ruby2_keywords in between due to CRuby bug #18625" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
116
|
+
fails "Keyword arguments delegation works with call(*ruby2_keyword_args)" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
117
|
+
fails "Keyword arguments delegation works with proc { |*args, **kwargs| }" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
118
|
+
fails "Keyword arguments delegation works with super(*ruby2_keyword_args)" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
119
|
+
fails "Keyword arguments delegation works with yield(*ruby2_keyword_args)" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
120
|
+
fails "Keyword arguments delegation works with zsuper" # Expected [[], {}] == [[{}], {}] to be truthy but was false
|
121
|
+
fails "Keyword arguments empty kwargs are treated as if they were not passed when calling a method" # Expected [{}] == [] to be truthy but was false
|
122
|
+
fails "Keyword arguments empty kwargs are treated as if they were not passed when yielding to a block" # Expected [{}] == [] to be truthy but was false
|
123
|
+
fails "Keyword arguments extra keywords are not allowed without **kwrest" # Expected ArgumentError (unknown keyword: :kw2) but no exception was raised ([] was returned)
|
124
|
+
fails "Keyword arguments handle * and ** at the same call site" # Expected [{}] == [] to be truthy but was false
|
125
|
+
fails "Keyword arguments raises ArgumentError exception when required keyword argument is not passed" # Expected ArgumentError (/missing keyword: :c/) but got: ArgumentError (missing keyword: c)
|
126
|
+
fails "Keyword arguments raises ArgumentError for missing keyword arguments even if there are extra ones" # Expected ArgumentError (/missing keyword: :a/) but got: ArgumentError (missing keyword: a)
|
127
|
+
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:0x913b2>::DOES_NOT_EXIST)
|
128
|
+
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:0x913aa>::DOES_NOT_EXIST)
|
129
|
+
fails "Literal (A::X) constant resolution with dynamically assigned constants evaluates the right hand side before evaluating a constant path" # NameError: uninitialized constant #<Module:0x91556>::ConstantSpecsRHS
|
130
|
+
fails "Literal Ranges creates a simple range as an object literal" # Expected 1..3.equal? 1..3 to be truthy but was false
|
131
|
+
fails "Literal Regexps caches the Regexp object" # Expected /foo/ to be identical to /foo/
|
132
|
+
fails "Literal Regexps support handling unicode 9.0 characters with POSIX bracket expressions" # Expected "" == "𐓘" to be truthy but was false
|
133
|
+
fails "Literal Regexps supports (?# )" # Exception: Invalid regular expression: /foo(?#comment)bar/: Invalid group
|
134
|
+
fails "Literal Regexps supports (?> ) (embedded subexpression)" # Exception: Invalid regular expression: /(?>foo)(?>bar)/: Invalid group
|
135
|
+
fails "Literal Regexps supports \\g (named backreference)" # Expected [] == ["foo1barfoo2", "foo2"] to be truthy but was false
|
136
|
+
fails "Literal Regexps supports character class composition" # Expected [] == ["def"] to be truthy but was false
|
137
|
+
fails "Literal Regexps supports conditional regular expressions with named capture groups" # Exception: Invalid regular expression: /^(?<word>foo)?(?(<word>)(T)|(F))$/: Invalid group
|
113
138
|
fails "Literal Regexps supports conditional regular expressions with positional capture groups" # Exception: Invalid regular expression: /^(foo)?(?(1)(T)|(F))$/: Invalid group
|
114
|
-
fails "Literal Regexps supports
|
115
|
-
fails "Literal Regexps
|
116
|
-
fails "Literal Regexps throws SyntaxError for malformed literals"
|
117
|
-
fails "Literal Regexps treats an escaped non-escapable character normally when used as a terminator" # Expected "\\$" to equal "(?-mix:\\$)"
|
139
|
+
fails "Literal Regexps supports possessive quantifiers" # Exception: Invalid regular expression: /fooA++bar/: Nothing to repeat
|
140
|
+
fails "Literal Regexps throws SyntaxError for malformed literals" # Expected SyntaxError but got: Exception (Invalid regular expression: /(/: Unterminated group)
|
118
141
|
fails "Local variable shadowing does not warn in verbose mode" # Expected nil == [3, 3, 3] to be truthy but was false
|
119
142
|
fails "Magic comments in a loaded file are case-insensitive" # LoadError: cannot load such file -- ruby/language/fixtures/case_magic_comment
|
120
143
|
fails "Magic comments in a loaded file are optional" # LoadError: cannot load such file -- ruby/language/fixtures/no_magic_comment
|
@@ -126,14 +149,14 @@ opal_filter "language" do
|
|
126
149
|
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
|
127
150
|
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
|
128
151
|
fails "Magic comments in a required file are case-insensitive" # NameError: uninitialized constant Encoding::Big5
|
129
|
-
fails "Magic comments in a required file are optional" # Expected nil
|
152
|
+
fails "Magic comments in a required file are optional" # Expected nil == "UTF-8" to be truthy but was false
|
130
153
|
fails "Magic comments in a required file can be after the shebang" # NameError: uninitialized constant Encoding::Big5
|
131
154
|
fails "Magic comments in a required file can take Emacs style" # NameError: uninitialized constant Encoding::Big5
|
132
155
|
fails "Magic comments in a required file can take vim style" # NameError: uninitialized constant Encoding::Big5
|
133
156
|
fails "Magic comments in a required file determine __ENCODING__" # NameError: uninitialized constant Encoding::Big5
|
134
|
-
fails "Magic comments in a required file do not cause bytes to be mangled by passing them through the wrong encoding" # Expected nil
|
135
|
-
fails "Magic comments in a required file must be at the first line" # Expected nil
|
136
|
-
fails "Magic comments in a required file must be the first token of the line" # Expected nil
|
157
|
+
fails "Magic comments in a required file do not cause bytes to be mangled by passing them through the wrong encoding" # Expected nil == "[167, 65, 166, 110]" to be truthy but was false
|
158
|
+
fails "Magic comments in a required file must be at the first line" # Expected nil == "UTF-8" to be truthy but was false
|
159
|
+
fails "Magic comments in a required file must be the first token of the line" # Expected nil == "UTF-8" to be truthy but was false
|
137
160
|
fails "Magic comments in an -e argument are case-insensitive" # ArgumentError: unknown encoding name - locale
|
138
161
|
fails "Magic comments in an -e argument are optional" # ArgumentError: unknown encoding name - locale
|
139
162
|
fails "Magic comments in an -e argument can be after the shebang" # ArgumentError: unknown encoding name - locale
|
@@ -143,15 +166,15 @@ opal_filter "language" do
|
|
143
166
|
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
|
144
167
|
fails "Magic comments in an -e argument must be at the first line" # ArgumentError: unknown encoding name - locale
|
145
168
|
fails "Magic comments in an -e argument must be the first token of the line" # ArgumentError: unknown encoding name - locale
|
146
|
-
fails "Magic comments in an eval are case-insensitive" #
|
147
|
-
fails "Magic comments in an eval are optional" #
|
148
|
-
fails "Magic comments in an eval can be after the shebang" #
|
149
|
-
fails "Magic comments in an eval can take Emacs style" #
|
150
|
-
fails "Magic comments in an eval can take vim style" #
|
151
|
-
fails "Magic comments in an eval determine __ENCODING__" #
|
152
|
-
fails "Magic comments in an eval do not cause bytes to be mangled by passing them through the wrong encoding" #
|
153
|
-
fails "Magic comments in an eval must be at the first line" #
|
154
|
-
fails "Magic comments in an eval must be the first token of the line" #
|
169
|
+
fails "Magic comments in an eval are case-insensitive" # NoMethodError: undefined method `read' for File
|
170
|
+
fails "Magic comments in an eval are optional" # NoMethodError: undefined method `read' for File
|
171
|
+
fails "Magic comments in an eval can be after the shebang" # NoMethodError: undefined method `read' for File
|
172
|
+
fails "Magic comments in an eval can take Emacs style" # NoMethodError: undefined method `read' for File
|
173
|
+
fails "Magic comments in an eval can take vim style" # NoMethodError: undefined method `read' for File
|
174
|
+
fails "Magic comments in an eval determine __ENCODING__" # NoMethodError: undefined method `read' for File
|
175
|
+
fails "Magic comments in an eval do not cause bytes to be mangled by passing them through the wrong encoding" # NoMethodError: undefined method `read' for File
|
176
|
+
fails "Magic comments in an eval must be at the first line" # NoMethodError: undefined method `read' for File
|
177
|
+
fails "Magic comments in an eval must be the first token of the line" # NoMethodError: undefined method `read' for File
|
155
178
|
fails "Magic comments in stdin are case-insensitive" # ArgumentError: unknown encoding name - locale
|
156
179
|
fails "Magic comments in stdin are optional" # ArgumentError: unknown encoding name - locale
|
157
180
|
fails "Magic comments in stdin can be after the shebang" # ArgumentError: unknown encoding name - locale
|
@@ -161,21 +184,23 @@ opal_filter "language" do
|
|
161
184
|
fails "Magic comments in stdin do not cause bytes to be mangled by passing them through the wrong encoding" # ArgumentError: unknown encoding name - locale
|
162
185
|
fails "Magic comments in stdin must be at the first line" # ArgumentError: unknown encoding name - locale
|
163
186
|
fails "Magic comments in stdin must be the first token of the line" # ArgumentError: unknown encoding name - locale
|
164
|
-
fails "Magic comments in the main file are case-insensitive" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
165
|
-
fails "Magic comments in the main file are optional" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
166
|
-
fails "Magic comments in the main file can be after the shebang" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
167
|
-
fails "Magic comments in the main file can take Emacs style" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
168
|
-
fails "Magic comments in the main file can take vim style" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
169
|
-
fails "Magic comments in the main file determine __ENCODING__" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
170
|
-
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:
|
171
|
-
fails "Magic comments in the main file must be at the first line" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
172
|
-
fails "Magic comments in the main file must be the first token of the line" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
173
|
-
fails "NoMethodError#message calls receiver.inspect only when calling Exception#message" # Expected ["inspect_called"] to
|
174
|
-
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:
|
175
|
-
fails "Operators * / % are left-associative"
|
187
|
+
fails "Magic comments in the main file are case-insensitive" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
188
|
+
fails "Magic comments in the main file are optional" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
189
|
+
fails "Magic comments in the main file can be after the shebang" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
190
|
+
fails "Magic comments in the main file can take Emacs style" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
191
|
+
fails "Magic comments in the main file can take vim style" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
192
|
+
fails "Magic comments in the main file determine __ENCODING__" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
193
|
+
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:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
194
|
+
fails "Magic comments in the main file must be at the first line" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
195
|
+
fails "Magic comments in the main file must be the first token of the line" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7f626 @method="UTF8" @object=#<Proc:0x7f6de> @default=#<Encoding:UTF-8>>
|
196
|
+
fails "NoMethodError#message calls receiver.inspect only when calling Exception#message" # Expected ["inspect_called"] == [] to be truthy but was false
|
197
|
+
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:0x91b82>)
|
198
|
+
fails "Operators * / % are left-associative" # Expected 1 == 1 to be falsy but was true
|
176
199
|
fails "Operators <=> == === != =~ !~ have higher precedence than &&" # Expected false == false to be falsy but was true
|
177
200
|
fails "Optional constant assignment with ||= causes side-effects of the module part to be applied (for nil constant)" # Expected 3 == 1 to be truthy but was false
|
178
201
|
fails "Optional constant assignment with ||= causes side-effects of the module part to be applied only once (for undefined constant)" # Expected 2 == 1 to be truthy but was false
|
202
|
+
fails "Optional variable assignments using &&= using a #[] evaluates the index arguments in the correct order" # TypeError: NilClass can't be coerced into Numeric
|
203
|
+
fails "Optional variable assignments using &&= using a #[] evaluates the index precisely once" # Expected [] == ["x"] to be truthy but was false
|
179
204
|
fails "Optional variable assignments using compounded constants with &&= assignments" # Expected warning to match: /already initialized constant/ but got: ""
|
180
205
|
fails "Optional variable assignments using compounded constants with operator assignments" # Expected warning to match: /already initialized constant/ but got: ""
|
181
206
|
fails "Pattern matching Array pattern calls #deconstruct once for multiple patterns, caching the result" # Expected ["deconstruct", "deconstruct"] == ["deconstruct"] to be truthy but was false
|
@@ -185,70 +210,79 @@ opal_filter "language" do
|
|
185
210
|
fails "Pattern matching Hash pattern raise SyntaxError when keys duplicate in pattern" # Expected SyntaxError (/duplicated key name/) but got: SyntaxError (duplicate hash pattern key a)
|
186
211
|
fails "Pattern matching alternative pattern does not support variable binding" # Expected SyntaxError (/illegal variable in alternative pattern/) but no exception was raised (nil was returned)
|
187
212
|
fails "Pattern matching cannot mix in and when operators" # Expected SyntaxError (/syntax error, unexpected `in'/) but got: SyntaxError (unexpected token kIN)
|
213
|
+
fails "Pattern matching refinements are used for #=== in constant pattern" # NoMatchingPatternError: {}
|
214
|
+
fails "Pattern matching refinements are used for #deconstruct" # NoMatchingPatternError: []
|
215
|
+
fails "Pattern matching refinements are used for #deconstruct_keys" # NoMatchingPatternError: {}
|
188
216
|
fails "Pattern matching variable pattern allows applying ^ operator to bound variables" # NoMatchingPatternError: [1, 1]
|
189
217
|
fails "Pattern matching variable pattern does not support using variable name (except _) several times" # Expected SyntaxError (/duplicated variable name/) but got: SyntaxError (duplicate variable name a)
|
190
218
|
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: SyntaxError (no such local variable: `n')
|
191
219
|
fails "Pattern matching variable pattern supports existing variables in a pattern specified with ^ operator" # SyntaxError: no such local variable: `a'
|
192
220
|
fails "Pattern matching warning when regular form does not warn about pattern matching is experimental feature" # NameError: uninitialized constant Warning
|
193
|
-
fails "Predefined global $+ captures the last non nil capture"
|
194
|
-
fails "Predefined global $+ is equivalent to $~.captures.last"
|
195
|
-
fails "Predefined global $, raises TypeError if assigned a non-String"
|
196
|
-
fails "Predefined global $-0 changes $/"
|
197
|
-
fails "Predefined global $-0 does not call #to_str to convert the object to a String"
|
198
|
-
fails "Predefined global $-0 raises a TypeError if assigned a boolean"
|
221
|
+
fails "Predefined global $+ captures the last non nil capture" # Expected nil == "a" to be truthy but was false
|
222
|
+
fails "Predefined global $+ is equivalent to $~.captures.last" # Expected nil == "o" to be truthy but was false
|
223
|
+
fails "Predefined global $, raises TypeError if assigned a non-String" # Expected TypeError but no exception was raised (#<Object:0xa7e06> was returned)
|
224
|
+
fails "Predefined global $-0 changes $/" # Expected " " to be identical to "xyz"
|
225
|
+
fails "Predefined global $-0 does not call #to_str to convert the object to a String" # Expected TypeError but no exception was raised (#<MockObject:0xa7ac4 @name="$-0 value", @null=nil> was returned)
|
226
|
+
fails "Predefined global $-0 raises a TypeError if assigned a boolean" # Expected TypeError but no exception was raised (true was returned)
|
199
227
|
fails "Predefined global $-0 raises a TypeError if assigned an Integer" # Expected TypeError but no exception was raised (1 was returned)
|
200
|
-
fails "Predefined global $. can be assigned a Float" # Expected 123.5 to
|
201
|
-
fails "Predefined global $. raises TypeError if object can't be converted to an Integer" # Expected TypeError but no exception was raised (#<MockObject:
|
202
|
-
fails "Predefined global $. should call #to_int to convert the object to an Integer" # Expected #<MockObject:
|
203
|
-
fails "Predefined global $/ changes $-0"
|
204
|
-
fails "Predefined global $/ does not call #to_str to convert the object to a String"
|
205
|
-
fails "Predefined global $/ raises a TypeError if assigned a boolean"
|
228
|
+
fails "Predefined global $. can be assigned a Float" # Expected 123.5 == 123 to be truthy but was false
|
229
|
+
fails "Predefined global $. raises TypeError if object can't be converted to an Integer" # Expected TypeError but no exception was raised (#<MockObject:0xa7e2c @name="bad-value", @null=nil> was returned)
|
230
|
+
fails "Predefined global $. should call #to_int to convert the object to an Integer" # Expected #<MockObject:0xa7fde @name="good-value", @null=nil> == 321 to be truthy but was false
|
231
|
+
fails "Predefined global $/ changes $-0" # Expected nil to be identical to "xyz"
|
232
|
+
fails "Predefined global $/ does not call #to_str to convert the object to a String" # Expected TypeError but no exception was raised (#<MockObject>(#pretty_inspect raised #<TypeError: can't convert MockObject into String (MockObject#to_str gives NilClass)>) was returned)
|
233
|
+
fails "Predefined global $/ raises a TypeError if assigned a boolean" # Expected TypeError but no exception was raised (#<TrueClass>(#pretty_inspect raised #<TypeError: no implicit conversion of TrueClass into String>) was returned)
|
206
234
|
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)
|
207
|
-
fails "Predefined global
|
208
|
-
fails "Predefined global
|
209
|
-
fails "Predefined global
|
210
|
-
fails "Predefined global
|
211
|
-
fails "Predefined global
|
212
|
-
fails "Predefined global
|
213
|
-
fails "
|
235
|
+
fails "Predefined global $= warns when accessed" # Expected warning to match: /is no longer effective/ but got: ""
|
236
|
+
fails "Predefined global $= warns when assigned" # Expected warning to match: /is no longer effective/ but got: ""
|
237
|
+
fails "Predefined global $\\ does not call #to_str to convert the object to a String" # Expected TypeError but no exception was raised (#<MockObject:0xa7c78 @name="$\\ value", @null=nil> was returned)
|
238
|
+
fails "Predefined global $\\ raises a TypeError if assigned not String" # Expected TypeError but no exception was raised (1 was returned)
|
239
|
+
fails "Predefined global $_ is Thread-local" # NotImplementedError: Thread creation not available
|
240
|
+
fails "Predefined global $_ is set at the method-scoped level rather than block-scoped" # Expected "bar " == "baz " to be truthy but was false
|
241
|
+
fails "Predefined global $stdout raises TypeError error if assigned to nil" # Expected TypeError but no exception was raised (nil was returned)
|
242
|
+
fails "Predefined global $stdout raises TypeError error if assigned to object that doesn't respond to #write" # Expected TypeError but no exception was raised (#<MockObject:0xa7634 @name="object", @null=nil> was returned)
|
243
|
+
fails "Predefined global $~ is set at the method-scoped level rather than block-scoped" # Expected nil == nil to be falsy but was true
|
244
|
+
fails "Predefined global $~ raises an error if assigned an object not nil or instanceof MatchData" # Expected TypeError but no exception was raised (#<Object:0xa73aa> was returned)
|
245
|
+
fails "Ruby String interpolation returns a string with the source encoding by default" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
214
246
|
fails "Ruby String interpolation returns a string with the source encoding, even if the components have another encoding" # ArgumentError: unknown encoding name - euc-jp
|
215
247
|
fails "The ** operator hash with omitted value accepts mixed syntax" # NameError: uninitialized constant MSpecEnv::a
|
216
248
|
fails "The ** operator hash with omitted value accepts short notation 'key' for 'key: value' syntax" # NameError: uninitialized constant MSpecEnv::a
|
217
249
|
fails "The ** operator hash with omitted value ignores hanging comma on short notation" # NameError: uninitialized constant MSpecEnv::a
|
218
|
-
fails "The ** operator hash with omitted value works with methods and local vars" # NameError: uninitialized constant #<Class:
|
219
|
-
fails "The BEGIN keyword accesses variables outside the eval scope"
|
220
|
-
fails "The BEGIN keyword runs first in a given code unit"
|
221
|
-
fails "The BEGIN keyword runs in a shared scope"
|
222
|
-
fails "The BEGIN keyword runs multiple begins in FIFO order"
|
223
|
-
fails "The BEGIN keyword uses top-level for self" #
|
224
|
-
fails "The END keyword runs last in a given code unit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
225
|
-
fails "The END keyword runs multiple ends in LIFO order" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
226
|
-
fails "The END keyword runs only once for multiple calls" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
227
|
-
fails "The __ENCODING__ pseudo-variable is US-ASCII by default"
|
228
|
-
fails "The __ENCODING__ pseudo-variable is the encoding specified by a magic comment in the file"
|
229
|
-
fails "The __ENCODING__ pseudo-variable is the encoding specified by a magic comment inside an eval"
|
230
|
-
fails "The __ENCODING__ pseudo-variable is the evaluated strings's one inside an eval"
|
231
|
-
fails "The __FILE__ pseudo-variable equals the absolute path of a file loaded by a relative path" #
|
232
|
-
fails "The __FILE__ pseudo-variable equals the absolute path of a file loaded by an absolute path" #
|
233
|
-
fails "The
|
234
|
-
fails "The
|
235
|
-
fails "The
|
236
|
-
fails "The alias keyword
|
237
|
-
fails "The alias keyword
|
238
|
-
fails "The alias keyword
|
239
|
-
fails "The alias keyword
|
240
|
-
fails "The alias keyword
|
241
|
-
fails "The
|
242
|
-
fails "The
|
243
|
-
fails "The break statement in a captured block from
|
244
|
-
fails "The break statement in a captured block
|
245
|
-
fails "The break statement in a captured block
|
246
|
-
fails "The break statement in a captured block when the invocation of the scope creating the block is still active raises a LocalJumpError when
|
247
|
-
fails "The break statement in a
|
248
|
-
fails "The break statement in a
|
249
|
-
fails "The break statement in a lambda created at the toplevel returns a value when invoking from
|
250
|
+
fails "The ** operator hash with omitted value works with methods and local vars" # NameError: uninitialized constant #<Class:0xabe00>::bar
|
251
|
+
fails "The BEGIN keyword accesses variables outside the eval scope" # SyntaxError: Unsupported sexp: preexe
|
252
|
+
fails "The BEGIN keyword runs first in a given code unit" # SyntaxError: Unsupported sexp: preexe
|
253
|
+
fails "The BEGIN keyword runs in a shared scope" # SyntaxError: Unsupported sexp: preexe
|
254
|
+
fails "The BEGIN keyword runs multiple begins in FIFO order" # SyntaxError: Unsupported sexp: preexe
|
255
|
+
fails "The BEGIN keyword uses top-level for self" # SyntaxError: Unsupported sexp: preexe
|
256
|
+
fails "The END keyword runs last in a given code unit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x193ae>
|
257
|
+
fails "The END keyword runs multiple ends in LIFO order" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x193ae>
|
258
|
+
fails "The END keyword runs only once for multiple calls" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x193ae>
|
259
|
+
fails "The __ENCODING__ pseudo-variable is US-ASCII by default" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
260
|
+
fails "The __ENCODING__ pseudo-variable is the encoding specified by a magic comment in the file" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
261
|
+
fails "The __ENCODING__ pseudo-variable is the encoding specified by a magic comment inside an eval" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
262
|
+
fails "The __ENCODING__ pseudo-variable is the evaluated strings's one inside an eval" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
263
|
+
fails "The __FILE__ pseudo-variable with load equals the absolute path of a file loaded by a relative path" # LoadError: cannot load such file -- ruby/fixtures/code/file_fixture
|
264
|
+
fails "The __FILE__ pseudo-variable with load equals the absolute path of a file loaded by an absolute path" # LoadError: cannot load such file -- ruby/fixtures/code/file_fixture
|
265
|
+
fails "The __FILE__ pseudo-variable with require equals the absolute path of a file loaded by a relative path" # LoadError: cannot load such file -- ruby/fixtures/code/file_fixture
|
266
|
+
fails "The __FILE__ pseudo-variable with require equals the absolute path of a file loaded by an absolute path" # LoadError: cannot load such file -- ruby/fixtures/code/file_fixture
|
267
|
+
fails "The __LINE__ pseudo-variable equals the line number of the text in a loaded file" # ArgumentError: [Method#load] wrong number of arguments (given 2, expected 1)
|
268
|
+
fails "The alias keyword can create a new global variable, synonym of the original" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1c9ba @obj=#<AliasObject:0x1ce06> @meta=#<Class:#<AliasObject:0x1ce06>>>
|
269
|
+
fails "The alias keyword can override an existing global variable and make them synonyms" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1c9ba @obj=#<AliasObject:0x1ce06> @meta=#<Class:#<AliasObject:0x1ce06>>>
|
270
|
+
fails "The alias keyword is not allowed against Integer or String instances" # Expected TypeError but no exception was raised (Object was returned)
|
271
|
+
fails "The alias keyword on top level defines the alias on Object" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1c9ba @obj=#<AliasObject:0x1ce00> @meta=#<Class:#<AliasObject:0x1ce00>>>
|
272
|
+
fails "The alias keyword operates on methods defined via attr, attr_reader, and attr_accessor" # NameError: undefined method `foo' for class `Object'
|
273
|
+
fails "The alias keyword operates on the object's metaclass when used in instance_eval" # NameError: undefined method `value' for class `Object'
|
274
|
+
fails "The alias keyword supports aliasing twice the same global variables" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1c9ba @obj=#<AliasObject:0x1ce06> @meta=#<Class:#<AliasObject:0x1ce06>>>
|
275
|
+
fails "The break statement in a captured block from a scope that has returned raises a LocalJumpError when calling the block from a method" # Expected LocalJumpError but got: Exception (unexpected break)
|
276
|
+
fails "The break statement in a captured block from a scope that has returned raises a LocalJumpError when yielding to the block" # Expected LocalJumpError but got: Exception (unexpected break)
|
277
|
+
fails "The break statement in a captured block from another thread raises a LocalJumpError when getting the value from another thread" # NotImplementedError: Thread creation not available
|
278
|
+
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" # Expected LocalJumpError but got: Exception (unexpected break)
|
279
|
+
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" # Expected LocalJumpError but got: Exception (unexpected break)
|
280
|
+
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" # Expected LocalJumpError but got: Exception (unexpected break)
|
281
|
+
fails "The break statement in a lambda created at the toplevel returns a value when invoking from a block" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0xa5de4 @program=#<BreakSpecs::Lambda:0xa5ea2 @ensures=false>>
|
282
|
+
fails "The break statement in a lambda created at the toplevel returns a value when invoking from a method" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0xa5de4 @program=#<BreakSpecs::Lambda:0xa5ea6 @ensures=false>>
|
283
|
+
fails "The break statement in a lambda created at the toplevel returns a value when invoking from the toplevel" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0xa5de4 @program=#<BreakSpecs::Lambda:0xa5eaa @ensures=false>>
|
250
284
|
fails "The class keyword does not raise a SyntaxError when opening a class without a semicolon" # NameError: uninitialized constant ClassSpecsKeywordWithoutSemicolon
|
251
|
-
fails "The def keyword within a closure looks outside the closure for the visibility"
|
285
|
+
fails "The def keyword within a closure looks outside the closure for the visibility" # Expected DefSpecsLambdaVisibility to have private instance method 'some_method' but it does not
|
252
286
|
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
|
253
287
|
fails "The defined? keyword for a simple constant returns 'constant' when the constant is defined" # Expected false == true to be truthy but was false
|
254
288
|
fails "The defined? keyword for an expression returns 'assignment' for assigning a local variable" # Expected false == true to be truthy but was false
|
@@ -260,42 +294,40 @@ opal_filter "language" do
|
|
260
294
|
fails "The defined? keyword for super for a method taking no arguments returns 'super' when a superclass method exists" # Expected false == true to be truthy but was false
|
261
295
|
fails "The defined? keyword for variables returns 'class variable' when called with the name of a class variable" # Expected false == true to be truthy but was false
|
262
296
|
fails "The defined? keyword for variables returns 'global-variable' for a global variable that has been assigned nil" # Expected false == true to be truthy but was false
|
263
|
-
fails "The defined? keyword for variables returns 'instance-variable' for an instance variable that has been assigned to nil"
|
297
|
+
fails "The defined? keyword for variables returns 'instance-variable' for an instance variable that has been assigned to nil" # Expected nil == "instance-variable" to be truthy but was false
|
264
298
|
fails "The defined? keyword for variables returns 'instance-variable' for an instance variable that has been assigned" # Expected false == true to be truthy but was false
|
265
299
|
fails "The defined? keyword for variables returns 'local-variable' when called with the name of a local variable" # Expected false == true to be truthy but was false
|
266
|
-
fails "The defined? keyword for variables returns nil for a global variable that has been read but not assigned to"
|
267
|
-
fails "The defined? keyword for variables when a Regexp matches a String returns nil for non-captures"
|
268
|
-
fails "The defined? keyword for variables when a String matches a Regexp returns nil for non-captures"
|
300
|
+
fails "The defined? keyword for variables returns nil for a global variable that has been read but not assigned to" # Expected "global-variable" to be nil
|
301
|
+
fails "The defined? keyword for variables when a Regexp matches a String returns nil for non-captures" # Expected "global-variable" to be nil
|
302
|
+
fails "The defined? keyword for variables when a String matches a Regexp returns nil for non-captures" # Expected "global-variable" to be nil
|
269
303
|
fails "The defined? keyword for yield returns 'yield' if a block is passed to a method not taking a block parameter" # Expected false == true to be truthy but was false
|
270
304
|
fails "The defined? keyword when called with a method name without a receiver returns 'method' if the method is defined" # Expected false == true to be truthy but was false
|
271
|
-
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with exclusive-end range"
|
272
|
-
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with inclusive-end range"
|
305
|
+
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with exclusive-end range" # NoMethodError: undefined method `collector' for #<MSpecEnv:0x7bd18>
|
306
|
+
fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with inclusive-end range" # NoMethodError: undefined method `collector' for #<MSpecEnv:0x7bd18>
|
273
307
|
fails "The redo statement in a method is invalid and raises a SyntaxError" # Expected SyntaxError but no exception was raised ("m" was returned)
|
274
|
-
fails "The redo statement triggers ensure block when re-executing a block"
|
308
|
+
fails "The redo statement triggers ensure block when re-executing a block" # TypeError: NilClass can't be coerced into Numeric
|
275
309
|
fails "The rescue keyword allows rescue in 'do end' block" # NoMethodError: undefined method `call' for nil
|
276
|
-
fails "The rescue keyword inline form can be inlined" # Expected Infinity to
|
277
|
-
fails "The rescue keyword only accepts Module or Class in rescue clauses" #
|
278
|
-
fails "The rescue keyword only accepts Module or Class in splatted rescue clauses" #
|
279
|
-
fails "The rescue keyword rescues the exception in the deepest rescue block declared to handle the appropriate exception type" # Expected "
|
280
|
-
fails "The return keyword at top level return with argument warns but does not affect exit status" #
|
281
|
-
fails "The return keyword at top level within a block within a class is not allowed" #
|
310
|
+
fails "The rescue keyword inline form can be inlined" # Expected Infinity == 1 to be truthy but was false
|
311
|
+
fails "The rescue keyword only accepts Module or Class in rescue clauses" # Expected TypeError but got: RuntimeError (error)
|
312
|
+
fails "The rescue keyword only accepts Module or Class in splatted rescue clauses" # Expected TypeError but got: RuntimeError (error)
|
313
|
+
fails "The rescue keyword rescues the exception in the deepest rescue block declared to handle the appropriate exception type" # Expected "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'" to include ":in `raise_standard_error'"
|
314
|
+
fails "The return keyword at top level return with argument warns but does not affect exit status" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1494e @filename=nil>
|
315
|
+
fails "The return keyword at top level within a block within a class is not allowed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x1494e>
|
282
316
|
fails "The super keyword uses block argument given to method when used in a block" # LocalJumpError: no block given
|
283
|
-
fails "The super keyword uses given block even if arguments are passed explicitly"
|
317
|
+
fails "The super keyword uses given block even if arguments are passed explicitly" # LocalJumpError: no block given
|
284
318
|
fails "The throw keyword raises an UncaughtThrowError if used to exit a thread" # NotImplementedError: Thread creation not available
|
285
|
-
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
|
319
|
+
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:0x4128>
|
286
320
|
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)
|
287
|
-
fails "The yield call taking no arguments ignores assignment to the explicit block argument and calls the passed block"
|
321
|
+
fails "The yield call taking no arguments ignores assignment to the explicit block argument and calls the passed block" # Expected #<Proc:0x2b4c> == 42 to be truthy but was false
|
288
322
|
fails "Using yield in a singleton class literal raises a SyntaxError" # Expected SyntaxError (/Invalid yield/) but got: SyntaxError (undefined method `uses_block!' for nil)
|
289
|
-
fails "
|
290
|
-
fails "a method definition that sets more than one default parameter all to the same value
|
323
|
+
fails "Using yield in non-lambda block raises a SyntaxError" # Expected SyntaxError (/Invalid yield/) but got: SyntaxError (undefined method `uses_block!' for nil)
|
324
|
+
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" # Expected ArgumentError (wrong number of arguments (given 2, expected 0..1)) but got: ArgumentError ([MSpecEnv#foo] wrong number of arguments (given 2, expected -1))
|
325
|
+
fails "a method definition that sets more than one default parameter all to the same value treats the argument after the multi-parameter normally" # Expected ArgumentError (wrong number of arguments (given 3, expected 0..2)) but got: ArgumentError ([MSpecEnv#bar] wrong number of arguments (given 3, expected -1))
|
291
326
|
fails "kwarg with omitted value in a method call accepts short notation 'kwarg' in method call for definition 'def call(*args, **kwargs) = [args, kwargs]'" # NameError: uninitialized constant SpecEvaluate::a
|
292
327
|
fails "kwarg with omitted value in a method call with methods and local variables for definition \n def call(*args, **kwargs) = [args, kwargs]\n def bar\n \"baz\"\n end\n def foo(val)\n call bar:, val:\n end" # NameError: uninitialized constant SpecEvaluate::bar
|
293
|
-
fails "self in a metaclass body (class << obj) raises a TypeError for numbers"
|
294
|
-
fails "self in a metaclass body (class << obj) raises a TypeError for symbols"
|
295
|
-
fails "self.send(:block_given?) returns false when a method defined by define_method is called with a block"
|
296
|
-
fails "self.send(:block_given?) returns true if and only if a block is supplied"
|
297
|
-
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)
|
298
|
-
fails_badly "Pattern matching refinements are used for #=== in constant pattern"
|
299
|
-
fails_badly "Pattern matching refinements are used for #deconstruct"
|
300
|
-
fails_badly "Pattern matching refinements are used for #deconstruct_keys"
|
328
|
+
fails "self in a metaclass body (class << obj) raises a TypeError for numbers" # Expected TypeError but got: Exception (Object.defineProperty called on non-object)
|
329
|
+
fails "self in a metaclass body (class << obj) raises a TypeError for symbols" # Expected TypeError but got: Exception (Cannot create property '$$meta' on string 'symbol')
|
330
|
+
fails "self.send(:block_given?) returns false when a method defined by define_method is called with a block" # NoMethodError: undefined method `block_given?' for KernelSpecs::SelfBlockGiven
|
331
|
+
fails "self.send(:block_given?) returns true if and only if a block is supplied" # NoMethodError: undefined method `block_given?' for KernelSpecs::SelfBlockGiven
|
332
|
+
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)
|
301
333
|
end
|