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,105 +1,89 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Integer" do
3
- fails "Integer#% bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 to equal 9223372036854776000
3
+ fails "Integer#% bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 == 18446744073709552000 to be truthy but was false
4
4
  fails "Integer#& bignum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (0 was returned)
5
- fails "Integer#& bignum returns self bitwise AND other when both operands are negative" # Expected 0 to equal -13835058055282164000
6
- fails "Integer#& bignum returns self bitwise AND other when one operand is negative" # Expected 0 to equal 18446744073709552000
7
- fails "Integer#& bignum returns self bitwise AND other" # Expected 0 to equal 1
8
- fails "Integer#& fixnum returns self bitwise AND a bignum" # Expected 0 to equal 18446744073709552000
9
- fails "Integer#& fixnum returns self bitwise AND other" # Actually uses Bignums
10
- fails "Integer#* bignum returns self multiplied by the given Integer" # Expected 8.507059173023462e+37 to equal 8.507059173023463e+37
5
+ fails "Integer#& bignum returns self bitwise AND other when both operands are negative" # Expected 0 == -23058430092136940000 to be truthy but was false
6
+ fails "Integer#& bignum returns self bitwise AND other when one operand is negative" # Expected 0 == 36893488147419103000 to be truthy but was false
7
+ fails "Integer#& bignum returns self bitwise AND other" # Expected 0 == 1 to be truthy but was false
8
+ fails "Integer#& fixnum returns self bitwise AND a bignum" # Expected 0 == 18446744073709552000 to be truthy but was false
9
+ fails "Integer#& fixnum returns self bitwise AND other" # Expected 0 == 65535 to be truthy but was false
11
10
  fails "Integer#** fixnum can raise -1 to a bignum safely" # Expected 1 to have same value and type as -1
12
- fails "Integer#- bignum returns self minus the given Integer" # Expected 0 to equal 272
11
+ fails "Integer#- bignum returns self minus the given Integer" # Expected 0 == 272 to be truthy but was false
13
12
  fails "Integer#/ bignum raises a ZeroDivisionError if other is zero and not a Float" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
14
- fails "Integer#/ bignum returns self divided by other" # Expected 10000000000 to equal 9999999999
15
- fails "Integer#< bignum returns true if self is less than the given argument" # Expected false to equal true
16
- fails "Integer#<< (with n << m) bignum calls #to_int to convert the argument to an Integer" # Expected 0 to equal 2.3611832414348226e+21
17
- fails "Integer#<< (with n << m) bignum returns n shifted left m bits when n < 0, m > 0" # Expected 0 to equal -7.555786372591432e+22
18
- fails "Integer#<< (with n << m) bignum returns n shifted left m bits when n > 0, m > 0" # Expected 0 to equal 2.3611832414348226e+21
19
- fails "Integer#<< (with n << m) bignum returns n shifted right m bits when n < 0, m < 0" # Expected 0 to equal -36893488147419103000
20
- fails "Integer#<< (with n << m) bignum returns n shifted right m bits when n > 0, m < 0" # Expected 0 to equal 73786976294838210000
21
- fails "Integer#<< (with n << m) bignum returns n when n < 0, m == 0" # Expected 0 to equal -147573952589676410000
22
- fails "Integer#<< (with n << m) bignum returns n when n > 0, m == 0" # Expected 0 to equal 147573952589676410000
23
- fails "Integer#<< (with n << m) fixnum returns 0 when m < 0 and m is a Bignum" # Expected 3 to equal 0
24
- fails "Integer#<< (with n << m) fixnum returns an Bignum == fixnum_max * 2 when fixnum_max << 1 and n > 0" # Expected 2147483646 (Number) to be an instance of Bignum
25
- fails "Integer#<< (with n << m) fixnum returns an Bignum == fixnum_min * 2 when fixnum_min << 1 and n < 0" # Expected -2147483648 (Number) to be an instance of Bignum
26
- fails "Integer#<= bignum returns false if compares with near float" # Expected true to equal false
27
- fails "Integer#<=> bignum returns -1 when self is -Infinity and other is negative" # Expected 0 == -1
28
- fails "Integer#<=> bignum returns 1 when self is Infinity and other is a Bignum" # Expected 0 == 1
29
- fails "Integer#<=> bignum returns 1 when self is negative and other is -Infinity" # Expected 0 == 1
30
- fails "Integer#<=> bignum with a Bignum when other is negative returns -1 when self is negative and other is larger" # Expected 0 to equal -1
31
- fails "Integer#<=> bignum with a Bignum when other is negative returns 1 when self is negative and other is smaller" # Expected 0 to equal 1
32
- fails "Integer#<=> bignum with a Bignum when other is positive returns -1 when self is positive and other is larger" # Expected 0 to equal -1
33
- fails "Integer#<=> bignum with a Bignum when other is positive returns 1 when other is smaller" # Expected 0 to equal 1
34
- fails "Integer#<=> bignum with an Object returns -1 if the coerced value is larger" # Expected 0 to equal -1
13
+ fails "Integer#/ bignum returns self divided by other" # Expected 10000000000 == 9999999999 to be truthy but was false
14
+ fails "Integer#< bignum returns true if self is less than the given argument" # Expected false == true to be truthy but was false
15
+ fails "Integer#<< (with n << m) bignum calls #to_int to convert the argument to an Integer" # Expected 0 == 2.3611832414348226e+21 to be truthy but was false
16
+ fails "Integer#<< (with n << m) bignum returns n shifted left m bits when n < 0, m > 0" # Expected 0 == -7.555786372591432e+22 to be truthy but was false
17
+ fails "Integer#<< (with n << m) bignum returns n shifted left m bits when n > 0, m > 0" # Expected 0 == 2.3611832414348226e+21 to be truthy but was false
18
+ fails "Integer#<< (with n << m) bignum returns n shifted right m bits when n < 0, m < 0" # Expected 0 == -36893488147419103000 to be truthy but was false
19
+ fails "Integer#<< (with n << m) bignum returns n shifted right m bits when n > 0, m < 0" # Expected 0 == 73786976294838210000 to be truthy but was false
20
+ fails "Integer#<< (with n << m) bignum returns n when n < 0, m == 0" # Expected 0 == -147573952589676410000 to be truthy but was false
21
+ fails "Integer#<< (with n << m) bignum returns n when n > 0, m == 0" # Expected 0 == 147573952589676410000 to be truthy but was false
22
+ fails "Integer#<< (with n << m) fixnum returns 0 when m < 0 and m is a Bignum" # Expected 3 == 0 to be truthy but was false
23
+ fails "Integer#<= bignum returns false if compares with near float" # Expected true == false to be truthy but was false
24
+ fails "Integer#<=> bignum returns -1 when self is -Infinity and other is negative" # Expected 0 == -1 to be truthy but was false
25
+ fails "Integer#<=> bignum returns 1 when self is Infinity and other is a Bignum" # Expected 0 == 1 to be truthy but was false
26
+ fails "Integer#<=> bignum returns 1 when self is negative and other is -Infinity" # Expected 0 == 1 to be truthy but was false
27
+ fails "Integer#<=> bignum with a Bignum when other is negative returns -1 when self is negative and other is larger" # Expected 0 == -1 to be truthy but was false
28
+ fails "Integer#<=> bignum with a Bignum when other is negative returns 1 when self is negative and other is smaller" # Expected 0 == 1 to be truthy but was false
29
+ fails "Integer#<=> bignum with a Bignum when other is positive returns -1 when self is positive and other is larger" # Expected 0 == -1 to be truthy but was false
30
+ fails "Integer#<=> bignum with a Bignum when other is positive returns 1 when other is smaller" # Expected 0 == 1 to be truthy but was false
31
+ fails "Integer#<=> bignum with an Object returns -1 if the coerced value is larger" # Expected 0 == -1 to be truthy but was false
35
32
  fails "Integer#<=> bignum with an Object returns nil if #coerce does not return an Array" # Expected 0 to be nil
