opal 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +17 -0
  3. data/CHANGELOG.md +35 -1
  4. data/Gemfile +1 -0
  5. data/HACKING.md +47 -26
  6. data/benchmark/benchmarks +415 -103
  7. data/benchmark/bm_call_overhead.yml +28 -0
  8. data/benchmark/run.rb +61 -40
  9. data/docs/cdp_common.json +3364 -0
  10. data/docs/cdp_common.md +18 -0
  11. data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
  12. data/lib/opal/ast/builder.rb +1 -1
  13. data/lib/opal/builder.rb +6 -1
  14. data/lib/opal/builder_processors.rb +5 -3
  15. data/lib/opal/cache.rb +1 -7
  16. data/lib/opal/cli_options.rb +72 -58
  17. data/lib/opal/cli_runners/chrome.rb +47 -9
  18. data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
  19. data/lib/opal/cli_runners/compiler.rb +146 -13
  20. data/lib/opal/cli_runners/deno.rb +32 -0
  21. data/lib/opal/cli_runners/firefox.rb +350 -0
  22. data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
  23. data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
  24. data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
  25. data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
  26. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
  27. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
  28. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
  29. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
  30. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
  31. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
  32. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
  33. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
  34. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
  35. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
  36. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
  37. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
  38. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
  39. data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
  40. data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
  41. data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
  42. data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
  43. data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
  44. data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
  45. data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
  46. data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
  47. data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
  48. data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
  49. data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
  50. data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
  51. data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
  52. data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
  53. data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
  54. data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
  55. data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
  56. data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
  57. data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
  58. data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
  59. data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
  60. data/lib/opal/cli_runners/package-lock.json +62 -0
  61. data/lib/opal/cli_runners/package.json +1 -1
  62. data/lib/opal/cli_runners.rb +26 -4
  63. data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
  64. data/lib/opal/nodes/def.rb +8 -8
  65. data/lib/opal/nodes/iter.rb +12 -12
  66. data/lib/opal/nodes/logic.rb +1 -1
  67. data/lib/opal/nodes/masgn.rb +2 -2
  68. data/lib/opal/parser/with_ruby_lexer.rb +1 -1
  69. data/lib/opal/paths.rb +14 -0
  70. data/lib/opal/rewriter.rb +2 -0
  71. data/lib/opal/rewriters/forward_args.rb +52 -4
  72. data/lib/opal/rewriters/targeted_patches.rb +94 -0
  73. data/lib/opal/version.rb +1 -1
  74. data/opal/corelib/basic_object.rb +1 -1
  75. data/opal/corelib/boolean.rb +2 -2
  76. data/opal/corelib/class.rb +11 -0
  77. data/opal/corelib/constants.rb +3 -3
  78. data/opal/corelib/enumerable.rb +4 -0
  79. data/opal/corelib/enumerator.rb +1 -1
  80. data/opal/corelib/hash.rb +2 -2
  81. data/opal/corelib/helpers.rb +1 -1
  82. data/opal/corelib/kernel.rb +3 -3
  83. data/opal/corelib/method.rb +1 -1
  84. data/opal/corelib/module.rb +29 -8
  85. data/opal/corelib/proc.rb +7 -5
  86. data/opal/corelib/runtime.js +141 -78
  87. data/opal/corelib/set.rb +252 -0
  88. data/opal/corelib/string.rb +2 -1
  89. data/opal/corelib/time.rb +2 -2
  90. data/opal/opal.rb +1 -0
  91. data/opal.gemspec +1 -0
  92. data/spec/filters/bugs/array.rb +22 -13
  93. data/spec/filters/bugs/base64.rb +5 -5
  94. data/spec/filters/bugs/basicobject.rb +16 -8
  95. data/spec/filters/bugs/bigdecimal.rb +161 -160
  96. data/spec/filters/bugs/binding.rb +10 -10
  97. data/spec/filters/bugs/class.rb +8 -8
  98. data/spec/filters/bugs/complex.rb +2 -1
  99. data/spec/filters/bugs/date.rb +79 -81
  100. data/spec/filters/bugs/datetime.rb +29 -29
  101. data/spec/filters/bugs/delegate.rb +1 -3
  102. data/spec/filters/bugs/encoding.rb +69 -69
  103. data/spec/filters/bugs/enumerable.rb +22 -20
  104. data/spec/filters/bugs/enumerator.rb +88 -85
  105. data/spec/filters/bugs/exception.rb +46 -40
  106. data/spec/filters/bugs/file.rb +32 -32
  107. data/spec/filters/bugs/float.rb +26 -21
  108. data/spec/filters/bugs/freeze.rb +88 -0
  109. data/spec/filters/bugs/hash.rb +39 -38
  110. data/spec/filters/bugs/integer.rb +57 -44
  111. data/spec/filters/bugs/io.rb +1 -1
  112. data/spec/filters/bugs/kernel.rb +349 -269
  113. data/spec/filters/bugs/language.rb +220 -188
  114. data/spec/filters/bugs/main.rb +5 -3
  115. data/spec/filters/bugs/marshal.rb +38 -38
  116. data/spec/filters/bugs/math.rb +2 -1
  117. data/spec/filters/bugs/method.rb +73 -62
  118. data/spec/filters/bugs/module.rb +163 -143
  119. data/spec/filters/bugs/numeric.rb +6 -6
  120. data/spec/filters/bugs/objectspace.rb +16 -16
  121. data/spec/filters/bugs/openstruct.rb +1 -1
  122. data/spec/filters/bugs/pack_unpack.rb +51 -51
  123. data/spec/filters/bugs/pathname.rb +7 -7
  124. data/spec/filters/bugs/proc.rb +63 -63
  125. data/spec/filters/bugs/random.rb +7 -6
  126. data/spec/filters/bugs/range.rb +12 -9
  127. data/spec/filters/bugs/rational.rb +8 -7
  128. data/spec/filters/bugs/regexp.rb +49 -48
  129. data/spec/filters/bugs/ruby-32.rb +56 -0
  130. data/spec/filters/bugs/set.rb +30 -30
  131. data/spec/filters/bugs/singleton.rb +4 -4
  132. data/spec/filters/bugs/string.rb +187 -99
  133. data/spec/filters/bugs/stringio.rb +7 -0
  134. data/spec/filters/bugs/stringscanner.rb +68 -68
  135. data/spec/filters/bugs/struct.rb +11 -9
  136. data/spec/filters/bugs/symbol.rb +1 -1
  137. data/spec/filters/bugs/time.rb +78 -63
  138. data/spec/filters/bugs/trace_point.rb +4 -4
  139. data/spec/filters/bugs/unboundmethod.rb +32 -17
  140. data/spec/filters/bugs/warnings.rb +8 -12
  141. data/spec/filters/unsupported/array.rb +24 -107
  142. data/spec/filters/unsupported/basicobject.rb +12 -12
  143. data/spec/filters/unsupported/bignum.rb +27 -52
  144. data/spec/filters/unsupported/class.rb +1 -2
  145. data/spec/filters/unsupported/delegator.rb +3 -3
  146. data/spec/filters/unsupported/enumerable.rb +2 -9
  147. data/spec/filters/unsupported/enumerator.rb +2 -11
  148. data/spec/filters/unsupported/file.rb +1 -1
  149. data/spec/filters/unsupported/float.rb +28 -47
  150. data/spec/filters/unsupported/hash.rb +8 -14
  151. data/spec/filters/unsupported/integer.rb +75 -91
  152. data/spec/filters/unsupported/kernel.rb +17 -35
  153. data/spec/filters/unsupported/language.rb +11 -19
  154. data/spec/filters/unsupported/marshal.rb +22 -41
  155. data/spec/filters/unsupported/matchdata.rb +28 -52
  156. data/spec/filters/unsupported/math.rb +1 -1
  157. data/spec/filters/unsupported/privacy.rb +229 -285
  158. data/spec/filters/unsupported/range.rb +1 -5
  159. data/spec/filters/unsupported/regexp.rb +40 -66
  160. data/spec/filters/unsupported/set.rb +2 -2
  161. data/spec/filters/unsupported/singleton.rb +4 -4
  162. data/spec/filters/unsupported/string.rb +305 -508
  163. data/spec/filters/unsupported/struct.rb +3 -4
  164. data/spec/filters/unsupported/symbol.rb +15 -18
  165. data/spec/filters/unsupported/thread.rb +1 -7
  166. data/spec/filters/unsupported/time.rb +159 -202
  167. data/spec/filters/unsupported/usage_of_files.rb +170 -259
  168. data/spec/lib/builder_spec.rb +4 -4
  169. data/spec/lib/rewriters/forward_args_spec.rb +32 -12
  170. data/spec/mspec-opal/runner.rb +2 -0
  171. data/spec/ruby_specs +4 -0
  172. data/stdlib/deno/base.rb +28 -0
  173. data/stdlib/deno/file.rb +340 -0
  174. data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
  175. data/stdlib/headless_browser/file.rb +15 -0
  176. data/stdlib/headless_browser.rb +4 -0
  177. data/stdlib/native.rb +1 -1
  178. data/stdlib/nodejs/file.rb +5 -0
  179. data/stdlib/opal/platform.rb +8 -6
  180. data/stdlib/opal-platform.rb +14 -8
  181. data/stdlib/set.rb +1 -258
  182. data/tasks/benchmarking.rake +62 -19
  183. data/tasks/performance.rake +1 -1
  184. data/tasks/testing.rake +5 -3
  185. data/test/nodejs/test_file.rb +29 -10
  186. data/test/opal/http_server.rb +28 -11
  187. data/test/opal/unsupported_and_bugs.rb +2 -1
  188. metadata +89 -50
  189. data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
  190. data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
  191. data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
  192. data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
  193. data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
  194. data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
  195. data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
  196. data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
  197. data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
  198. data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
  199. data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
  200. data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
  201. data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
  202. data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
  203. data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
  204. data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
  205. data/spec/filters/bugs/boolean.rb +0 -3
  206. data/spec/filters/bugs/matrix.rb +0 -3
  207. data/spec/filters/unsupported/fixnum.rb +0 -15
  208. data/spec/filters/unsupported/freeze.rb +0 -102
  209. data/spec/filters/unsupported/pathname.rb +0 -4
  210. data/spec/filters/unsupported/proc.rb +0 -4
  211. data/spec/filters/unsupported/random.rb +0 -5
  212. data/spec/filters/unsupported/taint.rb +0 -162
