opal 1.6.1 → 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/Gemfile +1 -0
- data/HACKING.md +47 -26
- data/UNRELEASED.md +28 -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 +6 -1
- data/lib/opal/builder_processors.rb +5 -3
- 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 +4 -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/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 +91 -52
- 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
@@ -12,80 +12,80 @@ opal_filter "Encoding" do
|
|
12
12
|
fails "Integer#to_s fixnum when given a base returns self converted to a String in the given base" # NoMethodError: undefined method `default_internal' for Encoding
|
13
13
|
fails "Integer#to_s fixnum when no base given returns self converted to a String using base 10" # NoMethodError: undefined method `default_internal' for Encoding
|
14
14
|
fails "Kernel#sprintf returns a String in the same encoding as the format String if compatible" # NameError: uninitialized constant Encoding::KOI8_U
|
15
|
-
fails "Marshal.dump when passed an IO calls binmode when it's defined" # ArgumentError: [Marshal.dump] wrong number of arguments(2
|
16
|
-
fails "Marshal.dump with a String dumps a String in another encoding" # Expected "\
|
17
|
-
fails "Marshal.dump with a String dumps a US-ASCII String" # Expected "\
|
18
|
-
fails "Marshal.dump with a String dumps a UTF-8 String" # Expected "\
|
19
|
-
fails "Marshal.dump with a String dumps multiple strings using symlinks for the :E (encoding) symbol" # Expected "\
|
15
|
+
fails "Marshal.dump when passed an IO calls binmode when it's defined" # ArgumentError: [Marshal.dump] wrong number of arguments (given 2, expected 1)
|
16
|
+
fails "Marshal.dump with a String dumps a String in another encoding" # Expected "\x04\b\"\x0Fm\x00ö\x00h\x00r\x00e\x00" == "\x04\bI\"\x0Fm\x00ö\x00h\x00r\x00e\x00\x06:\rencoding\"\rUTF-16LE" to be truthy but was false
|
17
|
+
fails "Marshal.dump with a String dumps a US-ASCII String" # Expected "\x04\b\"\babc" == "\x04\bI\"\babc\x06:\x06EF" to be truthy but was false
|
18
|
+
fails "Marshal.dump with a String dumps a UTF-8 String" # Expected "\x04\b\"\vmöhre" == "\x04\bI\"\vmöhre\x06:\x06ET" to be truthy but was false
|
19
|
+
fails "Marshal.dump with a String dumps multiple strings using symlinks for the :E (encoding) symbol" # Expected "\x04\b[\a\"\x00@\x06" == "\x04\b[\aI\"\x00\x06:\x06EFI\"\x00\x06;\x00T" to be truthy but was false
|
20
20
|
fails "Marshal.load for a String loads a String in another encoding" # NameError: 'encoding' is not allowed as an instance variable name
|
21
|
-
fails "Marshal.load for a String loads a US-ASCII String" # Expected #<Encoding:UTF-
|
22
|
-
fails "MatchData#post_match sets an empty result to the encoding of the source String" #
|
21
|
+
fails "Marshal.load for a String loads a US-ASCII String" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:US-ASCII>
|
22
|
+
fails "MatchData#post_match sets an empty result to the encoding of the source String" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:ISO-8859-1>
|
23
23
|
fails "MatchData#post_match sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
24
|
-
fails "MatchData#pre_match sets an empty result to the encoding of the source String" #
|
24
|
+
fails "MatchData#pre_match sets an empty result to the encoding of the source String" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:ISO-8859-1>
|
25
25
|
fails "MatchData#pre_match sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
26
26
|
fails "Predefined global $& sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
27
|
-
fails "Predefined global $' sets an empty result to the encoding of the source String" #
|
27
|
+
fails "Predefined global $' sets an empty result to the encoding of the source String" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:ISO-8859-1>
|
28
28
|
fails "Predefined global $' sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
29
29
|
fails "Predefined global $+ sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
30
|
-
fails "Predefined global $` sets an empty result to the encoding of the source String" #
|
30
|
+
fails "Predefined global $` sets an empty result to the encoding of the source String" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:ISO-8859-1>
|
31
31
|
fails "Predefined global $` sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
32
32
|
fails "Predefined globals $1..N sets the encoding to the encoding of the source String" # NameError: uninitialized constant Encoding::EUC_JP
|
33
|
-
fails "Regexp#match with [string, position] when given a negative position raises an ArgumentError for an invalid encoding" #
|
34
|
-
fails "Regexp#match with [string, position] when given a positive position raises an ArgumentError for an invalid encoding" #
|
35
|
-
fails "Ruby String interpolation raises an Encoding::CompatibilityError if the Encodings are not compatible" # Expected
|
36
|
-
fails "Source files encoded in UTF-16 BE with a BOM are invalid because they contain an invalid UTF-8 sequence before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
37
|
-
fails "Source files encoded in UTF-16 BE without a BOM are parsed as empty because they contain a NUL byte before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
38
|
-
fails "Source files encoded in UTF-16 LE with a BOM are invalid because they contain an invalid UTF-8 sequence before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
39
|
-
fails "Source files encoded in UTF-16 LE without a BOM are parsed because empty as they contain a NUL byte before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
40
|
-
fails "Source files encoded in UTF-8 with a BOM can be parsed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
41
|
-
fails "Source files encoded in UTF-8 without a BOM can be parsed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
42
|
-
fails "String#% output's encoding negotiates a compatible encoding if necessary" # Expected #<Encoding:UTF-
|
43
|
-
fails "String#* raises an ArgumentError if the length of the resulting string doesn't fit into a long" #
|
44
|
-
fails "String#[]= with String index encodes the String in an encoding compatible with the replacement" #
|
33
|
+
fails "Regexp#match with [string, position] when given a negative position raises an ArgumentError for an invalid encoding" # Expected ArgumentError but no exception was raised (nil was returned)
|
34
|
+
fails "Regexp#match with [string, position] when given a positive position raises an ArgumentError for an invalid encoding" # Expected ArgumentError but no exception was raised (#<MatchData "ell" 1:"e" 2:"l"> was returned)
|
35
|
+
fails "Ruby String interpolation raises an Encoding::CompatibilityError if the Encodings are not compatible" # Expected CompatibilityError but no exception was raised ("あ ÿ" was returned)
|
36
|
+
fails "Source files encoded in UTF-16 BE with a BOM are invalid because they contain an invalid UTF-8 sequence before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x49e4c>
|
37
|
+
fails "Source files encoded in UTF-16 BE without a BOM are parsed as empty because they contain a NUL byte before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x49e4c>
|
38
|
+
fails "Source files encoded in UTF-16 LE with a BOM are invalid because they contain an invalid UTF-8 sequence before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x49e4c>
|
39
|
+
fails "Source files encoded in UTF-16 LE without a BOM are parsed because empty as they contain a NUL byte before the encoding comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x49e4c>
|
40
|
+
fails "Source files encoded in UTF-8 with a BOM can be parsed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x49e4c>
|
41
|
+
fails "Source files encoded in UTF-8 without a BOM can be parsed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x49e4c>
|
42
|
+
fails "String#% output's encoding negotiates a compatible encoding if necessary" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
43
|
+
fails "String#* raises an ArgumentError if the length of the resulting string doesn't fit into a long" # Expected ArgumentError but got: RangeError (multiply count must not overflow maximum string size)
|
44
|
+
fails "String#[]= with String index encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
45
45
|
fails "String#[]= with String index raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
46
|
-
fails "String#[]= with String index replaces characters with a multibyte character" #
|
47
|
-
fails "String#[]= with String index replaces multibyte characters with characters" #
|
48
|
-
fails "String#[]= with String index replaces multibyte characters with multibyte characters" #
|
49
|
-
fails "String#[]= with a Range index deletes a multibyte character" #
|
50
|
-
fails "String#[]= with a Range index encodes the String in an encoding compatible with the replacement" #
|
51
|
-
fails "String#[]= with a Range index inserts a multibyte character" #
|
46
|
+
fails "String#[]= with String index replaces characters with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
47
|
+
fails "String#[]= with String index replaces multibyte characters with characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
48
|
+
fails "String#[]= with String index replaces multibyte characters with multibyte characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
49
|
+
fails "String#[]= with a Range index deletes a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
50
|
+
fails "String#[]= with a Range index encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
51
|
+
fails "String#[]= with a Range index inserts a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
52
52
|
fails "String#[]= with a Range index raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
53
|
-
fails "String#[]= with a Range index replaces characters with a multibyte character" #
|
54
|
-
fails "String#[]= with a Range index replaces multibyte characters by negative indexes" #
|
55
|
-
fails "String#[]= with a Range index replaces multibyte characters with characters" #
|
56
|
-
fails "String#[]= with a Range index replaces multibyte characters with multibyte characters" #
|
57
|
-
fails "String#[]= with a Regexp index encodes the String in an encoding compatible with the replacement" #
|
53
|
+
fails "String#[]= with a Range index replaces characters with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
54
|
+
fails "String#[]= with a Range index replaces multibyte characters by negative indexes" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
55
|
+
fails "String#[]= with a Range index replaces multibyte characters with characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
56
|
+
fails "String#[]= with a Range index replaces multibyte characters with multibyte characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
57
|
+
fails "String#[]= with a Regexp index encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
58
58
|
fails "String#[]= with a Regexp index raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
59
|
-
fails "String#[]= with a Regexp index replaces characters with a multibyte character" #
|
60
|
-
fails "String#[]= with a Regexp index replaces multibyte characters with characters" #
|
61
|
-
fails "String#[]= with a Regexp index replaces multibyte characters with multibyte characters" #
|
59
|
+
fails "String#[]= with a Regexp index replaces characters with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
60
|
+
fails "String#[]= with a Regexp index replaces multibyte characters with characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
61
|
+
fails "String#[]= with a Regexp index replaces multibyte characters with multibyte characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
62
62
|
fails "String#ascii_only? returns false after appending non ASCII characters to an empty String" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
63
|
-
fails "String#ascii_only? returns false when concatenating an ASCII and non-ASCII String" # NoMethodError: undefined method `concat' for ""
|
64
|
-
fails "String#ascii_only? returns false when replacing an ASCII String with a non-ASCII String" # NoMethodError: undefined method `replace' for ""
|
65
|
-
fails "String#b returns new string without modifying self" #
|
66
|
-
fails "String#byteslice on on non ASCII strings returns byteslice of unicode strings" # Expected nil
|
63
|
+
fails "String#ascii_only? returns false when concatenating an ASCII and non-ASCII String" # NoMethodError: undefined method `concat' for ""
|
64
|
+
fails "String#ascii_only? returns false when replacing an ASCII String with a non-ASCII String" # NoMethodError: undefined method `replace' for ""
|
65
|
+
fails "String#b returns new string without modifying self" # Expected "こんちには" not to be identical to "こんちには"
|
66
|
+
fails "String#byteslice on on non ASCII strings returns byteslice of unicode strings" # Expected nil == "\x81" to be truthy but was false
|
67
67
|
fails "String#center with length, padding with width returns a String in the same encoding as the original" # NameError: uninitialized constant Encoding::IBM437
|
68
68
|
fails "String#center with length, padding with width, pattern raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
69
69
|
fails "String#center with length, padding with width, pattern returns a String in the compatible encoding" # NameError: uninitialized constant Encoding::IBM437
|
70
70
|
fails "String#chars returns a different character if the String is transcoded" # ArgumentError: unknown encoding name - iso-8859-15
|
71
71
|
fails "String#chars returns characters in the same encoding as self" # ArgumentError: unknown encoding name - Shift_JIS
|
72
|
-
fails "String#chars uses the String's encoding to determine what characters it contains" # Expected ["�"
|
73
|
-
fails "String#chars works if the String's contents is invalid for its encoding" #
|
74
|
-
fails "String#chr returns a String in the same encoding as self" # Expected #<Encoding:UTF-
|
75
|
-
fails "String#chr returns a copy of self" # Expected "e" not to
|
72
|
+
fails "String#chars uses the String's encoding to determine what characters it contains" # Expected ["�"] == ["𤭢"] to be truthy but was false
|
73
|
+
fails "String#chars works if the String's contents is invalid for its encoding" # Expected true to be false
|
74
|
+
fails "String#chr returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
75
|
+
fails "String#chr returns a copy of self" # Expected "e" not to be identical to "e"
|
76
76
|
fails "String#codepoints raises an ArgumentError if self's encoding is invalid and a block is given" # Expected true to be false
|
77
77
|
fails "String#codepoints raises an ArgumentError when no block is given if self has an invalid encoding" # Expected true to be false
|
78
78
|
fails "String#codepoints raises an ArgumentError when self has an invalid encoding and a method is called on the returned Enumerator" # Expected true to be false
|
79
|
-
fails "String#codepoints round-trips to the original String using Integer#chr" #
|
79
|
+
fails "String#codepoints round-trips to the original String using Integer#chr" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
80
80
|
fails "String#each_char returns a different character if the String is transcoded" # ArgumentError: unknown encoding name - iso-8859-15
|
81
81
|
fails "String#each_char returns characters in the same encoding as self" # ArgumentError: unknown encoding name - Shift_JIS
|
82
|
-
fails "String#each_char uses the String's encoding to determine what characters it contains" # Expected ["�"
|
83
|
-
fails "String#each_char works if the String's contents is invalid for its encoding" #
|
82
|
+
fails "String#each_char uses the String's encoding to determine what characters it contains" # Expected ["�"] == ["𤭢"] to be truthy but was false
|
83
|
+
fails "String#each_char works if the String's contents is invalid for its encoding" # Expected true to be false
|
84
84
|
fails "String#each_codepoint raises an ArgumentError if self's encoding is invalid and a block is given" # Expected true to be false
|
85
85
|
fails "String#each_codepoint raises an ArgumentError when self has an invalid encoding and a method is called on the returned Enumerator" # Expected true to be false
|
86
86
|
fails "String#each_codepoint round-trips to the original String using Integer#chr" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
87
87
|
fails "String#each_codepoint when no block is given returned Enumerator size should return the size of the string even when the string has an invalid encoding" # Expected true to be false
|
88
|
-
fails "String#each_codepoint when no block is given returned Enumerator size should return the size of the string" #
|
88
|
+
fails "String#each_codepoint when no block is given returned Enumerator size should return the size of the string" # Expected nil == 5 to be truthy but was false
|
89
89
|
fails "String#each_codepoint when no block is given returns an Enumerator even when self has an invalid encoding" # Expected true to be false
|
90
90
|
fails "String#encode given the xml: :attr option replaces all instances of '&' with '&'" # NoMethodError: undefined method `default_internal' for Encoding
|
91
91
|
fails "String#encode given the xml: :attr option replaces all instances of '<' with '<'" # NoMethodError: undefined method `default_internal' for Encoding
|
@@ -146,53 +146,53 @@ opal_filter "Encoding" do
|
|
146
146
|
fails "String#encoding for Strings with \\u escapes is not affected by both the default internal and external encoding being set at the same time" # NoMethodError: undefined method `default_internal' for Encoding
|
147
147
|
fails "String#encoding for Strings with \\u escapes is not affected by the default external encoding" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
148
148
|
fails "String#encoding for Strings with \\u escapes is not affected by the default internal encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
149
|
-
fails "String#encoding for Strings with \\u escapes returns US-ASCII if self is US-ASCII only" # Expected
|
149
|
+
fails "String#encoding for Strings with \\u escapes returns US-ASCII if self is US-ASCII only" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
150
150
|
fails "String#encoding for Strings with \\u escapes returns the given encoding if #encode!has been called" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
151
151
|
fails "String#encoding for Strings with \\u escapes returns the given encoding if #force_encoding has been called" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
152
152
|
fails "String#encoding for Strings with \\x escapes is not affected by both the default internal and external encoding being set at the same time" # NoMethodError: undefined method `default_internal' for Encoding
|
153
153
|
fails "String#encoding for Strings with \\x escapes is not affected by the default external encoding" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
154
154
|
fails "String#encoding for Strings with \\x escapes is not affected by the default internal encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
155
|
-
fails "String#encoding for Strings with \\x escapes returns US-ASCII if self is US-ASCII only" # Expected
|
155
|
+
fails "String#encoding for Strings with \\x escapes returns US-ASCII if self is US-ASCII only" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
156
156
|
fails "String#encoding for Strings with \\x escapes returns the given encoding if #encode!has been called" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
157
157
|
fails "String#encoding for Strings with \\x escapes returns the given encoding if #force_encoding has been called" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
158
158
|
fails "String#encoding for Strings with \\x escapes returns the source encoding when an escape creates a byte with the 8th bit set if the source encoding isn't US-ASCII" # NameError: uninitialized constant Encoding::ISO8859_9
|
159
159
|
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default encodings being different" # NoMethodError: undefined method `default_internal' for Encoding
|
160
|
-
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default external encoding being different" # Expected #<Encoding:UTF-
|
160
|
+
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default external encoding being different" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
161
161
|
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default internal and external encodings being different" # NoMethodError: undefined method `default_internal' for Encoding
|
162
162
|
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default internal encoding being different" # NoMethodError: undefined method `default_internal' for Encoding
|
163
|
-
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII" # Expected #<Encoding:UTF-
|
163
|
+
fails "String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
164
164
|
fails "String#encoding returns the given encoding if #encode!has been called" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
165
165
|
fails "String#encoding returns the given encoding if #force_encoding has been called" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
166
166
|
fails "String#force_encoding accepts a String as the name of an Encoding" # ArgumentError: unknown encoding name - shift_jis
|
167
167
|
fails "String#force_encoding accepts an Encoding instance" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
168
|
-
fails "String#force_encoding calls #to_str to convert an object to an encoding name" # ArgumentError: unknown encoding name - #<MockObject:
|
169
|
-
fails "String#force_encoding does not transcode self" # Expected "
|
170
|
-
fails "String#force_encoding raises a TypeError if #to_str does not return a String" #
|
171
|
-
fails "String#force_encoding raises a TypeError if passed nil" #
|
168
|
+
fails "String#force_encoding calls #to_str to convert an object to an encoding name" # ArgumentError: unknown encoding name - #<MockObject:0x142fa>
|
169
|
+
fails "String#force_encoding does not transcode self" # Expected "é" == "é" to be falsy but was true
|
170
|
+
fails "String#force_encoding raises a TypeError if #to_str does not return a String" # Expected TypeError but got: ArgumentError (unknown encoding name - #<MockObject:0x1430c>)
|
171
|
+
fails "String#force_encoding raises a TypeError if passed nil" # Expected TypeError but got: ArgumentError (unknown encoding name - )
|
172
172
|
fails "String#force_encoding sets the encoding even if the String contents are invalid in that encoding" # ArgumentError: unknown encoding name - euc-jp
|
173
173
|
fails "String#index with Regexp raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
174
174
|
fails "String#index with String raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
175
|
-
fails "String#insert with index, other inserts a character into a multibyte encoded string" # NoMethodError: undefined method `insert' for "ありがとう"
|
175
|
+
fails "String#insert with index, other inserts a character into a multibyte encoded string" # NoMethodError: undefined method `insert' for "ありがとう"
|
176
176
|
fails "String#insert with index, other raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
177
|
-
fails "String#insert with index, other returns a String in the compatible encoding" # NoMethodError: undefined method `insert' for ""
|
178
|
-
fails "String#length returns the length of a string in different encodings" # NameError: uninitialized constant Encoding::
|
179
|
-
fails "String#length returns the length of the new self after encoding is changed" # Expected 4 to
|
177
|
+
fails "String#insert with index, other returns a String in the compatible encoding" # NoMethodError: undefined method `insert' for ""
|
178
|
+
fails "String#length returns the length of a string in different encodings" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
179
|
+
fails "String#length returns the length of the new self after encoding is changed" # Expected 4 == 12 to be truthy but was false
|
180
180
|
fails "String#ljust with length, padding with width returns a String in the same encoding as the original" # NameError: uninitialized constant Encoding::IBM437
|
181
181
|
fails "String#ljust with length, padding with width, pattern raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
182
182
|
fails "String#ljust with length, padding with width, pattern returns a String in the compatible encoding" # NameError: uninitialized constant Encoding::IBM437
|
183
|
-
fails "String#ord raises an ArgumentError if called on an empty String" #
|
183
|
+
fails "String#ord raises an ArgumentError if called on an empty String" # Exception: Cannot read properties of undefined (reading '$pretty_inspect')
|
184
184
|
fails "String#rindex with Regexp raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
185
185
|
fails "String#rjust with length, padding with width returns a String in the same encoding as the original" # NameError: uninitialized constant Encoding::IBM437
|
186
186
|
fails "String#rjust with length, padding with width, pattern raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
187
187
|
fails "String#rjust with length, padding with width, pattern returns a String in the compatible encoding" # NameError: uninitialized constant Encoding::IBM437
|
188
|
-
fails "String#size returns the length of a string in different encodings" # NameError: uninitialized constant Encoding::
|
189
|
-
fails "String#size returns the length of the new self after encoding is changed" # Expected 4 to
|
190
|
-
fails "String#split with String throws an ArgumentError if the pattern is not a valid string" #
|
191
|
-
fails "String#valid_encoding? returns false if a valid String had an invalid character appended to it" #
|
192
|
-
fails "String#valid_encoding? returns false if self contains a character invalid in the associated encoding" #
|
188
|
+
fails "String#size returns the length of a string in different encodings" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
189
|
+
fails "String#size returns the length of the new self after encoding is changed" # Expected 4 == 12 to be truthy but was false
|
190
|
+
fails "String#split with String throws an ArgumentError if the pattern is not a valid string" # Expected ArgumentError but no exception was raised (["проверка"] was returned)
|
191
|
+
fails "String#valid_encoding? returns false if a valid String had an invalid character appended to it" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
192
|
+
fails "String#valid_encoding? returns false if self contains a character invalid in the associated encoding" # Expected true to be false
|
193
193
|
fails "String#valid_encoding? returns false if self is valid in one encoding, but invalid in the one it's tagged with" # Expected true to be false
|
194
194
|
fails "String#valid_encoding? returns true for all encodings self is valid in" # Expected true to be false
|
195
|
-
fails "String#valid_encoding? returns true if an invalid string is appended another invalid one but both make a valid string" #
|
195
|
+
fails "String#valid_encoding? returns true if an invalid string is appended another invalid one but both make a valid string" # Expected true to be false
|
196
196
|
fails "The predefined global constant ARGV contains Strings encoded in locale Encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
197
197
|
fails "The predefined global constant STDERR has nil for the external encoding despite Encoding.default_external being changed" # NoMethodError: undefined method `default_internal' for Encoding
|
198
198
|
fails "The predefined global constant STDERR has nil for the external encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
@@ -210,6 +210,6 @@ opal_filter "Encoding" do
|
|
210
210
|
fails "The predefined global constant STDOUT has nil for the internal encoding despite Encoding.default_internal being changed" # NoMethodError: undefined method `default_internal' for Encoding
|
211
211
|
fails "The predefined global constant STDOUT has nil for the internal encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
212
212
|
fails "The predefined global constant STDOUT has the encodings set by #set_encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
213
|
-
fails "Time#inspect returns a US-ASCII encoded string" # Expected #<Encoding:UTF-
|
214
|
-
fails "Time#to_s returns a US-ASCII encoded string" # Expected #<Encoding:UTF-
|
213
|
+
fails "Time#inspect returns a US-ASCII encoded string" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:US-ASCII>
|
214
|
+
fails "Time#to_s returns a US-ASCII encoded string" # Expected #<Encoding:UTF-8> to be identical to #<Encoding:US-ASCII>
|
215
215
|
end
|
@@ -1,29 +1,31 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Enumerable" do
|
3
|
-
fails "Enumerable#chain returns a chain of self and provided enumerables" # NoMethodError: undefined method `chain' for #<EnumerableSpecs::Numerous:
|
4
|
-
fails "Enumerable#chain returns an Enumerator::Chain if given a block" # NoMethodError: undefined method `chain' for #<EnumerableSpecs::Numerous:
|
5
|
-
fails "Enumerable#chunk_while on a single-element array ignores the block and returns an enumerator that yields [element]" # Expected []
|
6
|
-
fails "Enumerable#collect reports the same arity as the given block" # Exception: Cannot read
|
7
|
-
fails "Enumerable#collect yields 2 arguments for a Hash when block arity is 2" # ArgumentError: [#register] wrong number of arguments(1
|
8
|
-
fails "Enumerable#first returns a gathered array from yield parameters"
|
3
|
+
fails "Enumerable#chain returns a chain of self and provided enumerables" # NoMethodError: undefined method `chain' for #<EnumerableSpecs::Numerous:0x2eb8 @list=[1]>
|
4
|
+
fails "Enumerable#chain returns an Enumerator::Chain if given a block" # NoMethodError: undefined method `chain' for #<EnumerableSpecs::Numerous:0x2eb2 @list=[2, 5, 3, 6, 1, 4]>
|
5
|
+
fails "Enumerable#chunk_while on a single-element array ignores the block and returns an enumerator that yields [element]" # Expected [] == [[1]] to be truthy but was false
|
6
|
+
fails "Enumerable#collect reports the same arity as the given block" # Exception: Cannot read properties of undefined (reading '$$is_array')
|
7
|
+
fails "Enumerable#collect yields 2 arguments for a Hash when block arity is 2" # ArgumentError: [#register] wrong number of arguments (given 1, expected 2)
|
8
|
+
fails "Enumerable#first returns a gathered array from yield parameters" # Expected 1 == [1, 2] to be truthy but was false
|
9
9
|
fails "Enumerable#grep correctly handles non-string elements" # Expected nil == "match" to be truthy but was false
|
10
10
|
fails "Enumerable#grep does not modify Regexp.last_match without block" # NoMethodError: undefined method `[]' for nil
|
11
11
|
fails "Enumerable#grep does not set $~ when given no block" # Expected nil == "z" to be truthy but was false
|
12
12
|
fails "Enumerable#grep_v correctly handles non-string elements" # Expected nil == "match" to be truthy but was false
|
13
13
|
fails "Enumerable#grep_v does not modify Regexp.last_match without block" # Expected "e" == "z" to be truthy but was false
|
14
14
|
fails "Enumerable#grep_v does not set $~ when given no block" # Expected "e" == "z" to be truthy but was false
|
15
|
-
fails "Enumerable#
|
16
|
-
fails "Enumerable#map
|
17
|
-
fails "Enumerable#
|
18
|
-
fails "Enumerable#
|
19
|
-
fails "Enumerable#
|
20
|
-
fails "Enumerable#
|
21
|
-
fails "Enumerable#
|
22
|
-
fails "Enumerable#
|
23
|
-
fails "Enumerable#
|
24
|
-
fails "Enumerable#
|
25
|
-
fails "Enumerable#
|
26
|
-
fails "Enumerable#to_h with block
|
27
|
-
fails "Enumerable#
|
28
|
-
fails "Enumerable#
|
15
|
+
fails "Enumerable#inject raises an ArgumentError when no parameters or block is given" # Expected ArgumentError but got: Exception (Cannot read properties of undefined (reading '$inspect'))
|
16
|
+
fails "Enumerable#map reports the same arity as the given block" # Exception: Cannot read properties of undefined (reading '$$is_array')
|
17
|
+
fails "Enumerable#map yields 2 arguments for a Hash when block arity is 2" # ArgumentError: [#register] wrong number of arguments (given 1, expected 2)
|
18
|
+
fails "Enumerable#reduce raises an ArgumentError when no parameters or block is given" # Expected ArgumentError but got: Exception (Cannot read properties of undefined (reading '$inspect'))
|
19
|
+
fails "Enumerable#reverse_each gathers whole arrays as elements when each yields multiple" # Expected [6, 3, 1] == [[6, 7, 8, 9], [3, 4, 5], [1, 2]] to be truthy but was false
|
20
|
+
fails "Enumerable#slice_when when an iterator method yields more than one value processes all yielded values" # Expected [] == [[[1, 2]]] to be truthy but was false
|
21
|
+
fails "Enumerable#slice_when when given a block doesn't yield an empty array on a small enumerable" # Expected [] == [[42]] to be truthy but was false
|
22
|
+
fails "Enumerable#sort_by calls #each to iterate over the elements to be sorted" # Mock '#<EnumerableSpecs::Numerous:0x42a10 @list=[1, 2, 3]>' expected to receive each("any_args") exactly 1 times but received it 0 times
|
23
|
+
fails "Enumerable#sort_by returns an array of elements when a block is supplied and #map returns an enumerable" # NoMethodError: undefined method `sort!' for #<EnumerableSpecs::MapReturnsEnumerable::EnumerableMapping:0x42a48 @items=#<EnumerableSpecs::MapReturnsEnumerable:0x42a46> @block=#<Proc:0x42a4a>>
|
24
|
+
fails "Enumerable#take_while calls the block with initial args when yielded with multiple arguments" # Expected [1, [2], [3, 4], [5, 6, 7], [8, 9], nil, []] == [1, [2], 3, 5, [8, 9], nil, []] to be truthy but was false
|
25
|
+
fails "Enumerable#tally counts values as gathered array when yielded with multiple arguments" # Expected {[]=>3, 0=>1, [0, 1]=>2, [0, 1, 2]=>3, nil=>1, "default_arg"=>1, [0]=>1} == {nil=>2, 0=>1, [0, 1]=>2, [0, 1, 2]=>3, "default_arg"=>1, []=>2, [0]=>1} to be truthy but was false
|
26
|
+
fails "Enumerable#to_h with block does not coerce returned pair to Array with #to_a" # Expected TypeError (/wrong element type MockObject/) but got: TypeError (wrong element type NilClass at 0 (expected array))
|
27
|
+
fails "Enumerable#to_h with block raises ArgumentError if block returns longer or shorter array" # Expected ArgumentError (/element has wrong array length/) but got: ArgumentError (wrong array length at 0 (expected 2, was 3))
|
28
|
+
fails "Enumerable#to_h with block raises TypeError if block returns something other than Array" # Expected TypeError (/wrong element type String/) but got: TypeError (wrong element type NilClass at 0 (expected array))
|
29
|
+
fails "Enumerable#uniq uses eql? semantics" # Expected [1] == [1, 1] to be truthy but was false
|
30
|
+
fails "Enumerable#zip passes each element of the result array to a block and return nil if a block is given" # Expected [[1, 4, 7], [2, 5, 8], [3, 6, 9]] == nil to be truthy but was false
|
29
31
|
end
|