36
- fails "Integer#== bignum returns the result of 'other == self' as a boolean" # Expected "woot" to equal true
37
- fails "Integer#== bignum returns true if self has the same value as the given argument" # Expected true to equal false
38
- fails "Integer#=== bignum returns the result of 'other == self' as a boolean" # Expected "woot" to equal true
39
- fails "Integer#=== bignum returns true if self has the same value as the given argument" # Expected true to equal false
40
- fails "Integer#> bignum returns true if self is greater than the given argument" # Expected false to equal true
41
- fails "Integer#>= bignum returns true if self is greater than or equal to other" # Expected true to equal false
42
- fails "Integer#>> (with n >> m) bignum calls #to_int to convert the argument to an Integer" # Expected 0 to equal 36893488147419103000
43
- fails "Integer#>> (with n >> m) bignum respects twos complement signed shifting for very large values" # Expected 0 to equal 2.2204460502842888e+66
44
- fails "Integer#>> (with n >> m) bignum respects twos complement signed shifting" # Expected 101376 to equal -2621440001220703000
45
- fails "Integer#>> (with n >> m) bignum returns n shifted left m bits when n < 0, m < 0" # Expected 0 to equal -1.1805916207174113e+21
46
- fails "Integer#>> (with n >> m) bignum returns n shifted left m bits when n > 0, m < 0" # Expected 0 to equal 590295810358705700000
47
- fails "Integer#>> (with n >> m) bignum returns n shifted right m bits when n < 0, m > 0" # Expected 0 to equal -36893488147419103000
48
- fails "Integer#>> (with n >> m) bignum returns n shifted right m bits when n > 0, m > 0" # Expected 0 to equal 73786976294838210000
49
- fails "Integer#>> (with n >> m) bignum returns n when n < 0, m == 0" # Expected 0 to equal -147573952589676410000
50
- fails "Integer#>> (with n >> m) bignum returns n when n > 0, m == 0" # Expected 0 to equal 147573952589676410000
51
- fails "Integer#>> (with n >> m) fixnum returns 0 when m is a bignum" # Expected 3 to equal 0
52
- fails "Integer#>> (with n >> m) fixnum returns an Bignum == fixnum_max * 2 when fixnum_max >> -1 and n > 0" # NameError: uninitialized constant Bignum
53
- fails "Integer#>> (with n >> m) fixnum returns an Bignum == fixnum_min * 2 when fixnum_min >> -1 and n < 0" # NameError: uninitialized constant Bignum
54
- fails "Integer#[] bignum returns the nth bit in the binary representation of self" # Expected 0 to equal 1
55
- fails "Integer#[] bignum tries to convert the given argument to an Integer using #to_int" # Expected 0 to equal 1
33
+ fails "Integer#== bignum returns the result of 'other == self' as a boolean" # Expected "woot" == true to be truthy but was false
34
+ fails "Integer#== bignum returns true if self has the same value as the given argument" # Expected true == false to be truthy but was false
35
+ fails "Integer#=== bignum returns the result of 'other == self' as a boolean" # Expected "woot" == true to be truthy but was false
36
+ fails "Integer#=== bignum returns true if self has the same value as the given argument" # Expected true == false to be truthy but was false
37
+ fails "Integer#> bignum returns true if self is greater than the given argument" # Expected false == true to be truthy but was false
38
+ fails "Integer#>= bignum returns true if self is greater than or equal to other" # Expected true == false to be truthy but was false
39
+ fails "Integer#>> (with n >> m) bignum calls #to_int to convert the argument to an Integer" # Expected 0 == 36893488147419103000 to be truthy but was false
40
+ fails "Integer#>> (with n >> m) bignum respects twos complement signed shifting for very large values" # Expected 0 == 2.2204460502842888e+66 to be truthy but was false
41
+ fails "Integer#>> (with n >> m) bignum respects twos complement signed shifting" # Expected 101376 == -2621440001220703000 to be truthy but was false
42
+ fails "Integer#>> (with n >> m) bignum returns n shifted left m bits when n < 0, m < 0" # Expected 0 == -1.1805916207174113e+21 to be truthy but was false
43
+ fails "Integer#>> (with n >> m) bignum returns n shifted left m bits when n > 0, m < 0" # Expected 0 == 590295810358705700000 to be truthy but was false
44
+ fails "Integer#>> (with n >> m) bignum returns n shifted right m bits when n < 0, m > 0" # Expected 0 == -36893488147419103000 to be truthy but was false
45
+ fails "Integer#>> (with n >> m) bignum returns n shifted right m bits when n > 0, m > 0" # Expected 0 == 73786976294838210000 to be truthy but was false
46
+ fails "Integer#>> (with n >> m) bignum returns n when n < 0, m == 0" # Expected 0 == -147573952589676410000 to be truthy but was false
47
+ fails "Integer#>> (with n >> m) bignum returns n when n > 0, m == 0" # Expected 0 == 147573952589676410000 to be truthy but was false
48
+ fails "Integer#[] bignum returns the nth bit in the binary representation of self" # Expected 0 == 1 to be truthy but was false
49
+ fails "Integer#[] bignum tries to convert the given argument to an Integer using #to_int" # Expected 0 == 1 to be truthy but was false
56
50
  fails "Integer#^ bignum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (14 was returned)