@@ -1,8 +1,4 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Range" do
3
- fails "Range#initialize is private"
4
- fails "Range#inspect returns a tainted string if either end is tainted"
5
- fails "Range#inspect returns a untrusted string if either end is untrusted"
6
- fails "Range#to_s returns a tainted string if either end is tainted"
7
- fails "Range#to_s returns a untrusted string if either end is untrusted"
3
+ fails "Range#initialize is private" # Expected Range to have private instance method 'initialize' but it does not
8
4
  end
@@ -1,70 +1,44 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Regexp" do
3
- fails "Regexp with character classes doesn't match non-ASCII characters with [[:ascii:]]"
4
- fails "Regexp#options does not include Regexp::FIXEDENCODING for a Regexp literal with the 'n' option"
5
- fails "Regexp#options includes Regexp::FIXEDENCODING for a Regexp literal with the 'e' option"
6
- fails "Regexp#options includes Regexp::FIXEDENCODING for a Regexp literal with the 's' option"
7
- fails "Regexp#options includes Regexp::FIXEDENCODING for a Regexp literal with the 'u' option"
8
- fails "Regexp#options includes Regexp::NOENCODING for a Regexp literal with the 'n' option"
9
- fails "Regexp#source has US-ASCII encoding when created from an ASCII-only \\u{} literal"
10
- fails "Regexp#source has UTF-8 encoding when created from a non-ASCII-only \\u{} literal"
11
- fails "Regexp#to_s deals properly with uncaptured groups"
12
- fails "Regexp#to_s displays groups with options"
13
- fails "Regexp#to_s displays options if included"
14
- fails "Regexp#to_s displays single group with same options as main regex as the main regex"
15
- fails "Regexp#to_s handles abusive option groups"
16
- fails "Regexp.escape sets the encoding of the result to ASCII-8BIT if any non-US-ASCII characters are present in an input String with invalid encoding"
17
- fails "Regexp.escape sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String"
18
- fails "Regexp.escape sets the encoding of the result to the encoding of the String if any non-US-ASCII characters are present in an input String with valid encoding"
19
- fails "Regexp.new given a String accepts a Fixnum of two or more options ORed together as the second argument"
20
- fails "Regexp.new given a String ignores the third argument if it is 'e' or 'euc' (case-insensitive)"
21
- fails "Regexp.new given a String ignores the third argument if it is 's' or 'sjis' (case-insensitive)"
22
- fails "Regexp.new given a String ignores the third argument if it is 'u' or 'utf8' (case-insensitive)"
23
- fails "Regexp.new given a String uses ASCII_8BIT encoding if third argument is 'n' or 'none' (case insensitive) and non-ascii characters"
24
- fails "Regexp.new given a String uses US_ASCII encoding if third argument is 'n' or 'none' (case insensitive) and only ascii characters"
25
- fails "Regexp.new given a String with escaped characters accepts \\u{HHHHHH} for a single Unicode codepoint"
26
- fails "Regexp.new given a String with escaped characters accepts \\u{HHHHH} for a single Unicode codepoint"
27
- fails "Regexp.new given a String with escaped characters accepts \\u{HHHH} followed by characters"
28
- fails "Regexp.new given a String with escaped characters accepts \\u{HHHH} for a single Unicode codepoint"
29
- fails "Regexp.new given a String with escaped characters accepts \\u{HHH} for a single Unicode codepoint"
30
- fails "Regexp.new given a String with escaped characters accepts \\u{HH} for a single Unicode codepoint"
31
- fails "Regexp.new given a String with escaped characters accepts \\u{H} for a single Unicode codepoint"
32
- fails "Regexp.new given a String with escaped characters accepts a combination of escaped octal and hexadecimal digits and \\u{HHHH}"
33
- fails "Regexp.new given a String with escaped characters accepts characters followed by \\u{HHHH}"
34
- fails "Regexp.new given a String with escaped characters accepts escaped hexadecimal digits followed by \\u{HHHH}"
35
- fails "Regexp.new given a String with escaped characters accepts escaped octal digits followed by \\u{HHHH}"
36
- fails "Regexp.new given a String with escaped characters raises a RegexpError if less than four digits are given for \\uHHHH"
37
- fails "Regexp.new given a String with escaped characters raises a RegexpError if the \\u{} escape is empty"
38
- fails "Regexp.new given a String with escaped characters returns a Regexp with US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present"
39
- fails "Regexp.new given a String with escaped characters returns a Regexp with US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding"
40
- fails "Regexp.new given a String with escaped characters returns a Regexp with UTF-8 encoding if any UTF-8 escape sequences outside 7-bit ASCII are present"
41
- fails "Regexp.new given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present"
42
- fails "Regexp.new given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding"
43
- fails "Regexp.new given a String with escaped characters returns a Regexp with source String having UTF-8 encoding if any UTF-8 escape sequences outside 7-bit ASCII are present"
44
- fails "Regexp.new given a String with escaped characters returns a Regexp with source String having the input String's encoding"
45
- fails "Regexp.new given a String with escaped characters returns a Regexp with the input String's encoding"
46
- fails "Regexp.quote sets the encoding of the result to ASCII-8BIT if any non-US-ASCII characters are present in an input String with invalid encoding"
47
- fails "Regexp.quote sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String"
48
- fails "Regexp.quote sets the encoding of the result to the encoding of the String if any non-US-ASCII characters are present in an input String with valid encoding"
49
- fails "Regexp.try_convert returns the argument if given a Regexp"
50
- fails "Regexp.union raises ArgumentError if the arguments include a String containing non-ASCII-compatible characters and a fixed encoding Regexp in a different encoding"
51
- fails "Regexp.union raises ArgumentError if the arguments include a fixed encoding Regexp and a String containing non-ASCII-compatible characters in a different encoding"
52
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and a Regexp containing non-ASCII-compatible characters in a different encoding"
53
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and a String containing non-ASCII-compatible characters in a different encoding"
54
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and an ASCII-only Regexp"
55
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and an ASCII-only String"
56
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and a Regexp containing non-ASCII-compatible characters in a different encoding"
57
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and a String containing non-ASCII-compatible characters in a different encoding"
58
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and an ASCII-only Regexp"
59
- fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and an ASCII-only String"
60
- fails "Regexp.union raises ArgumentError if the arguments include conflicting ASCII-incompatible Regexps"
3
+ fails "Regexp#options does not include Regexp::FIXEDENCODING for a Regexp literal with the 'n' option" # NameError: uninitialized constant Regexp::FIXEDENCODING
4
+ fails "Regexp#options includes Regexp::FIXEDENCODING for a Regexp literal with the 'e' option" # NameError: uninitialized constant Regexp::FIXEDENCODING
5
+ fails "Regexp#options includes Regexp::FIXEDENCODING for a Regexp literal with the 's' option" # NameError: uninitialized constant Regexp::FIXEDENCODING
6
+ fails "Regexp#options includes Regexp::FIXEDENCODING for a Regexp literal with the 'u' option" # NameError: uninitialized constant Regexp::FIXEDENCODING
7
+ fails "Regexp#options includes Regexp::NOENCODING for a Regexp literal with the 'n' option" # NameError: uninitialized constant Regexp::NOENCODING
8
+ fails "Regexp.escape sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String" # ArgumentError: unknown encoding name - euc-jp
9
+ fails "Regexp.new given a String ignores the third argument if it is 'e' or 'euc' (case-insensitive)" # ArgumentError: [Regexp.new] wrong number of arguments (given 3, expected -2)
10
+ fails "Regexp.new given a String ignores the third argument if it is 's' or 'sjis' (case-insensitive)" # ArgumentError: [Regexp.new] wrong number of arguments (given 3, expected -2)
11
+ fails "Regexp.new given a String ignores the third argument if it is 'u' or 'utf8' (case-insensitive)" # ArgumentError: [Regexp.new] wrong number of arguments (given 3, expected -2)
12
+ fails "Regexp.new given a String uses ASCII_8BIT encoding if third argument is 'n' or 'none' (case insensitive) and non-ascii characters" # ArgumentError: [Regexp.new] wrong number of arguments (given 3, expected -2)
13
+ fails "Regexp.new given a String uses US_ASCII encoding if third argument is 'n' or 'none' (case insensitive) and only ascii characters" # ArgumentError: [Regexp.new] wrong number of arguments (given 3, expected -2)
14
+ fails "Regexp.new given a String with escaped characters raises a RegexpError if less than four digits are given for \\uHHHH" # Expected RegexpError but no exception was raised (/\u304/ was returned)
15
+ fails "Regexp.new given a String with escaped characters raises a RegexpError if the \\u{} escape is empty" # Expected RegexpError but no exception was raised (/\u{}/ was returned)
16
+ fails "Regexp.new given a String with escaped characters returns a Regexp with US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present" # NoMethodError: undefined method `encoding' for /a/
17
+ fails "Regexp.new given a String with escaped characters returns a Regexp with US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding" # NoMethodError: undefined method `encoding' for /abc/
18
+ fails "Regexp.new given a String with escaped characters returns a Regexp with UTF-8 encoding if any UTF-8 escape sequences outside 7-bit ASCII are present" # NoMethodError: undefined method `encoding' for /ÿ/
19
+ fails "Regexp.new given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
20
+ fails "Regexp.new given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
21
+ fails "Regexp.new given a String with escaped characters returns a Regexp with source String having the input String's encoding" # NameError: uninitialized constant Encoding::Shift_JIS
22
+ fails "Regexp.new given a String with escaped characters returns a Regexp with the input String's encoding" # NameError: uninitialized constant Encoding::Shift_JIS
23
+ fails "Regexp.quote sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String" # ArgumentError: unknown encoding name - euc-jp
24
+ fails "Regexp.union raises ArgumentError if the arguments include a String containing non-ASCII-compatible characters and a fixed encoding Regexp in a different encoding" # Expected ArgumentError but got: NameError (uninitialized constant Regexp::FIXEDENCODING)
25
+ fails "Regexp.union raises ArgumentError if the arguments include a fixed encoding Regexp and a String containing non-ASCII-compatible characters in a different encoding" # Expected ArgumentError but got: NameError (uninitialized constant Regexp::FIXEDENCODING)
26
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and a Regexp containing non-ASCII-compatible characters in a different encoding" # Expected ArgumentError but no exception was raised (/(a)|(©)/ was returned)
27
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and a String containing non-ASCII-compatible characters in a different encoding" # Expected ArgumentError but no exception was raised (/(a)|©/ was returned)
28
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and an ASCII-only Regexp" # Expected ArgumentError but no exception was raised (/(a)|(b)/ was returned)
29
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible Regexp and an ASCII-only String" # Expected ArgumentError but no exception was raised (/(a)|b/ was returned)
30
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and a Regexp containing non-ASCII-compatible characters in a different encoding" # Expected ArgumentError but no exception was raised (/a|(©)/ was returned)
31
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and a String containing non-ASCII-compatible characters in a different encoding" # Expected ArgumentError but no exception was raised (/a|©/ was returned)
32
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and an ASCII-only Regexp" # Expected ArgumentError but no exception was raised (/a|(b)/ was returned)
33
+ fails "Regexp.union raises ArgumentError if the arguments include an ASCII-incompatible String and an ASCII-only String" # Expected ArgumentError but no exception was raised (/a|b/ was returned)
34
+ fails "Regexp.union raises ArgumentError if the arguments include conflicting ASCII-incompatible Regexps" # Expected ArgumentError but no exception was raised (/(a)|(b)/ was returned)
61
35
  fails "Regexp.union raises ArgumentError if the arguments include conflicting ASCII-incompatible Strings" # Expected ArgumentError but no exception was raised (/a|b/ was returned)