57
- fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when all bits are 1 and other value is negative" # Expected -1 to equal -9.903520314283042e+27
58
- fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when both operands are negative" # Expected 0 to equal 64563604257983430000
59
- fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when one operand is negative" # Expected 0 to equal -64563604257983430000
60
- fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other" # Expected 2 to equal 9223372036854776000
61
- fails "Integer#^ fixnum returns self bitwise EXCLUSIVE OR a bignum" # Expected -1 to equal -18446744073709552000
51
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when all bits are 1 and other value is negative" # Expected -1 == -9.903520314283042e+27 to be truthy but was false
52
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when both operands are negative" # Expected 0 == 55340232221128655000 to be truthy but was false
53
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when one operand is negative" # Expected 0 == -55340232221128655000 to be truthy but was false
54
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other" # Expected 2 == 18446744073709552000 to be truthy but was false
55
+ fails "Integer#^ fixnum returns self bitwise EXCLUSIVE OR a bignum" # Expected -1 == -18446744073709552000 to be truthy but was false
62
56
  fails "Integer#bit_length bignum returns the position of the leftmost 0 bit of a negative number" # NoMethodError: undefined method `bit_length` for -Infinity:Float
63
- fails "Integer#bit_length bignum returns the position of the leftmost bit of a positive number" # Expected 1 to equal 1000
64
- fails "Integer#coerce bignum coerces other to a Bignum and returns [other, self] when passed a Fixnum" # NameError: uninitialized constant Bignum
65
- fails "Integer#coerce bignum raises a TypeError when not passed a Fixnum or Bignum" # ArgumentError: invalid value for Float(): "test"
66
- fails "Integer#coerce bignum returns [other, self] when passed a Bignum" # NameError: uninitialized constant Bignum
67
- fails "Integer#div bignum calls #coerce and #div if argument responds to #coerce" # Mock 'x' expected to receive div(main) exactly 1 times but received it 0 times
68
- fails "Integer#div bignum looses precision if passed Float argument" # Expected 9223372036854776000 not to equal 9223372036854776000
69
- fails "Integer#div bignum returns self divided by other" # Expected 10000000000 to equal 9999999999
70
- fails "Integer#divmod bignum raises a TypeError when the given argument is not an Integer" # NoMethodError: undefined method `nan?' for main
71
- fails "Integer#divmod bignum returns an Array containing quotient and modulus obtained from dividing self by the given argument" # Expected [2305843009213694000, 0] to equal [2305843009213694000, 3]
72
- fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a < 0, b < 0 and |a| < |b|" # Expected [1, 0] to equal [0, -9223372036854776000]
73
- fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a < 0, b > 0 and |a| < b" # Expected [-1, 0] to equal [-1, 1]
74
- fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a > 0, b < 0 and a < |b|" # Expected [-1, 0] to equal [-1, -1]
75
- fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a > 0, b < 0 and a > |b|" # Expected [-1, 0] to equal [-2, -9223372036854776000]
57
+ fails "Integer#bit_length bignum returns the position of the leftmost bit of a positive number" # Expected 1 == 1000 to be truthy but was false
58
+ fails "Integer#coerce bignum raises a TypeError when not passed a Fixnum or Bignum" # Expected TypeError but got: ArgumentError (invalid value for Float(): "test")
59
+ fails "Integer#div bignum calls #coerce and #div if argument responds to #coerce" # Mock 'x' expected to receive div(#<MockObject:0x4098c @name="y" @null=nil>) exactly 1 times but received it 0 times
60
+ fails "Integer#div bignum looses precision if passed Float argument" # Expected 18446744073709552000 == 18446744073709552000 to be falsy but was true
61
+ fails "Integer#div bignum returns self divided by other" # Expected 10000000000 == 9999999999 to be truthy but was false
62
+ fails "Integer#divmod bignum raises a TypeError when the given argument is not an Integer" # Expected TypeError but got: NoMethodError (undefined method `nan?' for #<MockObject:0x438bc @name="10" @null=nil>)
63
+ fails "Integer#divmod bignum returns an Array containing quotient and modulus obtained from dividing self by the given argument" # Expected [4611686018427388000, 0] == [4611686018427388000, 3] to be truthy but was false
64
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a < 0, b < 0 and |a| < |b|" # Expected [1, -0.0] == [0, -18446744073709552000] to be truthy but was false
65
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a < 0, b > 0 and |a| < b" # Expected [-1, 0] == [-1, 1] to be truthy but was false
66
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a > 0, b < 0 and a < |b|" # Expected [-1, -0.0] == [-1, -1] to be truthy but was false
67
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a > 0, b < 0 and a > |b|" # Expected [-1, -0.0] == [-2, -18446744073709552000] to be truthy but was false
76
68
  fails "Integer#even? fixnum returns true for a Bignum when it is an even number" # Expected true to be false
77
- fails "Integer#even? returns true for a Bignum when it is an even number"
78
- fails "Integer#modulo bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 to equal 9223372036854776000
69
+ fails "Integer#modulo bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 == 18446744073709552000 to be truthy but was false
79
70
  fails "Integer#odd? bignum returns false if self is even and negative" # Expected true to be false
80
71
  fails "Integer#odd? bignum returns true if self is odd and positive" # Expected false to be true
81
- fails "Integer#pow one argument is passed bignum raises a TypeError when given a non-Integer" # NoMethodError: undefined method `pow' for 9223372036854776000
82
- fails "Integer#pow one argument is passed bignum returns a complex number when negative and raised to a fractional power" # NoMethodError: undefined method `pow' for -9223372036854776000
83
- fails "Integer#pow one argument is passed bignum returns self raised to other power" # NoMethodError: undefined method `pow' for 9223372036854776000
84
- fails "Integer#pow one argument is passed bignum switch to a Float when the values is too big" # NoMethodError: undefined method `pow' for 9223372036854776000
85
- fails "Integer#pow one argument is passed fixnum can raise -1 to a bignum safely" # NoMethodError: undefined method `pow' for -1
86
- fails "Integer#pow one argument is passed fixnum can raise 1 to a bignum safely" # NoMethodError: undefined method `pow' for 1
87
- fails "Integer#pow one argument is passed fixnum overflows the answer to a bignum transparently" # NoMethodError: undefined method `pow' for 2
88
- fails "Integer#pow one argument is passed fixnum returns Float::INFINITY for 0 ** -1.0" # Depends on the difference between Integer and Float
89
- fails "Integer#pow two arguments are passed ensures all arguments are integers" # Depends on the difference between Integer and Float
90
- fails "Integer#pow two arguments are passed works well with bignums" # NoMethodError: undefined method `pow' for 2
91
- fails "Integer#remainder bignum does raises ZeroDivisionError if other is zero and a Float" # NoMethodError: undefined method `remainder' for 9223372036854776000
92
- fails "Integer#remainder bignum raises a ZeroDivisionError if other is zero and not a Float" # NoMethodError: undefined method `remainder' for 9223372036854776000
93
- fails "Integer#remainder bignum returns the remainder of dividing self by other" # NoMethodError: undefined method `remainder' for 9223372036854776000
94
- fails "Integer#size bignum returns the number of bytes required to hold the unsigned bignum data" # Expected 4 to equal 8
72
+ fails "Integer#pow one argument is passed bignum switch to a Float when the values is too big" # Expected warning to match: /warning: in a\*\*b, b may be too big/ but got: ""
73
+ fails "Integer#pow one argument is passed fixnum can raise -1 to a bignum safely" # Expected 1 to have same value and type as -1
74
+ fails "Integer#pow one argument is passed fixnum returns Float::INFINITY for 0 ** -1.0" # ZeroDivisionError: divided by 0
75
+ fails "Integer#pow two arguments are passed ensures all arguments are integers" # Expected TypeError (/2nd argument not allowed unless all arguments are integers/) but no exception was raised (8 was returned)
76
+ fails "Integer#remainder bignum does raises ZeroDivisionError if other is zero and a Float" # Expected ZeroDivisionError but no exception was raised (NaN was returned)
77
+ fails "Integer#remainder bignum raises a ZeroDivisionError if other is zero and not a Float" # Expected ZeroDivisionError but no exception was raised (NaN was returned)
78
+ fails "Integer#remainder bignum returns the remainder of dividing self by other" # Expected 0 == 1 to be truthy but was false
79
+ fails "Integer#size bignum returns the number of bytes required to hold the unsigned bignum data" # Expected 4 == 8 to be truthy but was false
95
80
  fails "Integer#| bignum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (9 was returned)
96
- fails "Integer#| bignum returns self bitwise OR other when both operands are negative" # Expected 0 to equal -1
97
- fails "Integer#| bignum returns self bitwise OR other when one operand is negative" # Expected 0 to equal -64563604257983430000
98
- fails "Integer#| bignum returns self bitwise OR other" # Expected 2 to equal 9223372036854776000
99
- fails "Integer#~ bignum returns self with each bit flipped" # Expected -1 to equal -9223372036854776000
81
+ fails "Integer#| bignum returns self bitwise OR other when both operands are negative" # Expected 0 == -1 to be truthy but was false
82
+ fails "Integer#| bignum returns self bitwise OR other when one operand is negative" # Expected 0 == -55340232221128655000 to be truthy but was false
83
+ fails "Integer#| bignum returns self bitwise OR other" # Expected 2 == 18446744073709552000 to be truthy but was false
84
+ fails "Integer#~ bignum returns self with each bit flipped" # Expected -1 == -18446744073709552000 to be truthy but was false
100
85
  fails "Numeric#quo raises a ZeroDivisionError if the given argument is zero and not a Float" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
101
- fails "String#to_r does not treat a leading period without a numeric prefix as a decimal point" # Expected (8106479329266893/9007199254740992) not to equal (8106479329266893/9007199254740992)
102
- fails "String#to_r ignores underscores between numbers" # Expected (-5228919960423629/274877906944) to equal (-190227/10)
103
- fails "String#to_r understands a forward slash as separating the numerator from the denominator" # Expected (-896028675862255/140737488355328) to equal (-191/30)
104
- fails "String#to_r understands decimal points" # Expected (1874623344892969/562949953421312) to equal (333/100)
86
+ fails "String#to_r ignores underscores between numbers" # Expected (-5228919960423629/274877906944) == (-190227/10) to be truthy but was false
87
+ fails "String#to_r understands a forward slash as separating the numerator from the denominator" # Expected (-896028675862255/140737488355328) == (-191/30) to be truthy but was false
88
+ fails "String#to_r understands decimal points" # Expected (1874623344892969/562949953421312) == (333/100) to be truthy but was false
105
89
  end
@@ -1,46 +1,28 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Kernel" do
3
- fails "Kernel has private instance method Array()"
4
- fails "Kernel has private instance method Hash()"
5
- fails "Kernel#Float is a private method"
6
- fails "Kernel#Float raises a TypeError if #to_f returns an Integer"
7
- fails "Kernel#Integer calls to_i on Rationals"
8
- fails "Kernel#Integer is a private method"
9
- fails "Kernel#Integer returns a Fixnum or Bignum object"
10
- fails "Kernel#String is a private method"
3
+ fails "Kernel has private instance method Array()" # Expected Kernel to have private instance method 'Array' but it does not
4
+ fails "Kernel has private instance method Hash()" # Expected Kernel to have private instance method 'Hash' but it does not
5
+ fails "Kernel#Float is a private method" # Expected Kernel to have private instance method 'Float' but it does not
6
+ fails "Kernel#Float raises a TypeError if #to_f returns an Integer" # Expected TypeError but no exception was raised (123 was returned)
7
+ fails "Kernel#Integer is a private method" # Expected Kernel to have private instance method 'Integer' but it does not
8
+ fails "Kernel#String is a private method" # Expected Kernel to have private instance method 'String' but it does not
11
9
  fails "Kernel#class returns the first non-singleton class" # TypeError: can't define singleton
12
- fails "Kernel#clone preserves tainted state from the original"
13
- fails "Kernel#clone preserves untrusted state from the original"
14
- fails "Kernel#clone raises a TypeError for Symbol"
15
- fails "Kernel#dup preserves tainted state from the original"
16
- fails "Kernel#dup preserves untrusted state from the original"
17
- fails "Kernel#dup raises a TypeError for Symbol"
18
- fails "Kernel#eql? is a public instance method"
19
- fails "Kernel#fail is a private method"
20
- fails "Kernel#format is a private method"
21
- fails "Kernel#initialize_clone returns the receiver" # Expected nil == #<Object:0x63440> to be truthy but was false
22
- fails "Kernel#initialize_dup returns the receiver" # Expected nil == #<Object:0x4c314> to be truthy but was false
23
- fails "Kernel#inspect returns an untrusted string if self is untrusted"
24
- fails "Kernel#raise is a private method"
25
- fails "Kernel#sleep accepts a Rational"
26
- fails "Kernel#sleep is a private method"
27
- fails "Kernel#sleep pauses execution indefinitely if not given a duration"
28
- fails "Kernel#sprintf is a private method"
29
- fails "Kernel#to_s returns a tainted result if self is tainted"
30
- fails "Kernel#to_s returns an untrusted result if self is untrusted"
10
+ fails "Kernel#eql? is a public instance method" # Expected Kernel to have public instance method 'eql?' but it does not
11
+ fails "Kernel#fail is a private method" # Expected Kernel to have private instance method 'fail' but it does not
12
+ fails "Kernel#format is a private method" # Expected Kernel to have private instance method 'format' but it does not
13
+ fails "Kernel#initialize_dup returns the receiver" # Expected nil == #<Object:0x6a424> to be truthy but was false
14
+ fails "Kernel#raise is a private method" # Expected Kernel to have private instance method 'raise' but it does not
15
+ fails "Kernel#sleep accepts a Rational" # TypeError: can't convert Rational into time interval
16
+ fails "Kernel#sleep is a private method" # Expected Kernel to have private instance method 'sleep' but it does not
17
+ fails "Kernel#sleep pauses execution indefinitely if not given a duration" # NotImplementedError: Thread creation not available
31
18
  fails "Kernel#warn calls Warning.warn with category: nil if Warning.warn accepts keyword arguments" # NameError: uninitialized constant Warning