62
- fails "Regexp.union raises ArgumentError if the arguments include conflicting fixed encoding Regexps"
63
- fails "Regexp.union returns a Regexp with US-ASCII encoding if all arguments are ASCII-only"
64
- fails "Regexp.union returns a Regexp with UTF-8 if one part is UTF-8"
65
- fails "Regexp.union returns a Regexp with the encoding of a String containing non-ASCII-compatible characters and another ASCII-only String"
66
- fails "Regexp.union returns a Regexp with the encoding of a String containing non-ASCII-compatible characters"
67
- fails "Regexp.union returns a Regexp with the encoding of an ASCII-incompatible String argument"
68
- fails "Regexp.union returns a Regexp with the encoding of multiple non-conflicting ASCII-incompatible String arguments"
69
- fails "Regexp.union returns a Regexp with the encoding of multiple non-conflicting Strings containing non-ASCII-compatible characters"
36
+ fails "Regexp.union raises ArgumentError if the arguments include conflicting fixed encoding Regexps" # Expected ArgumentError but got: NameError (uninitialized constant Regexp::FIXEDENCODING)
37
+ fails "Regexp.union returns a Regexp with US-ASCII encoding if all arguments are ASCII-only" # ArgumentError: unknown encoding name - SJIS
38
+ fails "Regexp.union returns a Regexp with UTF-8 if one part is UTF-8" # NoMethodError: undefined method `encoding' for /(probl[éeè]me)|(help)/i
39
+ fails "Regexp.union returns a Regexp with the encoding of a String containing non-ASCII-compatible characters and another ASCII-only String" # NoMethodError: undefined method `encoding' for /©|a/
40
+ fails "Regexp.union returns a Regexp with the encoding of a String containing non-ASCII-compatible characters" # NoMethodError: undefined method `encoding' for /©/
41
+ fails "Regexp.union returns a Regexp with the encoding of an ASCII-incompatible String argument" # NoMethodError: undefined method `encoding' for /a/
42
+ fails "Regexp.union returns a Regexp with the encoding of multiple non-conflicting ASCII-incompatible String arguments" # NoMethodError: undefined method `encoding' for /a|b/
43
+ fails "Regexp.union returns a Regexp with the encoding of multiple non-conflicting Strings containing non-ASCII-compatible characters" # NoMethodError: undefined method `encoding' for /©|°/
70
44
  end