32
19
  fails "Kernel#warn calls Warning.warn with given category keyword converted to a symbol" # NameError: uninitialized constant Warning
33
20
  fails "Kernel#warn calls Warning.warn without keyword arguments if Warning.warn does not accept keyword arguments" # NameError: uninitialized constant Warning
34
- fails "Kernel#warn is a private method"
35
- fails "Kernel.Float raises a TypeError if #to_f returns an Integer"
36
- fails "Kernel.Integer calls to_i on Rationals"
37
- fails "Kernel.Integer returns a Fixnum or Bignum object"
38
- fails "Kernel.fail is a private method"
21
+ fails "Kernel#warn is a private method" # Expected Kernel to have private instance method 'warn' but it does not
22
+ fails "Kernel.Float raises a TypeError if #to_f returns an Integer" # Expected TypeError but no exception was raised (123 was returned)
39
23
  fails "Kernel.lambda when called without a literal block warns when proc isn't a lambda" # Expected warning: "ruby/core/kernel/lambda_spec.rb:142: warning: lambda without a literal block is deprecated; use the proc without lambda instead\n" but got: ""
40
24
  fails "Kernel.printf formatting io is specified other formats s formats nil with width and precision" # Exception: format_string.indexOf is not a function
41
- fails "Kernel.printf formatting io is specified other formats s formats nli with precision" # Exception: format_string.indexOf is not a function
42
- fails "Kernel.printf formatting io is specified other formats s formats nli with width" # Exception: format_string.indexOf is not a function
43
25
  fails "Kernel.printf formatting io is specified other formats s formats string with width and precision" # Exception: format_string.indexOf is not a function
44
26
  fails "Kernel.printf formatting io is specified other formats s formats string with width" # Exception: format_string.indexOf is not a function
45
- fails "Kernel.printf formatting io is specified other formats s substitutes '' for nil" # Exception: format_string.indexOf is not a function
27
+ fails "Kernel.printf formatting io is specified other formats s substitutes '' for nil" # Exception: format_string.indexOf is not a function
46
28
  end
@@ -1,25 +1,17 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "language" do
3
- fails "Magic comment can be after the shebang"
4
- fails "Magic comment can take Emacs style"
5
- fails "Magic comment can take vim style"
6
- fails "Magic comment determines __ENCODING__"
7
- fails "Magic comment is case-insensitive"
8
- fails "Magic comment must be at the first line"
9
- fails "Magic comment must be the first token of the line"
10
- fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if the other file doesn't have the comment"
11
- fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if they have different encodings"
12
- fails "Ruby String literals with a magic frozen comment produce the same object each time"
13
- fails "Ruby String literals with a magic frozen comment produce the same object for literals with the same content in different files"
14
- fails "Ruby String literals with a magic frozen comment produce the same object for literals with the same content"
15
- fails "The defined? keyword for pseudo-variables returns 'expression' for __ENCODING__"
16
- fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private"
17
- fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is protected"
18
- fails "The private keyword changes the visibility of the existing method in the subclass"
19
- fails "The private keyword changes visibility of previously called method"
3
+ fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if the other file doesn't have the comment" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x14b20 @ip="xxx" @my_ip="xxx">
4
+ fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if they have different encodings" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x14b20 @ip="xxx" @my_ip="xxx">
5
+ fails "Ruby String literals with a magic frozen comment produce the same object each time" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x14b20 @ip="xxx" @my_ip="xxx">
6
+ fails "Ruby String literals with a magic frozen comment produce the same object for literals with the same content in different files" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x14b20 @ip="xxx" @my_ip="xxx">
7
+ fails "Ruby String literals with a magic frozen comment produce the same object for literals with the same content" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x14b20 @ip="xxx" @my_ip="xxx">
8
+ fails "The defined? keyword for pseudo-variables returns 'expression' for __ENCODING__" # Expected "constant" == "expression" to be truthy but was false
9
+ fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private" # Expected "method" to be nil
10
+ fails "The private keyword changes the visibility of the existing method in the subclass" # Expected NoMethodError but no exception was raised ("foo" was returned)
11
+ fails "The private keyword changes visibility of previously called method" # Expected NoMethodError but no exception was raised ("foo" was returned)
20
12
  fails "The private keyword changes visibility of previously called methods with same send/call site" # Expected NoMethodError but no exception was raised (2 was returned)