@@ -1,5 +1,5 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Set" do
3
- fails "Set#eql? returns true when the passed argument is a Set and contains the same elements"
4
- fails "Set#initialize is private"
3
+ fails "Set#eql? returns true when the passed argument is a Set and contains the same elements" # Expected #<Set: {1,2,3}> not to have same value or type as #<Set: {1,2,3}>
4
+ fails "Set#initialize is private" # Expected Set to have private instance method 'initialize' but it does not
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Singleton" do
3
- fails "Singleton#_dump returns an empty string from a singleton subclass"
4
- fails "Singleton#_dump returns an empty string"
5
- fails "Singleton.allocate is a private method"
6
- fails "Singleton.new is a private method"
3
+ fails "Singleton#_dump returns an empty string from a singleton subclass" # NoMethodError: undefined method `_dump' for #<SingletonSpecs::MyClassChild:0x9dc>
4
+ fails "Singleton#_dump returns an empty string" # NoMethodError: undefined method `_dump' for #<SingletonSpecs::MyClass:0x794>
5
+ fails "Singleton.allocate is a private method" # Expected NoMethodError but no exception was raised (#<SingletonSpecs::MyClass:0x9b4> was returned)
6
+ fails "Singleton.new is a private method" # Expected NoMethodError but no exception was raised (#<SingletonSpecs::NewSpec:0xafbfc> was returned)
7
7
  end