21
- fails "The private keyword is overridden when a new class is opened"
22
- fails "The private keyword marks following methods as being private"
13
+ fails "The private keyword is overridden when a new class is opened" # Expected NoMethodError but no exception was raised (1 was returned)
14
+ fails "The private keyword marks following methods as being private" # Expected ["foo", "bar", "to_json", "guard", "guard_not", "with_feature", "without_feature", "new_fd", "new_io", "should", "should_not", "version_is", "ruby_version_is", "kernel_version_is", "suppress_warning", "suppress_keyword_warning", "should_receive", "should_not_receive", "stub!", "mock", "mock_int", "mock_numeric", "evaluate", "before", "after", "describe", "it", "it_should_behave_like", "context", "specify", "it_behaves_like", "ruby_bug", "conflicts_with", "big_endian", "little_endian", "platform_is", "platform_is_not", "quarantine!", "not_supported_on", "as_superuser", "as_real_superuser", "as_user", "argf", "argv", "new_datetime", "with_timezone", "fixture", "flunk", "cp", "mkdir_p", "rm_r", "touch", "mock_to_path", "nan_value", "infinity_value", "bignum_value", "max_long", "min_long", "fixnum_max", "fixnum_min", "ruby_exe_options", "resolve_ruby_exe", "ruby_exe", "ruby_cmd", "opal_filter", "opal_unsupported_filter", "frozen_error_class", "pack_format", "DelegateClass", "unpack_format", "be_close_to_matrix", "module_specs_public_method_on_object", "module_specs_private_method_on_object", "module_specs_protected_method_on_object", "module_specs_private_method_on_object_for_kernel_public", "module_specs_public_method_on_object_for_kernel_protected", "module_specs_public_method_on_object_for_kernel_private", "check_autoload", "example_instance_method_of_object", "expect", "eq", "pretty_print", "pretty_print_cycle", "pretty_print_instance_variables", "pretty_print_inspect", "=~", "!~", "===", "<=>", "method", "methods", "public_methods", "Array", "at_exit", "caller", "caller_locations", "class", "copy_instance_variables", "copy_singleton_methods", "clone", "initialize_clone", "define_singleton_method", "dup", "initialize_dup", "enum_for", "equal?", "exit", "extend", "freeze", "frozen?", "gets", "hash", "initialize_copy", "inspect", "instance_of?", "instance_variable_defined?", "instance_variable_get", "instance_variable_set", "remove_instance_variable", "instance_variables", "Integer", "Float", "Hash", "is_a?", "itself", "lambda", "load", "loop", "nil?", "printf", "proc", "puts", "p", "print", "readline", "warn", "raise", "rand", "respond_to?", "respond_to_missing?", "require", "require_relative", "require_tree", "singleton_class", "sleep", "srand", "String", "tap", "to_proc", "to_s", "catch", "throw", "open", "yield_self", "fail", "kind_of?", "object_id", "public_send", "send", "then", "to_enum", "format", "sprintf", "Complex", "Rational", "taint", "untaint", "tainted?", "private_methods", "protected_methods", "private_instance_methods", "protected_instance_methods", "eval", "binding", "Pathname", "require_remote", "pretty_inspect", "pp", "opal_parse", "eval_js", "BigDecimal", "module_specs_public_method_on_kernel", "module_specs_alias_on_kernel", "__send__", "__id__", "==", "!", "initialize", "eql?", "!=", "instance_eval", "instance_exec", "singleton_method_added", "singleton_method_removed", "singleton_method_undefined", "method_missing"] not to include "bar"
23
15
  fails "rescuing Interrupt raises an Interrupt when sent a signal SIGINT" # NoMethodError: undefined method `kill' for Process
24
16
  fails "rescuing SignalException raises a SignalException when sent a signal" # NoMethodError: undefined method `kill' for Process
25
17
  end
@@ -1,44 +1,25 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Marshal" do
3
- fails "Marshal.dump dumps subsequent appearances of a symbol as a link" # depends on Symbol-s
4
- fails "Marshal.dump raises a TypeError if dumping a IO/File instance"
5
- fails "Marshal.dump returns a tainted string if nested object is tainted"
6
- fails "Marshal.dump returns a tainted string if object is tainted"
7
- fails "Marshal.dump returns a trusted string if object is trusted"
8
- fails "Marshal.dump returns an untainted string if object is untainted"
9
- fails "Marshal.dump returns an untrusted string if nested object is untrusted"
10
- fails "Marshal.dump returns an untrusted string if object is untrusted"
11
- fails "Marshal.dump when passed an IO raises an Error when the IO-Object does not respond to #write"
12
- fails "Marshal.dump when passed an IO returns the IO-Object"
13
- fails "Marshal.dump when passed an IO writes the serialized data to the IO-Object"
14
- fails "Marshal.dump with a Float dumps a Float" # depends on the string mutating, replaced with test in spec/opal
15
- fails "Marshal.dump with a Regexp dumps a Regexp in another encoding"
16
- fails "Marshal.dump with a Regexp dumps a Regexp with flags" # depends on string encoding, replaced with test in spec/opal
17
- fails "Marshal.dump with a Regexp dumps a Regexp" # depends on utf-8 encoding which is not required, replaced with test in spec/opal
18
- fails "Marshal.dump with a Regexp dumps a UTF-8 Regexp"
19
- fails "Marshal.dump with a Regexp dumps a binary Regexp"
20
- fails "Marshal.dump with a Regexp dumps an extended Regexp" # depends on string encoding, replaced with test in spec/opal
21
- fails "Marshal.dump with a String dumps a String extended with a Module" # depends on string mutation
22
- fails "Marshal.dump with a String dumps a String with instance variables" # depends on string mutation
23
- fails "Marshal.dump with an object responding to #marshal_dump dumps the object returned by #marshal_dump" # depends on Symbol-s, replaced with test in spec/opal
24
- fails "Marshal.load for a Hash preserves hash ivars when hash contains a string having ivar" # depends on String#instance_variable_set
25
- fails "Marshal.load for a String loads a string having ivar with ref to self" # depends on string mutation
26
- fails "Marshal.load for a String loads a string through StringIO stream"
27
- fails "Marshal.load for a String loads a string with an ivar" # depends on string mutation
28
- fails "Marshal.load for a wrapped C pointer loads"
29
- fails "Marshal.load for a wrapped C pointer raises ArgumentError when the local class is a regular object"
30
- fails "Marshal.load for a wrapped C pointer raises TypeError when the local class is missing _load_data"
31
- fails "Marshal.load for an Array loads an array having ivar" # for some reason depends on String#instance_variable_set which is not supported. replaced with test in spec/opal
32
- fails "Marshal.load loads a Random" # depends on the reading from the filesystem
33
- fails "Marshal.load preserves taintedness of nested structure"
34
- fails "Marshal.load raises EOFError on loading an empty file"
35
- fails "Marshal.load raises a TypeError with bad Marshal version" # depends on String#[]=
36
- fails "Marshal.load returns a trusted object if source is trusted"
37
- fails "Marshal.load returns an untainted object if source is untainted"
38
- fails "Marshal.load returns an untrusted object if source is untrusted"
39
- fails "Marshal.load when source is tainted does not taint Bignums"
40
- fails "Marshal.load when source is tainted does not taint Fixnums"
41
- fails "Marshal.load when source is tainted does not taint Floats"
42
- fails "Marshal.load when source is tainted does not taint Symbols"
43
- fails "Marshal.load when source is tainted returns a tainted object"
3
+ fails "Marshal.dump dumps subsequent appearances of a symbol as a link" # Expected "\x04\b[\a\"\x06a@\x06" == "\x04\b[\a:\x06a;\x00" to be truthy but was false
4
+ fails "Marshal.dump raises a TypeError if dumping a IO/File instance" # Expected TypeError but got: Exception (Maximum call stack size exceeded)
5
+ fails "Marshal.dump when passed an IO raises an Error when the IO-Object does not respond to #write" # Expected TypeError but got: ArgumentError ([Marshal.dump] wrong number of arguments (given 2, expected 1))
6
+ fails "Marshal.dump when passed an IO returns the IO-Object" # ArgumentError: [Marshal.dump] wrong number of arguments (given 2, expected 1)
7
+ fails "Marshal.dump when passed an IO writes the serialized data to the IO-Object" # ArgumentError: [Marshal.dump] wrong number of arguments (given 2, expected 1)
8
+ fails "Marshal.dump with a Float dumps a Float" # Expected "\x04\bf\x060" to be computed by Marshal.dump from 0 (computed "\x04\bi\x00" instead)
9
+ fails "Marshal.dump with a Regexp dumps a Regexp in another encoding" # NameError: uninitialized constant Regexp::FIXEDENCODING
10
+ fails "Marshal.dump with a Regexp dumps a Regexp with flags" # Expected "\x04\b/\t(?:)\x00" == "\x04\bI/\x00\x05\x06:\x06EF" to be truthy but was false
11
+ fails "Marshal.dump with a Regexp dumps a Regexp" # Expected "\x04\b/\t^.\\Z\x00" == "\x04\bI/ \\A.\\Z\x00\x06:\x06EF" to be truthy but was false
12
+ fails "Marshal.dump with a Regexp dumps a UTF-8 Regexp" # NameError: uninitialized constant Regexp::FIXEDENCODING
13
+ fails "Marshal.dump with a Regexp dumps a binary Regexp" # NameError: uninitialized constant Regexp::FIXEDENCODING
14
+ fails "Marshal.dump with a Regexp dumps an extended Regexp" # Expected "\x04\be: Meths/\t(?:)\x00" == "\x04\bIe: Meths/\x00\x00\x06:\x06EF" to be truthy but was false
15
+ fails "Marshal.dump with a String dumps a String with instance variables" # Expected "\x04\b\"\x00" == "\x04\bI\"\x00\x06:\t@foo\"\bbar" to be truthy but was false
16
+ fails "Marshal.dump with an object responding to #marshal_dump dumps the object returned by #marshal_dump" # Expected "\x04\bU:\x10UserMarshal\"\tdata" == "\x04\bU:\x10UserMarshal:\tdata" to be truthy but was false
17
+ fails "Marshal.load for a Hash preserves hash ivars when hash contains a string having ivar" # Expected nil == "string ivar" to be truthy but was false
18
+ fails "Marshal.load for a String loads a string through StringIO stream" # TypeError: incompatible marshal file format (can't be read)
19
+ fails "Marshal.load for a wrapped C pointer loads" # NotImplementedError: Data type cannot be demarshaled
20
+ fails "Marshal.load for a wrapped C pointer raises ArgumentError when the local class is a regular object" # Expected ArgumentError but got: NotImplementedError (Data type cannot be demarshaled)
21
+ fails "Marshal.load for a wrapped C pointer raises TypeError when the local class is missing _load_data" # Expected TypeError but got: NotImplementedError (Data type cannot be demarshaled)
22
+ fails "Marshal.load loads a Random" # ArgumentError: marshal data too short
23
+ fails "Marshal.load raises EOFError on loading an empty file" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x444da @method="load" @object=nil @num_self_class=1 @data="\x04\bo:\x1ANamespaceTest::KaBoom\x00">
24
+ fails "Marshal.load raises a TypeError with bad Marshal version" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
44
25
  end
@@ -1,63 +1,39 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "MatchData" do
3
- fails "MatchData#[Symbol] raises an IndexError if there is no named match corresponding to the String"
4
- fails "MatchData#[Symbol] raises an IndexError if there is no named match corresponding to the Symbol"
5
- fails "MatchData#[Symbol] returns matches in the String's encoding"
6
- fails "MatchData#[Symbol] returns nil on non-matching named matches"
7
- fails "MatchData#[Symbol] returns the corresponding named match when given a String"
8
- fails "MatchData#[Symbol] returns the corresponding named match when given a Symbol"
9
- fails "MatchData#[Symbol] returns the last match when multiple named matches exist with the same name"
10
- fails "MatchData#[Symbol] returns the matching version of multiple corresponding named match"
11
- fails "MatchData#begin returns nil when the nth match isn't found"
12
- fails "MatchData#begin returns the offset for multi byte strings with unicode regexp"
13
- fails "MatchData#begin returns the offset for multi byte strings"
14
- fails "MatchData#begin returns the offset of the start of the nth element"
15
- fails "MatchData#begin when passed a String argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
16
- fails "MatchData#begin when passed a String argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
17
- fails "MatchData#begin when passed a String argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
18
- fails "MatchData#begin when passed a String argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
19
- fails "MatchData#begin when passed a Symbol argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
20
- fails "MatchData#begin when passed a Symbol argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
21
- fails "MatchData#begin when passed a Symbol argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
22
- fails "MatchData#begin when passed a Symbol argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
3
+ fails "MatchData#[Symbol] returns matches in the String's encoding" # ArgumentError: unknown encoding name - euc-jp
4
+ fails "MatchData#[Symbol] returns the last match when multiple named matches exist with the same name" # Exception: Invalid regular expression: /(?<word>hay)(?<word>stack)/: Duplicate capture group name
5
+ fails "MatchData#[Symbol] returns the matching version of multiple corresponding named match" # Exception: Invalid regular expression: /(?:A(?<word>\w+)|B(?<word>\w+))/: Duplicate capture group name
6
+ fails "MatchData#begin when passed a String argument return the character offset of the start of the named capture" # ArgumentError: MatchData#begin only supports 0th element
7
+ fails "MatchData#begin when passed a String argument returns the character offset for multi byte strings" # ArgumentError: MatchData#begin only supports 0th element
8
+ fails "MatchData#begin when passed a String argument returns the character offset for multi-byte names" # ArgumentError: MatchData#begin only supports 0th element
9
+ fails "MatchData#begin when passed a String argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: Invalid regular expression: /(?<a>.)(.)(?<a>\d+)(\d)/: Duplicate capture group name
10
+ fails "MatchData#begin when passed a Symbol argument return the character offset of the start of the named capture" # ArgumentError: MatchData#begin only supports 0th element
11
+ fails "MatchData#begin when passed a Symbol argument returns the character offset for multi byte strings" # ArgumentError: MatchData#begin only supports 0th element
12
+ fails "MatchData#begin when passed a Symbol argument returns the character offset for multi-byte names" # ArgumentError: MatchData#begin only supports 0th element
13
+ fails "MatchData#begin when passed a Symbol argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: Invalid regular expression: /(?<a>.)(.)(?<a>\d+)(\d)/: Duplicate capture group name
23
14
  fails "MatchData#begin when passed an integer argument returns nil when the nth match isn't found" # ArgumentError: MatchData#begin only supports 0th element
24
15
  fails "MatchData#begin when passed an integer argument returns the character offset for multi-byte strings" # ArgumentError: MatchData#begin only supports 0th element
25
16
  fails "MatchData#begin when passed an integer argument returns the character offset of the start of the nth element" # ArgumentError: MatchData#begin only supports 0th element
26
17
  fails "MatchData#begin when passed an integer argument tries to convert the passed argument to an Integer using #to_int" # ArgumentError: MatchData#begin only supports 0th element
27
- fails "MatchData#end returns nil when the nth match isn't found"
28
- fails "MatchData#end returns the offset for multi byte strings with unicode regexp"
29
- fails "MatchData#end returns the offset for multi byte strings"
30
- fails "MatchData#end returns the offset of the end of the nth element"
31
- fails "MatchData#end when passed a String argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
32
- fails "MatchData#end when passed a String argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
33
- fails "MatchData#end when passed a String argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
34
- fails "MatchData#end when passed a String argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
35
- fails "MatchData#end when passed a Symbol argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
36
- fails "MatchData#end when passed a Symbol argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
37
- fails "MatchData#end when passed a Symbol argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
38
- fails "MatchData#end when passed a Symbol argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
18
+ fails "MatchData#end when passed a String argument return the character offset of the start of the named capture" # ArgumentError: MatchData#end only supports 0th element
19
+ fails "MatchData#end when passed a String argument returns the character offset for multi byte strings" # ArgumentError: MatchData#end only supports 0th element
20
+ fails "MatchData#end when passed a String argument returns the character offset for multi-byte names" # ArgumentError: MatchData#end only supports 0th element
21
+ fails "MatchData#end when passed a String argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: Invalid regular expression: /(?<a>.)(.)(?<a>\d+)(\d)/: Duplicate capture group name
22
+ fails "MatchData#end when passed a Symbol argument return the character offset of the start of the named capture" # ArgumentError: MatchData#end only supports 0th element
23
+ fails "MatchData#end when passed a Symbol argument returns the character offset for multi byte strings" # ArgumentError: MatchData#end only supports 0th element
24
+ fails "MatchData#end when passed a Symbol argument returns the character offset for multi-byte names" # ArgumentError: MatchData#end only supports 0th element
25
+ fails "MatchData#end when passed a Symbol argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: Invalid regular expression: /(?<a>.)(.)(?<a>\d+)(\d)/: Duplicate capture group name
39
26
  fails "MatchData#end when passed an integer argument returns nil when the nth match isn't found" # ArgumentError: MatchData#end only supports 0th element
40
27
  fails "MatchData#end when passed an integer argument returns the character offset for multi-byte strings" # ArgumentError: MatchData#end only supports 0th element
41
28
  fails "MatchData#end when passed an integer argument returns the character offset of the end of the nth element" # ArgumentError: MatchData#end only supports 0th element
42
29
  fails "MatchData#end when passed an integer argument tries to convert the passed argument to an Integer using #to_int" # ArgumentError: MatchData#end only supports 0th element
43
- fails "MatchData#named_captures prefers later captures" # Exception: named captures are not supported in javascript: "^(?<a>.)(?<b>.)(?<b>.)(?<a>.)$"
44
- fails "MatchData#named_captures returns a Hash that has captured name and the matched string pairs" # Exception: named captures are not supported in javascript: "(?<a>.)(?<b>.)?"
45
- fails "MatchData#named_captures returns the latest matched capture, even if a later one that does not match exists" # Exception: named captures are not supported in javascript: "^(?<a>.)(?<b>.)(?<b>.)(?<a>.)?$"
46
- fails "MatchData#names equals Regexp#names"
47
- fails "MatchData#names returns [] if there were no named captures"
48
- fails "MatchData#names returns an Array"
49
- fails "MatchData#names returns each name only once"
50
- fails "MatchData#names returns the names of the named capture groups"
51
- fails "MatchData#names sets each element to a String"
52
- fails "MatchData#offset returns [nil, nil] when the nth match isn't found"
53
- fails "MatchData#offset returns a two element array with the begin and end of the nth match"
54
- fails "MatchData#offset returns the offset for multi byte strings with unicode regexp"
55
- fails "MatchData#offset returns the offset for multi byte strings"
56
- fails "MatchData#post_match keeps taint status from the source string"
57
- fails "MatchData#post_match keeps untrusted status from the source string"
58
- fails "MatchData#pre_match keeps taint status from the source string"
59
- fails "MatchData#pre_match keeps untrusted status from the source string"
60
- fails "MatchData#regexp returns the pattern used in the match"
61
- fails "MatchData#values_at slices captures with the given names" # Exception: named captures are not supported in javascript: "(?<a>.)(?<b>.)(?<c>.)"
62
- fails "MatchData#values_at takes names and indices" # Exception: named captures are not supported in javascript: "^(?<a>.)(?<b>.)$"
30
+ fails "MatchData#named_captures prefers later captures" # Exception: Invalid regular expression: /^(?<a>.)(?<b>.)(?<b>.)(?<a>.)$/: Duplicate capture group name
31
+ fails "MatchData#named_captures returns the latest matched capture, even if a later one that does not match exists" # Exception: Invalid regular expression: /^(?<a>.)(?<b>.)(?<b>.)(?<a>.)?$/: Duplicate capture group name
32
+ fails "MatchData#names equals Regexp#names" # Exception: Invalid regular expression: /(?<hay>hay)(?<dot>.)(?<hay>tack)/: Duplicate capture group name
33
+ fails "MatchData#names returns each name only once" # Exception: Invalid regular expression: /(?<hay>hay)(?<dot>.)(?<hay>tack)/: Duplicate capture group name
34
+ fails "MatchData#offset returns [nil, nil] when the nth match isn't found" # ArgumentError: MatchData#offset only supports 0th element
35
+ fails "MatchData#offset returns a two element array with the begin and end of the nth match" # ArgumentError: MatchData#offset only supports 0th element
36
+ fails "MatchData#offset returns the offset for multi byte strings" # ArgumentError: MatchData#offset only supports 0th element
37
+ fails "MatchData#values_at slices captures with the given names" # TypeError: no implicit conversion of String into Integer
38
+ fails "MatchData#values_at takes names and indices" # TypeError: no implicit conversion of String into Integer
63
39
  end
@@ -1,4 +1,4 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "Math" do
3
- fails "Math#atanh is a private instance method"
3
+ fails "Math#atanh is a private instance method" # Expected Math to have private instance method 'atanh' but it does not
4
4
  end