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,16 +1,16 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_filter "Enumerator" do
3
- fails "Enumerator#feed can be called for each iteration"
4
- fails "Enumerator#feed causes yield to return the value if called during iteration"
5
- fails "Enumerator#feed raises a TypeError if called more than once without advancing the enumerator"
6
- fails "Enumerator#feed returns nil"
7
- fails "Enumerator#feed sets the future return value of yield if called before advancing the iterator"
8
- fails "Enumerator#feed sets the return value of Yielder#yield"
9
- fails "Enumerator#initialize returns self when given a block"
10
- fails "Enumerator#initialize sets size to nil if size is not given"
11
- fails "Enumerator#initialize sets size to nil if the given size is nil"
12
- fails "Enumerator#initialize sets size to the given size if the given size is Float::INFINITY"
13
- fails "Enumerator#initialize sets size to the given size if the given size is a Proc"
3
+ fails "Enumerator#feed can be called for each iteration" # NotImplementedError: Opal doesn't support Enumerator#feed
4
+ fails "Enumerator#feed causes yield to return the value if called during iteration" # NotImplementedError: Opal doesn't support Enumerator#feed
5
+ fails "Enumerator#feed raises a TypeError if called more than once without advancing the enumerator" # NotImplementedError: Opal doesn't support Enumerator#feed
6
+ fails "Enumerator#feed returns nil" # NotImplementedError: Opal doesn't support Enumerator#feed
7
+ fails "Enumerator#feed sets the future return value of yield if called before advancing the iterator" # NotImplementedError: Opal doesn't support Enumerator#feed
8
+ fails "Enumerator#feed sets the return value of Yielder#yield" # NotImplementedError: Opal doesn't support Enumerator#feed
9
+ fails "Enumerator#initialize returns self when given a block" # Expected nil to be identical to #<Enumerator: #<Enumerator::Generator:0x4ef82 @block=#<Proc:0x4efa6>>:each>
10
+ fails "Enumerator#initialize sets size to nil if size is not given" # NoMethodError: undefined method `size' for nil
11
+ fails "Enumerator#initialize sets size to nil if the given size is nil" # NoMethodError: undefined method `size' for nil
12
+ fails "Enumerator#initialize sets size to the given size if the given size is Float::INFINITY" # Expected 4 to be identical to Infinity
13
+ fails "Enumerator#initialize sets size to the given size if the given size is a Proc" # NoMethodError: undefined method `size' for nil
14
14
  fails "Enumerator#initialize sets size to the given size if the given size is an Integer" # Expected 4 == 100 to be truthy but was false
15
15
  fails "Enumerator.new no block given raises" # Expected ArgumentError but no exception was raised (#<Enumerator: 1:upto(3)> was returned)
16
16
  fails "Enumerator.new when passed a block yielded values handles yield arguments properly" # Expected 1 == [1, 2] to be truthy but was false
@@ -20,111 +20,112 @@ opal_filter "Enumerator" do
20
20
  fails "Enumerator.produce when initial value skipped uses nil instead" # NoMethodError: undefined method `produce' for Enumerator
21
21
  fails "Enumerator::ArithmeticSequence#hash is based on begin, end, step and exclude_end?" # Expected "A,3,21,3,0" (String) to be an instance of Integer
22
22
  fails "Enumerator::ArithmeticSequence.allocate is not defined" # Expected TypeError (allocator undefined for Enumerator::ArithmeticSequence) but no exception was raised (#<Enumerator::ArithmeticSequence>(#pretty_inspect raised #<NoMethodError: undefined method `begin' for nil>) was returned)
23
- fails "Enumerator::ArithmeticSequence.new is not defined" # Expected NoMethodError but got: ArgumentError ([ArithmeticSequence#initialize] wrong number of arguments (given 0, expected -2))
24
- fails "Enumerator::Generator#each returns the block returned value" # Expected #<Enumerator::Generator:0x74c7e> to be identical to "block_returned"
25
- fails "Enumerator::Generator#initialize returns self when given a block" # Expected #<Proc:0x1b2ee> to be identical to #<Enumerator::Generator:0x1b2e2>
26
- fails "Enumerator::Lazy defines lazy versions of a whitelist of Enumerator methods" # Expected ["initialize", "force", "lazy", "collect", "collect_concat", "drop", "drop_while", "enum_for", "filter", "find_all", "flat_map", "grep", "map", "select", "reject", "take", "take_while", "to_enum", "inspect"] to include "chunk"
27
- fails "Enumerator::Lazy#chunk calls the block with gathered values when yield with multiple arguments" # NoMethodError: undefined method `force' for #<Enumerator: #<Enumerator::Generator:0x5dcd4>:each>
28
- fails "Enumerator::Lazy#chunk on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected 0 == 2 to be truthy but was false
29
- fails "Enumerator::Lazy#chunk returns a new instance of Enumerator::Lazy" # Expected #<Enumerator: #<Enumerator::Generator:0x5dcbc>:each> (Enumerator) to be an instance of Enumerator::Lazy
30
- fails "Enumerator::Lazy#chunk returns an Enumerator if called without a block" # NoMethodError: undefined method `force' for #<Enumerator: #<Enumerator::Generator:0x5dc8a>:each>
31
- fails "Enumerator::Lazy#chunk when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Exception: Object.defineProperty called on non-object
23
+ fails "Enumerator::ArithmeticSequence.new is not defined" # Expected NoMethodError but got: ArgumentError ([ArithmeticSequence#initialize] wrong number of arguments (given 0, expected -2))
24
+ fails "Enumerator::Generator#each returns the block returned value" # Expected #<Enumerator::Generator:0x3f346 @block=#<Proc:0x3f40c>> to be identical to "block_returned"
25
+ fails "Enumerator::Generator#initialize returns self when given a block" # Expected #<Proc:0x3ff5e> to be identical to #<Enumerator::Generator:0x3ff52 @block=#<Proc:0x3ff5e>>
26
+ fails "Enumerator::Lazy defines lazy versions of a whitelist of Enumerator methods" # Expected ["initialize", "lazy", "collect", "collect_concat", "drop", "drop_while", "enum_for", "find_all", "grep", "reject", "take", "take_while", "inspect", "force", "filter", "flat_map", "map", "select", "to_enum"] to include "chunk"
27
+ fails "Enumerator::Lazy#chunk calls the block with gathered values when yield with multiple arguments" # NoMethodError: undefined method `force' for #<Enumerator: #<Enumerator::Generator:0x43cdc @block=#<Proc:0x43cde>>:each>
28
+ fails "Enumerator::Lazy#chunk on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
29
+ fails "Enumerator::Lazy#chunk returns a new instance of Enumerator::Lazy" # Expected #<Enumerator: #<Enumerator::Generator:0x43cc2 @block=#<Proc:0x43cc6>>:each> (Enumerator) to be an instance of Enumerator::Lazy
30
+ fails "Enumerator::Lazy#chunk returns an Enumerator if called without a block" # NoMethodError: undefined method `force' for #<Enumerator: #<Enumerator::Generator:0x43caa @block=#<Proc:0x43cac>>:each>
31
+ fails "Enumerator::Lazy#chunk when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
32
32
  fails "Enumerator::Lazy#chunk works with an infinite enumerable" # TypeError: can't iterate from Float
33
- fails "Enumerator::Lazy#chunk_while should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x5174c>:each> (Enumerator) to be kind of Enumerator::Lazy
33
+ fails "Enumerator::Lazy#chunk_while should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x4e058 @block=#<Proc:0x4e05c>>:each> (Enumerator) to be kind of Enumerator::Lazy
34
34
  fails "Enumerator::Lazy#chunk_while works with an infinite enumerable" # TypeError: can't iterate from Float
35
- fails "Enumerator::Lazy#collect on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [2, 3, 4] to be truthy but was false
36
- fails "Enumerator::Lazy#collect when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [1, 2, 3] to be truthy but was false
35
+ fails "Enumerator::Lazy#collect on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
36
+ fails "Enumerator::Lazy#collect when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
37
37
  fails "Enumerator::Lazy#collect works with an infinite enumerable" # TypeError: can't iterate from Float
38
- fails "Enumerator::Lazy#collect_concat on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # Expected [] == ["0", "1", "0", "2", "0", "3"] to be truthy but was false
39
- fails "Enumerator::Lazy#collect_concat on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == ["0", "10", "20", "30", "40", "50"] to be truthy but was false
40
- fails "Enumerator::Lazy#collect_concat when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # Expected [] == ["0", "1", "0", "2", "0", "3"] to be truthy but was false
41
- fails "Enumerator::Lazy#collect_concat when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == ["0", "10", "20", "30", "40", "50"] to be truthy but was false
38
+ fails "Enumerator::Lazy#collect_concat on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # TypeError: can't iterate from Float
39
+ fails "Enumerator::Lazy#collect_concat on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
40
+ fails "Enumerator::Lazy#collect_concat when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # TypeError: can't iterate from Float
41
+ fails "Enumerator::Lazy#collect_concat when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
42
42
  fails "Enumerator::Lazy#collect_concat works with an infinite enumerable" # TypeError: can't iterate from Float
43
+ fails "Enumerator::Lazy#compact returns array without nil elements" # Expected [1, 3, false, 5] (Array) to be an instance of Enumerator::Lazy
43
44
  fails "Enumerator::Lazy#drop on a nested Lazy sets difference of given count with old size to new size" # Expected 20 == 30 to be truthy but was false
44
- fails "Enumerator::Lazy#drop on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [4, 5] to be truthy but was false
45
+ fails "Enumerator::Lazy#drop on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
45
46
  fails "Enumerator::Lazy#drop sets difference of given count with old size to new size" # Expected 20 == 80 to be truthy but was false
46
- fails "Enumerator::Lazy#drop when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [2, 3] to be truthy but was false
47
+ fails "Enumerator::Lazy#drop when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
47
48
  fails "Enumerator::Lazy#drop works with an infinite enumerable" # TypeError: can't iterate from Float
48
- fails "Enumerator::Lazy#drop_while on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [6, 7] to be truthy but was false
49
- fails "Enumerator::Lazy#drop_while when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [5, 6] to be truthy but was false
49
+ fails "Enumerator::Lazy#drop_while on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
50
+ fails "Enumerator::Lazy#drop_while when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
50
51
  fails "Enumerator::Lazy#drop_while works with an infinite enumerable" # TypeError: can't iterate from Float
51
52
  fails "Enumerator::Lazy#eager does not enumerate an enumerator" # NoMethodError: undefined method `eager' for #<Enumerator::Lazy: [1, 2, 3]>
52
53
  fails "Enumerator::Lazy#eager returns a non-lazy Enumerator converted from the lazy enumerator" # NoMethodError: undefined method `eager' for #<Enumerator::Lazy: [1, 2, 3]>
53
- fails "Enumerator::Lazy#enum_for generates a lazy enumerator from the given name" # Expected [] == [[0, 10], [1, 11], [2, 12]] to be truthy but was false
54
- fails "Enumerator::Lazy#enum_for passes given arguments to wrapped method" # Expected [] == [0, 6, 20, 42] to be truthy but was false
54
+ fails "Enumerator::Lazy#enum_for generates a lazy enumerator from the given name" # TypeError: can't iterate from Float
55
+ fails "Enumerator::Lazy#enum_for passes given arguments to wrapped method" # TypeError: can't iterate from Float
55
56
  fails "Enumerator::Lazy#enum_for works with an infinite enumerable" # TypeError: can't iterate from Float
56
- fails "Enumerator::Lazy#filter calls the block with a gathered array when yield with multiple arguments" # NoMethodError: undefined method `force' for [[], 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]]
57
- fails "Enumerator::Lazy#filter on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [6, 8, 10] to be truthy but was false
58
- fails "Enumerator::Lazy#filter when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [0, 2, 4] to be truthy but was false
57
+ fails "Enumerator::Lazy#filter calls the block with a gathered array when yield with multiple arguments" # Expected [nil, 0, 0, 0, 0, nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] == [nil, 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] to be truthy but was false
58
+ fails "Enumerator::Lazy#filter on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
59
+ fails "Enumerator::Lazy#filter when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
59
60
  fails "Enumerator::Lazy#filter works with an infinite enumerable" # TypeError: can't iterate from Float
60
- fails "Enumerator::Lazy#filter_map does not map false results" # Expected [] == [1, 3, 5, 7] to be truthy but was false
61
- fails "Enumerator::Lazy#filter_map maps only truthy results" # Expected [] == [1, 3, 5, 7] to be truthy but was false
61
+ fails "Enumerator::Lazy#filter_map does not map false results" # TypeError: can't iterate from Float
62
+ fails "Enumerator::Lazy#filter_map maps only truthy results" # TypeError: can't iterate from Float
62
63
  fails "Enumerator::Lazy#find_all calls the block with a gathered array when yield with multiple arguments" # Expected [nil, 0, 0, 0, 0, nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] == [nil, 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] to be truthy but was false
63
- fails "Enumerator::Lazy#find_all on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [6, 8, 10] to be truthy but was false
64
- fails "Enumerator::Lazy#find_all when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [0, 2, 4] to be truthy but was false
64
+ fails "Enumerator::Lazy#find_all on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
65
+ fails "Enumerator::Lazy#find_all when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
65
66
  fails "Enumerator::Lazy#find_all works with an infinite enumerable" # TypeError: can't iterate from Float
66
- fails "Enumerator::Lazy#flat_map on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # Expected [] == ["0", "1", "0", "2", "0", "3"] to be truthy but was false
67
- fails "Enumerator::Lazy#flat_map on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == ["0", "10", "20", "30", "40", "50"] to be truthy but was false
68
- fails "Enumerator::Lazy#flat_map when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # Expected [] == ["0", "1", "0", "2", "0", "3"] to be truthy but was false
69
- fails "Enumerator::Lazy#flat_map when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == ["0", "10", "20", "30", "40", "50"] to be truthy but was false
67
+ fails "Enumerator::Lazy#flat_map on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # TypeError: can't iterate from Float
68
+ fails "Enumerator::Lazy#flat_map on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
69
+ fails "Enumerator::Lazy#flat_map when the returned lazy enumerator is evaluated by Enumerable#first flattens elements when the given block returned an array or responding to .each and .force" # TypeError: can't iterate from Float
70
+ fails "Enumerator::Lazy#flat_map when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
70
71
  fails "Enumerator::Lazy#flat_map works with an infinite enumerable" # TypeError: can't iterate from Float
71
- fails "Enumerator::Lazy#force on a nested Lazy calls all block and returns an Array" # Expected [] == [1, 2] to be truthy but was false
72
+ fails "Enumerator::Lazy#force on a nested Lazy calls all block and returns an Array" # TypeError: can't iterate from Float
72
73
  fails "Enumerator::Lazy#force passes given arguments to receiver.each" # Expected [[], 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "arg1", ["arg2", "arg3"], [], [0], [0, 1], [0, 1, 2]] == [nil, 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "arg1", ["arg2", "arg3"], [], [0], [0, 1], [0, 1, 2]] to be truthy but was false
73
74
  fails "Enumerator::Lazy#force works with an infinite enumerable" # TypeError: can't iterate from Float
74
75
  fails "Enumerator::Lazy#grep calls the block with a gathered array when yield with multiple arguments" # Expected [[], [], 0, 0, [0, 1], [...], [0, 1, 2], [...], [0, 1, 2], [...], nil, nil, "default_arg", "default_arg", [], [], [], [], [0], [...], [0, 1], [...], [0, 1, 2], [...]] == [nil, 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] to be truthy but was false
75
- fails "Enumerator::Lazy#grep on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # Exception: Object.defineProperty called on non-object
76
- fails "Enumerator::Lazy#grep on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # Expected [] == [0, 1, 2] to be truthy but was false
77
- fails "Enumerator::Lazy#grep when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # Expected [] == [1, 2, 3] to be truthy but was false
78
- fails "Enumerator::Lazy#grep when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # Expected [] == [0, 1, 2] to be truthy but was false
76
+ fails "Enumerator::Lazy#grep on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # TypeError: can't iterate from Float
77
+ fails "Enumerator::Lazy#grep on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # TypeError: can't iterate from Float
78
+ fails "Enumerator::Lazy#grep when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # TypeError: can't iterate from Float
79
+ fails "Enumerator::Lazy#grep when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # TypeError: can't iterate from Float
79
80
  fails "Enumerator::Lazy#grep works with an infinite enumerable" # TypeError: can't iterate from Float
80
81
  fails "Enumerator::Lazy#grep_v calls the block with a gathered array when yield with multiple arguments" # NoMethodError: undefined method `force' for [[nil, 0, nil, "default_arg"], [nil, 0, nil, "default_arg"], [nil, 0, nil, "default_arg"], [nil, 0, nil, "default_arg"]]
81
- fails "Enumerator::Lazy#grep_v on a nested Lazy sets #size to nil" # Expected 0 == nil to be truthy but was false
82
- fails "Enumerator::Lazy#grep_v on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # Exception: Object.defineProperty called on non-object
83
- fails "Enumerator::Lazy#grep_v on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # Expected [] == [0, 1, 2] to be truthy but was false
82
+ fails "Enumerator::Lazy#grep_v on a nested Lazy sets #size to nil" # NoMethodError: undefined method `each' for #<Object:0x7b884>
83
+ fails "Enumerator::Lazy#grep_v on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # TypeError: can't iterate from Float
84
+ fails "Enumerator::Lazy#grep_v on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # TypeError: can't iterate from Float
84
85
  fails "Enumerator::Lazy#grep_v returns a new instance of Enumerator::Lazy" # Expected [] (Array) to be an instance of Enumerator::Lazy
85
- fails "Enumerator::Lazy#grep_v sets #size to nil" # Expected 0 == nil to be truthy but was false
86
+ fails "Enumerator::Lazy#grep_v sets #size to nil" # NoMethodError: undefined method `each' for #<Object:0x7b738>
86
87
  fails "Enumerator::Lazy#grep_v sets $~ in the block" # NoMethodError: undefined method `force' for [nil]
87
- fails "Enumerator::Lazy#grep_v sets $~ in the next block with each" # Expected #<MatchData>(#pretty_inspect raised #<NoMethodError: undefined method `named_captures' for /e/>) == nil to be truthy but was false
88
- fails "Enumerator::Lazy#grep_v sets $~ in the next block with map" # Expected #<MatchData>(#pretty_inspect raised #<NoMethodError: undefined method `named_captures' for /e/>) == nil to be truthy but was false
89
- fails "Enumerator::Lazy#grep_v when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # Expected [] == [1, 2, 3] to be truthy but was false
90
- fails "Enumerator::Lazy#grep_v when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # Expected [] == [0, 1, 2] to be truthy but was false
88
+ fails "Enumerator::Lazy#grep_v sets $~ in the next block with each" # Expected #<MatchData "e"> == nil to be truthy but was false
89
+ fails "Enumerator::Lazy#grep_v sets $~ in the next block with map" # Expected #<MatchData "e"> == nil to be truthy but was false
90
+ fails "Enumerator::Lazy#grep_v when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when given a block" # TypeError: can't iterate from Float
91
+ fails "Enumerator::Lazy#grep_v when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times when not given a block" # TypeError: can't iterate from Float
91
92
  fails "Enumerator::Lazy#grep_v works with an infinite enumerable" # TypeError: can't iterate from Float
92
- fails "Enumerator::Lazy#initialize returns self" # Expected nil to be identical to #<Enumerator::Lazy: #<Object:0x4d524>>
93
+ fails "Enumerator::Lazy#initialize returns self" # Expected nil to be identical to #<Enumerator::Lazy: #<Object:0xa73bc>>
93
94
  fails "Enumerator::Lazy#initialize sets #size to nil if given size is nil" # NoMethodError: undefined method `size' for nil
94
95
  fails "Enumerator::Lazy#initialize sets #size to nil if not given a size" # NoMethodError: undefined method `size' for nil
95
96
  fails "Enumerator::Lazy#initialize sets given size to own size if the given size is Float::INFINITY" # Expected 4 to be identical to Infinity
96
97
  fails "Enumerator::Lazy#initialize sets given size to own size if the given size is a Proc" # NoMethodError: undefined method `size' for nil
97
98
  fails "Enumerator::Lazy#initialize sets given size to own size if the given size is an Integer" # Expected 4 == 100 to be truthy but was false
98
99
  fails "Enumerator::Lazy#initialize when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # NoMethodError: undefined method `first' for nil
99
- fails "Enumerator::Lazy#map on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [2, 3, 4] to be truthy but was false
100
- fails "Enumerator::Lazy#map when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [1, 2, 3] to be truthy but was false
100
+ fails "Enumerator::Lazy#map on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
101
+ fails "Enumerator::Lazy#map when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
101
102
  fails "Enumerator::Lazy#map works with an infinite enumerable" # TypeError: can't iterate from Float
102
103
  fails "Enumerator::Lazy#reject calls the block with a gathered array when yield with multiple arguments" # Expected [nil, 0, 0, 0, 0, nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] == [nil, 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] to be truthy but was false
103
- fails "Enumerator::Lazy#reject on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [5, 7, 9] to be truthy but was false
104
- fails "Enumerator::Lazy#reject when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [1, 3, 5] to be truthy but was false
104
+ fails "Enumerator::Lazy#reject on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
105
+ fails "Enumerator::Lazy#reject when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
105
106
  fails "Enumerator::Lazy#reject works with an infinite enumerable" # TypeError: can't iterate from Float
106
107
  fails "Enumerator::Lazy#select calls the block with a gathered array when yield with multiple arguments" # Expected [nil, 0, 0, 0, 0, nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] == [nil, 0, [0, 1], [0, 1, 2], [0, 1, 2], nil, "default_arg", [], [], [0], [0, 1], [0, 1, 2]] to be truthy but was false
107
- fails "Enumerator::Lazy#select doesn't over-evaluate when peeked" # NoMethodError: undefined method `peek' for #<Enumerator::Lazy: #<Enumerator::Lazy: ["Text1", "Text2", "Text3"]>>
108
- fails "Enumerator::Lazy#select doesn't pre-evaluate the next element" # NoMethodError: undefined method `next' for #<Enumerator::Lazy: #<Enumerator::Lazy: ["Text1", "Text2", "Text3"]>>
109
- fails "Enumerator::Lazy#select doesn't re-evaluate after peek" # NoMethodError: undefined method `peek' for #<Enumerator::Lazy: #<Enumerator::Lazy: ["Text1", "Text2", "Text3"]>>
110
- fails "Enumerator::Lazy#select on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [6, 8, 10] to be truthy but was false
111
- fails "Enumerator::Lazy#select when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [0, 2, 4] to be truthy but was false
108
+ fails "Enumerator::Lazy#select doesn't over-evaluate when peeked" # NoMethodError: undefined method `length' for #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: ["Text1", "Text2", "Text3"]>>>
109
+ fails "Enumerator::Lazy#select doesn't pre-evaluate the next element" # NoMethodError: undefined method `length' for #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: ["Text1", "Text2", "Text3"]>>>
110
+ fails "Enumerator::Lazy#select doesn't re-evaluate after peek" # NoMethodError: undefined method `length' for #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: ["Text1", "Text2", "Text3"]>>>
111
+ fails "Enumerator::Lazy#select on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
112
+ fails "Enumerator::Lazy#select when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
112
113
  fails "Enumerator::Lazy#select works with an infinite enumerable" # TypeError: can't iterate from Float
113
- fails "Enumerator::Lazy#slice_after should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x53eae>:each> (Enumerator) to be kind of Enumerator::Lazy
114
+ fails "Enumerator::Lazy#slice_after should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x3305c @block=#<Proc:0x33060>>:each> (Enumerator) to be kind of Enumerator::Lazy
114
115
  fails "Enumerator::Lazy#slice_after works with an infinite enumerable" # TypeError: can't iterate from Float
115
- fails "Enumerator::Lazy#slice_before should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x72c3a>:each> (Enumerator) to be kind of Enumerator::Lazy
116
+ fails "Enumerator::Lazy#slice_before should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x66168 @block=#<Proc:0x6616c>>:each> (Enumerator) to be kind of Enumerator::Lazy
116
117
  fails "Enumerator::Lazy#slice_before works with an infinite enumerable" # TypeError: can't iterate from Float
117
- fails "Enumerator::Lazy#slice_when should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x50bb6>:each> (Enumerator) to be kind of Enumerator::Lazy
118
+ fails "Enumerator::Lazy#slice_when should return a lazy enumerator" # Expected #<Enumerator: #<Enumerator::Generator:0x86660 @block=#<Proc:0x86664>>:each> (Enumerator) to be kind of Enumerator::Lazy
118
119
  fails "Enumerator::Lazy#slice_when works with an infinite enumerable" # TypeError: can't iterate from Float
119
- fails "Enumerator::Lazy#take on a nested Lazy when the returned lazy enumerator is evaluated by .force stops after specified times" # Expected [] == [1, 2] to be truthy but was false
120
+ fails "Enumerator::Lazy#take on a nested Lazy when the returned lazy enumerator is evaluated by .force stops after specified times" # TypeError: can't iterate from Float
120
121
  fails "Enumerator::Lazy#take on a nested Lazy when the returned lazy enumerator is evaluated by .force stops without iterations if the given argument is 0" # Expected ["before_yield"] == [] to be truthy but was false
121
122
  fails "Enumerator::Lazy#take sets given count to size if the old size is Infinity" # Expected Infinity == 20 to be truthy but was false
122
- fails "Enumerator::Lazy#take when the returned lazy enumerator is evaluated by .force stops after specified times" # Expected [] == [0, 1] to be truthy but was false
123
+ fails "Enumerator::Lazy#take when the returned lazy enumerator is evaluated by .force stops after specified times" # TypeError: can't iterate from Float
123
124
  fails "Enumerator::Lazy#take when the returned lazy enumerator is evaluated by .force stops without iterations if the given argument is 0" # Expected ["before_yield"] == [] to be truthy but was false
124
- fails "Enumerator::Lazy#take_while on a nested Lazy when the returned lazy enumerator is evaluated by .force stops after specified times" # Expected [] == [0] to be truthy but was false
125
- fails "Enumerator::Lazy#take_while when the returned lazy enumerator is evaluated by .force stops after specified times" # Expected [] == [0, 1, 2] to be truthy but was false
126
- fails "Enumerator::Lazy#to_enum generates a lazy enumerator from the given name" # Expected [] == [[0, 10], [1, 11], [2, 12]] to be truthy but was false
127
- fails "Enumerator::Lazy#to_enum passes given arguments to wrapped method" # Expected [] == [0, 6, 20, 42] to be truthy but was false
125
+ fails "Enumerator::Lazy#take_while on a nested Lazy when the returned lazy enumerator is evaluated by .force stops after specified times" # TypeError: can't iterate from Float
126
+ fails "Enumerator::Lazy#take_while when the returned lazy enumerator is evaluated by .force stops after specified times" # TypeError: can't iterate from Float
127
+ fails "Enumerator::Lazy#to_enum generates a lazy enumerator from the given name" # TypeError: can't iterate from Float
128
+ fails "Enumerator::Lazy#to_enum passes given arguments to wrapped method" # TypeError: can't iterate from Float
128
129
  fails "Enumerator::Lazy#to_enum works with an infinite enumerable" # TypeError: can't iterate from Float
129
130
  fails "Enumerator::Lazy#uniq when yielded with an argument return same value after rewind" # NoMethodError: undefined method `force' for [0, 1]
130
131
  fails "Enumerator::Lazy#uniq when yielded with an argument returns a lazy enumerator" # Expected [0, 1] (Array) to be an instance of Enumerator::Lazy
@@ -135,18 +136,20 @@ opal_filter "Enumerator" do
135
136
  fails "Enumerator::Lazy#uniq without block returns a lazy enumerator" # Expected [0, 1] (Array) to be an instance of Enumerator::Lazy
136
137
  fails "Enumerator::Lazy#uniq without block sets the size to nil" # Expected 2 == nil to be truthy but was false
137
138
  fails "Enumerator::Lazy#uniq works with an infinite enumerable" # TypeError: can't iterate from Float
138
- fails "Enumerator::Lazy#with_index enumerates with a given block" # Expected [] == [[0, 0], [2, 1], [4, 2]] to be truthy but was false
139
- fails "Enumerator::Lazy#with_index enumerates with an index starting at 0 when offset is nil" # Expected [] == [[0, 0], [1, 1], [2, 2]] to be truthy but was false
140
- fails "Enumerator::Lazy#with_index enumerates with an index starting at a given offset" # Expected [] == [[0, 3], [1, 4], [2, 5]] to be truthy but was false
141
- fails "Enumerator::Lazy#with_index enumerates with an index" # Expected [] == [[0, 0], [1, 1], [2, 2]] to be truthy but was false
139
+ fails "Enumerator::Lazy#with_index enumerates with a given block" # TypeError: can't iterate from Float
140
+ fails "Enumerator::Lazy#with_index enumerates with an index starting at 0 when offset is nil" # TypeError: can't iterate from Float
141
+ fails "Enumerator::Lazy#with_index enumerates with an index starting at a given offset" # TypeError: can't iterate from Float
142
+ fails "Enumerator::Lazy#with_index enumerates with an index" # TypeError: can't iterate from Float
142
143
  fails "Enumerator::Lazy#zip calls the block with a gathered array when yield with multiple arguments" # NoMethodError: undefined method `force' for [[[], []], [0, 0], [[0, 1], [0, 1]], [[0, 1, 2], [0, 1, 2]], [[0, 1, 2], [0, 1, 2]], [nil, nil], ["default_arg", "default_arg"], [[], []], [[], []], [[0], [0]], [[0, 1], [0, 1]], [[0, 1, 2], [0, 1, 2]]]
143
- fails "Enumerator::Lazy#zip keeps size" # Expected 0 == 100 to be truthy but was false
144
- fails "Enumerator::Lazy#zip on a nested Lazy keeps size" # Expected 0 == 100 to be truthy but was false
145
- fails "Enumerator::Lazy#zip on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [[1, 4, 8], [2, 5, nil]] to be truthy but was false
146
- fails "Enumerator::Lazy#zip raises a TypeError if arguments contain non-list object" # Expected TypeError but got: NoMethodError (undefined method `each' for #<Object:0x5898c>)
144
+ fails "Enumerator::Lazy#zip keeps size" # NoMethodError: undefined method `each' for #<Object:0xb6158>
145
+ fails "Enumerator::Lazy#zip on a nested Lazy keeps size" # NoMethodError: undefined method `each' for #<Object:0xb62fe>
146
+ fails "Enumerator::Lazy#zip on a nested Lazy when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
147
+ fails "Enumerator::Lazy#zip raises a TypeError if arguments contain non-list object" # Expected TypeError but got: NoMethodError (undefined method `each' for #<Object:0xb624e>)
147
148
  fails "Enumerator::Lazy#zip returns a Lazy when no arguments given" # Expected [[[]], [0], [[0, 1]], [[0, 1, 2]], [[0, 1, 2]], [nil], ["default_arg"], [[]], [[]], [[0]], [[0, 1]], [[0, 1, 2]]] (Array) to be an instance of Enumerator::Lazy
148
149
  fails "Enumerator::Lazy#zip returns a new instance of Enumerator::Lazy" # Expected [[[], nil], [0, nil], [[0, 1], nil], [[0, 1, 2], nil], [[0, 1, 2], nil], [nil, nil], ["default_arg", nil], [[], nil], [[], nil], [[0], nil], [[0, 1], nil], [[0, 1, 2], nil]] (Array) to be an instance of Enumerator::Lazy
149
- fails "Enumerator::Lazy#zip when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # Expected [] == [[0, 4, 8], [1, 5, nil]] to be truthy but was false
150
+ fails "Enumerator::Lazy#zip when the returned lazy enumerator is evaluated by Enumerable#first stops after specified times" # TypeError: can't iterate from Float
150
151
  fails "Enumerator::Lazy#zip works with an infinite enumerable and an array" # TypeError: can't iterate from Float
151
152
  fails "Enumerator::Lazy#zip works with two infinite enumerables" # TypeError: can't iterate from Float
153
+ fails "SimpleDelegator can be marshalled with its instance variables intact" # Exception: Cannot create property 'foo' on string 'hello'
154
+ fails "SimpleDelegator can be marshalled" # Expected String == SimpleDelegator to be truthy but was false
152
155
  end
@@ -1,12 +1,12 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_filter "Exception" do
3
- fails "An Exception reaching the top level is printed on STDERR" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x66584>
4
- fails "An Exception reaching the top level the Exception#cause is printed to STDERR with backtraces" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x66584>
5
- fails "An Exception reaching the top level with a custom backtrace is printed on STDERR" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x66584>
3
+ fails "An Exception reaching the top level is printed on STDERR" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x830fa>
4
+ fails "An Exception reaching the top level the Exception#cause is printed to STDERR with backtraces" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x830fa>
5
+ fails "An Exception reaching the top level with a custom backtrace is printed on STDERR" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x830fa>
6
6
  fails "Errno::EAGAIN is the same class as Errno::EWOULDBLOCK if they represent the same errno value" # NameError: uninitialized constant Errno::EAGAIN
7
- fails "Errno::EINVAL.new accepts an optional custom message and location" # ArgumentError: [EINVAL.new] wrong number of arguments(2 for -1)
8
- fails "Errno::EINVAL.new accepts an optional custom message" # NoMethodError: undefined method `errno' for #<Errno::EINVAL: Invalid argument - custom message>
9
- fails "Errno::EINVAL.new can be called with no arguments" # NoMethodError: undefined method `errno' for #<Errno::EINVAL: Invalid argument>
7
+ fails "Errno::EINVAL.new accepts an optional custom message and location" # ArgumentError: [EINVAL.new] wrong number of arguments (given 2, expected -1)
8
+ fails "Errno::EINVAL.new accepts an optional custom message" # Expected 22 == Errno to be truthy but was false
9
+ fails "Errno::EINVAL.new can be called with no arguments" # Expected 22 == Errno to be truthy but was false
10
10
  fails "Errno::ENOTSUP is defined" # Expected Errno to have constant 'ENOTSUP' but it does not
11
11
  fails "Errno::ENOTSUP is the same class as Errno::EOPNOTSUPP if they represent the same errno value" # NameError: uninitialized constant Errno::ENOTSUP
12
12
  fails "Exception#== returns true if both exceptions have the same class, no message, and no backtrace" # Expected #<RuntimeError: RuntimeError> == #<RuntimeError: RuntimeError> to be truthy but was false
@@ -14,54 +14,56 @@ opal_filter "Exception" do
14
14
  fails "Exception#== returns true if both exceptions have the same class, the same message, and the same backtrace" # Expected #<TypeError: message> == #<TypeError: message> to be truthy but was false
15
15
  fails "Exception#== returns true if one exception is the dup'd copy of the other" # Expected #<ArgumentError: ArgumentError> == #<ArgumentError: ArgumentError> to be truthy but was false
16
16
  fails "Exception#== returns true if the two objects subclass Exception and have the same message and backtrace" # Expected #<ExceptionSpecs::UnExceptional: ExceptionSpecs::UnExceptional> == #<ExceptionSpecs::UnExceptional: ExceptionSpecs::UnExceptional> to be truthy but was false
17
- fails "Exception#backtrace captures the backtrace for an exception into $!" # Expected "<internal:corelib/kernel.rb>:536:23:in `new'" =~ /backtrace_spec/ to be truthy but was nil
18
- fails "Exception#backtrace captures the backtrace for an exception into $@" # Expected "<internal:corelib/kernel.rb>:536:23:in `new'" =~ /backtrace_spec/ to be truthy but was nil
19
- fails "Exception#backtrace includes the filename of the location immediately prior to where self raised in the second element" # Expected "ruby/core/exception/fixtures/common.rb:7:9:in `raise'" =~ /backtrace_spec\.rb/ to be truthy but was nil
20
- fails "Exception#backtrace includes the filename of the location where self raised in the first element" # Expected "<internal:corelib/kernel.rb>:536:23:in `new'" =~ /common\.rb/ to be truthy but was nil
21
- fails "Exception#backtrace includes the line number of the location immediately prior to where self raised in the second element" # Expected "ruby/core/exception/fixtures/common.rb:7:9:in `raise'" =~ /:6(:in )?/ to be truthy but was nil
22
- fails "Exception#backtrace includes the line number of the location where self raised in the first element" # Expected "<internal:corelib/kernel.rb>:536:23:in `new'" =~ /:7:in / to be truthy but was nil
23
- fails "Exception#backtrace includes the name of the method from where self raised in the first element" # Expected "<internal:corelib/kernel.rb>:536:23:in `new'" =~ /in `backtrace'/ to be truthy but was nil
24
- fails "Exception#backtrace returns nil if no backtrace was set" # Expected ["ruby/core/exception/backtrace_spec.rb:10:5:in `new'", "<internal:corelib/basic_object.rb>:119:1:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/mspec.rb:114:7:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/context.rb:176:34:in `protect'", "<internal:corelib/runtime.js>:1569:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'"] to be nil
17
+ fails "Exception#backtrace captures the backtrace for an exception into $!" # Expected "<internal:corelib/kernel.rb>:609:37:in `raise'" =~ /backtrace_spec/ to be truthy but was nil
18
+ fails "Exception#backtrace captures the backtrace for an exception into $@" # Expected "<internal:corelib/kernel.rb>:609:37:in `raise'" =~ /backtrace_spec/ to be truthy but was nil
19
+ fails "Exception#backtrace includes the filename of the location immediately prior to where self raised in the second element" # Expected "ruby/core/exception/fixtures/common.rb:7:9:in `backtrace'" =~ /backtrace_spec\.rb/ to be truthy but was nil
20
+ fails "Exception#backtrace includes the filename of the location where self raised in the first element" # Expected "<internal:corelib/kernel.rb>:609:37:in `raise'" =~ /common\.rb/ to be truthy but was nil
21
+ fails "Exception#backtrace includes the line number of the location immediately prior to where self raised in the second element" # Expected "ruby/core/exception/fixtures/common.rb:7:9:in `backtrace'" =~ /:6(:in )?/ to be truthy but was nil
22
+ fails "Exception#backtrace includes the line number of the location where self raised in the first element" # Expected "<internal:corelib/kernel.rb>:609:37:in `raise'" =~ /:7:in / to be truthy but was nil
23
+ fails "Exception#backtrace includes the name of the method from where self raised in the first element" # Expected "<internal:corelib/kernel.rb>:609:37:in `raise'" =~ /in `backtrace'/ to be truthy but was nil
24
+ fails "Exception#backtrace returns nil if no backtrace was set" # Expected ["ruby/core/exception/backtrace_spec.rb:10:14:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/context.rb:176:39:in `$$17'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "<internal:corelib/enumerable.rb>:26:7:in `Enumerable_all$ques$1'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `all?'", "mspec/runner/context.rb:176:18:in `protect'", "mspec/runner/context.rb:212:26:in `$$21'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "mspec/runner/mspec.rb:284:7:in `repeat'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `repeat'", "mspec/runner/context.rb:204:16:in `$$20'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/context.rb:203:18:in `process'", "mspec/runner/mspec.rb:55:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "mspec/runner/object.rb:11:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "ruby/core/exception/backtrace_spec.rb:4:1:in `Opal.modules.ruby/core/exception/backtrace_spec'", "<internal:corelib/runtime.js>:2692:7:in `Opal.load_normalized'", "<internal:corelib/runtime.js>:2721:5:in `load'", "<internal:corelib/kernel.rb>:535:6:in `load'", "mspec/runner/mspec.rb:99:42:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/mspec.rb:99:7:in `$$1'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/mspec.rb:90:12:in `each_file'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each_file'", "mspec/runner/mspec.rb:95:5:in `files'", "mspec/runner/mspec.rb:63:5:in `process'", "tmp/mspec_nodejs.rb:3880:6:in `undefined'", "<internal:corelib/runtime.js>:2805:7:in `<main>'", "tmp/mspec_nodejs.rb:1:1:in `null'", "node:internal/modules/cjs/loader:1105:14:in `Module._compile'", "node:internal/modules/cjs/loader:1159:10:in `Module._extensions..js'", "node:internal/modules/cjs/loader:981:32:in `Module.load'", "node:internal/modules/cjs/loader:822:12:in `Module._load'", "node:internal/modules/run_main:77:12:in `executeUserEntryPoint'", "node:internal/main/run_main_module:17:47:in `undefined'"] to be nil
25
25
  fails "Exception#backtrace_locations produces a backtrace for an exception captured using $!" # Expected "<internal:corelib/kernel.rb>" =~ /backtrace_locations_spec/ to be truthy but was nil
26
- fails "Exception#backtrace_locations returns nil if no backtrace was set" # Expected ["ruby/core/exception/backtrace_locations_spec.rb:10:5:in `new'", "<internal:corelib/basic_object.rb>:119:1:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/mspec.rb:114:7:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/context.rb:176:34:in `protect'", "<internal:corelib/runtime.js>:1569:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'"] to be nil
26
+ fails "Exception#backtrace_locations returns nil if no backtrace was set" # Expected ["ruby/core/exception/backtrace_locations_spec.rb:10:14:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/context.rb:176:39:in `$$17'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "<internal:corelib/enumerable.rb>:26:7:in `Enumerable_all$ques$1'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `all?'", "mspec/runner/context.rb:176:18:in `protect'", "mspec/runner/context.rb:212:26:in `$$21'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "mspec/runner/mspec.rb:284:7:in `repeat'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `repeat'", "mspec/runner/context.rb:204:16:in `$$20'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/context.rb:203:18:in `process'", "mspec/runner/mspec.rb:55:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "mspec/runner/object.rb:11:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "ruby/core/exception/backtrace_locations_spec.rb:4:1:in `Opal.modules.ruby/core/exception/backtrace_locations_spec'", "<internal:corelib/runtime.js>:2692:7:in `Opal.load_normalized'", "<internal:corelib/runtime.js>:2721:5:in `load'", "<internal:corelib/kernel.rb>:535:6:in `load'", "mspec/runner/mspec.rb:99:42:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/mspec.rb:99:7:in `$$1'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/mspec.rb:90:12:in `each_file'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each_file'", "mspec/runner/mspec.rb:95:5:in `files'", "mspec/runner/mspec.rb:63:5:in `process'", "tmp/mspec_nodejs.rb:3880:6:in `undefined'", "<internal:corelib/runtime.js>:2805:7:in `<main>'", "tmp/mspec_nodejs.rb:1:1:in `null'", "node:internal/modules/cjs/loader:1105:14:in `Module._compile'", "node:internal/modules/cjs/loader:1159:10:in `Module._extensions..js'", "node:internal/modules/cjs/loader:981:32:in `Module.load'", "node:internal/modules/cjs/loader:822:12:in `Module._load'", "node:internal/modules/run_main:77:12:in `executeUserEntryPoint'", "node:internal/main/run_main_module:17:47:in `undefined'"] to be nil
27
27
  fails "Exception#cause is set for internal errors caused by user errors" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
28
28
  fails "Exception#cause is set for user errors caused by internal errors" # Expected RuntimeError but no exception was raised (Infinity was returned)
29
- fails "Exception#exception captures an exception into $!" # Expected "RuntimeError" == "" to be truthy but was false
30
- fails "Exception#full_message contains all the chain of exceptions" # Expected "<internal:corelib/kernel.rb>:539:23:in `new': \e[1mlast exception (\e[1;4mRuntimeError\e[1m)\e[m \tfrom ruby/core/exception/full_message_spec.rb:81:11:in `raise' \tfrom <internal:corelib/basic_object.rb>:119:1:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1780:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1770:5:in `Opal.send' \tfrom mspec/runner/mspec.rb:114:7:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1780:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1770:5:in `Opal.send' \tfrom mspec/runner/context.rb:176:34:in `protect' \tfrom <internal:corelib/runtime.js>:1569:5:in `Opal.yieldX' <internal:corelib/kernel.rb>:539:23:in `new': \e[1morigin exception (\e[1;4mRuntimeError\e[1m)\e[m \tfrom ruby/core/exception/full_message_spec.rb:76:13:in `raise' \tfrom <internal:corelib/basic_object.rb>:119:1:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1780:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1770:5:in `Opal.send' \tfrom mspec/runner/mspec.rb:114:7:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1780:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1770:5:in `Opal.send' \tfrom mspec/runner/context.rb:176:34:in `protect' \tfrom <internal:corelib/runtime.js>:1569:5:in `Opal.yieldX' " to include "intermediate exception"
31
- fails "Exception#full_message shows the caller if the exception has no backtrace" # Expected ["ruby/core/exception/full_message_spec.rb:37:11:in `new'", "<internal:corelib/basic_object.rb>:119:1:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/mspec.rb:114:7:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/context.rb:176:34:in `protect'", "<internal:corelib/runtime.js>:1569:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'"] == nil to be truthy but was false
32
- fails "Exception#full_message shows the exception class at the end of the first line of the message when the message contains multiple lines" # Expected "<internal:corelib/kernel.rb>:539:23:in `new': first line " to include "ruby/core/exception/full_message_spec.rb:46:in `"
29
+ fails "Exception#exception captures an exception into $!" # Expected "<internal:corelib/kernel.rb>:609:37:in `raise'" =~ /exception_spec/ to be truthy but was nil
30
+ fails "Exception#full_message contains all the chain of exceptions" # Expected "<internal:corelib/kernel.rb>:612:37:in `raise': \e[1mlast exception (\e[1;4mRuntimeError\e[m\e[1m)\e[m \tfrom ruby/core/exception/full_message_spec.rb:96:9:in `instance_exec' \tfrom <internal:corelib/basic_object.rb>:125:1:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `instance_exec' \tfrom mspec/runner/mspec.rb:116:11:in `protect' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `protect' \tfrom mspec/runner/context.rb:176:39:in `$$17' \tfrom <internal:corelib/runtime.js>:1667:5:in `Opal.yieldX' \tfrom <internal:corelib/enumerable.rb>:27:16:in `$$3' \tfrom <internal:corelib/runtime.js>:1644:7:in `each' \tfrom <internal:corelib/array.rb>:983:1:in `each' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each' \tfrom <internal:corelib/enumerable.rb>:26:7:in `Enumerable_all$ques$1' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `all?' \tfrom mspec/runner/context.rb:176:18:in `protect' \tfrom mspec/runner/context.rb:212:26:in `$$21' \tfrom <internal:corelib/runtime.js>:1667:5:in `Opal.yieldX' \tfrom mspec/runner/mspec.rb:284:7:in `repeat' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `repeat' \tfrom mspec/runner/context.rb:204:16:in `$$20' \tfrom <internal:corelib/runtime.js>:1644:7:in `each' \tfrom <internal:corelib/array.rb>:983:1:in `each' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each' \tfrom mspec/runner/context.rb:203:18:in `process' \tfrom mspec/runner/mspec.rb:55:10:in `describe' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `describe' \tfrom mspec/runner/object.rb:11:10:in `describe' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `describe' \tfrom ruby/core/exception/full_message_spec.rb:3:1:in `Opal.modules.ruby/core/exception/full_message_spec' \tfrom <internal:corelib/runtime.js>:2692:7:in `Opal.load_normalized' \tfrom <internal:corelib/runtime.js>:2721:5:in `load' \tfrom <internal:corelib/kernel.rb>:535:6:in `load' \tfrom mspec/runner/mspec.rb:99:42:in `instance_exec' \tfrom <internal:corelib/basic_object.rb>:125:1:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `instance_exec' \tfrom mspec/runner/mspec.rb:116:11:in `protect' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `protect' \tfrom mspec/runner/mspec.rb:99:7:in `$$1' \tfrom <internal:corelib/runtime.js>:1644:7:in `each' \tfrom <internal:corelib/array.rb>:983:1:in `each' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each' \tfrom mspec/runner/mspec.rb:90:12:in `each_file' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each_file' \tfrom mspec/runner/mspec.rb:95:5:in `files' \tfrom mspec/runner/mspec.rb:63:5:in `process' \tfrom tmp/mspec_nodejs.rb:3880:6:in `undefined' \tfrom <internal:corelib/runtime.js>:2805:7:in `<main>' \tfrom tmp/mspec_nodejs.rb:1:1:in `null' \tfrom node:internal/modules/cjs/loader:1105:14:in `Module._compile' \tfrom node:internal/modules/cjs/loader:1159:10:in `Module._extensions..js' \tfrom node:internal/modules/cjs/loader:981:32:in `Module.load' \tfrom node:internal/modules/cjs/loader:822:12:in `Module._load' \tfrom node:internal/modules/run_main:77:12:in `executeUserEntryPoint' \tfrom node:internal/main/run_main_module:17:47:in `undefined' <internal:corelib/kernel.rb>:612:37:in `raise': \e[1morigin exception (\e[1;4mRuntimeError\e[m\e[1m)\e[m \tfrom ruby/core/exception/full_message_spec.rb:91:11:in `instance_exec' \tfrom <internal:corelib/basic_object.rb>:125:1:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `instance_exec' \tfrom mspec/runner/mspec.rb:116:11:in `protect' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `protect' \tfrom mspec/runner/context.rb:176:39:in `$$17' \tfrom <internal:corelib/runtime.js>:1667:5:in `Opal.yieldX' \tfrom <internal:corelib/enumerable.rb>:27:16:in `$$3' \tfrom <internal:corelib/runtime.js>:1644:7:in `each' \tfrom <internal:corelib/array.rb>:983:1:in `each' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each' \tfrom <internal:corelib/enumerable.rb>:26:7:in `Enumerable_all$ques$1' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `all?' \tfrom mspec/runner/context.rb:176:18:in `protect' \tfrom mspec/runner/context.rb:212:26:in `$$21' \tfrom <internal:corelib/runtime.js>:1667:5:in `Opal.yieldX' \tfrom mspec/runner/mspec.rb:284:7:in `repeat' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `repeat' \tfrom mspec/runner/context.rb:204:16:in `$$20' \tfrom <internal:corelib/runtime.js>:1644:7:in `each' \tfrom <internal:corelib/array.rb>:983:1:in `each' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each' \tfrom mspec/runner/context.rb:203:18:in `process' \tfrom mspec/runner/mspec.rb:55:10:in `describe' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `describe' \tfrom mspec/runner/object.rb:11:10:in `describe' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `describe' \tfrom ruby/core/exception/full_message_spec.rb:3:1:in `Opal.modules.ruby/core/exception/full_message_spec' \tfrom <internal:corelib/runtime.js>:2692:7:in `Opal.load_normalized' \tfrom <internal:corelib/runtime.js>:2721:5:in `load' \tfrom <internal:corelib/kernel.rb>:535:6:in `load' \tfrom mspec/runner/mspec.rb:99:42:in `instance_exec' \tfrom <internal:corelib/basic_object.rb>:125:1:in `instance_exec' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `instance_exec' \tfrom mspec/runner/mspec.rb:116:11:in `protect' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `protect' \tfrom mspec/runner/mspec.rb:99:7:in `$$1' \tfrom <internal:corelib/runtime.js>:1644:7:in `each' \tfrom <internal:corelib/array.rb>:983:1:in `each' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each' \tfrom mspec/runner/mspec.rb:90:12:in `each_file' \tfrom <internal:corelib/runtime.js>:1878:5:in `Opal.send2' \tfrom <internal:corelib/runtime.js>:1866:5:in `each_file' \tfrom mspec/runner/mspec.rb:95:5:in `files' \tfrom mspec/runner/mspec.rb:63:5:in `process' \tfrom tmp/mspec_nodejs.rb:3880:6:in `undefined' \tfrom <internal:corelib/runtime.js>:2805:7:in `<main>' \tfrom tmp/mspec_nodejs.rb:1:1:in `null' \tfrom node:internal/modules/cjs/loader:1105:14:in `Module._compile' \tfrom node:internal/modules/cjs/loader:1159:10:in `Module._extensions..js' \tfrom node:internal/modules/cjs/loader:981:32:in `Module.load' \tfrom node:internal/modules/cjs/loader:822:12:in `Module._load' \tfrom node:internal/modules/run_main:77:12:in `executeUserEntryPoint' \tfrom node:internal/main/run_main_module:17:47:in `undefined' " to include "intermediate exception"
31
+ fails "Exception#full_message highlights the entire message when the message contains multiple lines" # Expected "<internal:corelib/kernel.rb>:612:37:in `raise': \e[1mfirst line ".start_with? "ruby/core/exception/full_message_spec.rb:62:in `" to be truthy but was false
32
+ fails "Exception#full_message shows the caller if the exception has no backtrace" # Expected ["ruby/core/exception/full_message_spec.rb:42:21:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/context.rb:176:39:in `$$17'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "<internal:corelib/enumerable.rb>:26:7:in `Enumerable_all$ques$1'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `all?'", "mspec/runner/context.rb:176:18:in `protect'", "mspec/runner/context.rb:212:26:in `$$21'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "mspec/runner/mspec.rb:284:7:in `repeat'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `repeat'", "mspec/runner/context.rb:204:16:in `$$20'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/context.rb:203:18:in `process'", "mspec/runner/mspec.rb:55:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "mspec/runner/object.rb:11:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "ruby/core/exception/full_message_spec.rb:3:1:in `Opal.modules.ruby/core/exception/full_message_spec'", "<internal:corelib/runtime.js>:2692:7:in `Opal.load_normalized'", "<internal:corelib/runtime.js>:2721:5:in `load'", "<internal:corelib/kernel.rb>:535:6:in `load'", "mspec/runner/mspec.rb:99:42:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/mspec.rb:99:7:in `$$1'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/mspec.rb:90:12:in `each_file'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each_file'", "mspec/runner/mspec.rb:95:5:in `files'", "mspec/runner/mspec.rb:63:5:in `process'", "tmp/mspec_nodejs.rb:3880:6:in `undefined'", "<internal:corelib/runtime.js>:2805:7:in `<main>'", "tmp/mspec_nodejs.rb:1:1:in `null'", "node:internal/modules/cjs/loader:1105:14:in `Module._compile'", "node:internal/modules/cjs/loader:1159:10:in `Module._extensions..js'", "node:internal/modules/cjs/loader:981:32:in `Module.load'", "node:internal/modules/cjs/loader:822:12:in `Module._load'", "node:internal/modules/run_main:77:12:in `executeUserEntryPoint'", "node:internal/main/run_main_module:17:47:in `undefined'"] == nil to be truthy but was false
33
+ fails "Exception#full_message shows the exception class at the end of the first line of the message when the message contains multiple lines" # Expected "<internal:corelib/kernel.rb>:612:37:in `raise': first line ".start_with? "ruby/core/exception/full_message_spec.rb:51:in `" to be truthy but was false
34
+ fails "Exception#full_message supports :highlight option and adds escape sequences to highlight some strings" # Expected "ruby/core/exception/full_message_spec.rb:16:21:in `instance_exec': \e[1mSome runtime error (\e[1;4mRuntimeError\e[m\e[1m)\e[m".end_with? "\e[1mSome runtime error (\e[1;4mRuntimeError\e[m\e[1m)\e[m " to be truthy but was false
33
35
  fails "Exception#full_message supports :order option and places the error message and the backtrace at the top or the bottom" # Expected "a.rb:1: Some runtime error (RuntimeError) \tfrom b.rb:2 " =~ /a.rb:1.*b.rb:2/m to be truthy but was nil
34
36
  fails "Exception#set_backtrace raises a TypeError when passed a Symbol" # Expected TypeError but no exception was raised ("unhappy" was returned)
35
37
  fails "Exception#set_backtrace raises a TypeError when the Array contains a Symbol" # Expected TypeError but no exception was raised (["String", "unhappy"] was returned)
36
38
  fails "Exception#to_s calls #to_s on the message" # Mock 'message' expected to receive to_s("any_args") exactly 1 times but received it 2 times
37
- fails "Interrupt is raised on the main Thread by the default SIGINT handler" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6b5e8>
39
+ fails "Interrupt is raised on the main Thread by the default SIGINT handler" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x52262>
38
40
  fails "Interrupt.new returns an instance of interrupt with no message given" # NoMethodError: undefined method `signo' for #<Interrupt: Interrupt>
39
41
  fails "Interrupt.new takes an optional message argument" # NoMethodError: undefined method `signo' for #<Interrupt: message>
40
42
  fails "KeyError accepts :receiver and :key options" # ArgumentError: no receiver is available
41
43
  fails "LocalJumpError#exit_value returns the value given to return" # Expected LocalJumpError but got: Exception (unexpected return)
42
44
  fails "LocalJumpError#reason returns 'return' for a return" # Expected LocalJumpError but got: Exception (unexpected return)
43
- fails "NameError#dup copies the name and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<MSpecEnv:0x69be8>>
44
- fails "NameError#name returns a class variable name as a symbol" # Expected "binding" == "@@doesnt_exist" to be truthy but was false
45
+ fails "NameError#dup copies the name and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<MSpecEnv:0x39754>>
46
+ fails "NameError#name returns a class variable name as a symbol" # Expected nil == "@@doesnt_exist" to be truthy but was false
45
47
  fails "NameError#receiver returns a class when an undefined class variable is called in a subclass' namespace" # NoMethodError: undefined method `receiver' for #<NameError: uninitialized class variable @@doesnt_exist in NameErrorSpecs::ReceiverClass>
46
48
  fails "NameError#receiver returns a class when an undefined constant is called" # NoMethodError: undefined method `receiver' for #<NameError: uninitialized constant NameErrorSpecs::ReceiverClass::DoesntExist>
47
- fails "NameError#receiver returns the Object class when an undefined class variable is called" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `binding' for #<MSpecEnv:0x6665c>>
49
+ fails "NameError#receiver returns the Object class when an undefined class variable is called" # NoMethodError: undefined method `receiver' for #<NameError: uninitialized class variable @@doesnt_exist in >
48
50
  fails "NameError#receiver returns the Object class when an undefined constant is called without namespace" # NoMethodError: undefined method `receiver' for #<NameError: uninitialized constant DoesntExist>
49
- fails "NameError#receiver returns the object that raised the exception" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `doesnt_exist' for #<Object:0x6667e>>
51
+ fails "NameError#receiver returns the object that raised the exception" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `doesnt_exist' for #<Object:0x1a114>>
50
52
  fails "NameError#receiver returns the receiver when raised from #class_variable_get" # NoMethodError: undefined method `receiver' for #<NameError: `invalid_cvar_name' is not allowed as a class variable name>
51
53
  fails "NameError#receiver returns the receiver when raised from #instance_variable_get" # NoMethodError: undefined method `receiver' for #<NameError: 'invalid_ivar_name' is not allowed as an instance variable name>
52
- fails "NameError#to_s raises its own message for an undefined variable" # Expected "undefined method `not_defined' for #<MSpecEnv:0x19344>" =~ /undefined local variable or method `not_defined'/ to be truthy but was nil
53
- fails "NameError.new accepts a :receiver keyword argument" # ArgumentError: [NameError#initialize] wrong number of arguments(3 for -2)
54
- fails "NoMethodError#dup copies the name, arguments and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<Object:0x31eb8>>
55
- fails "NoMethodError#message uses #name to display the receiver if it is a class or a module" # Expected "undefined method `foo' for #<Class:0x31e84>" == "undefined method `foo' for MyClass:Class" to be truthy but was false
54
+ fails "NameError#to_s raises its own message for an undefined variable" # Expected "undefined method `not_defined' for #<MSpecEnv:0xb0b34>" =~ /undefined local variable or method `not_defined'/ to be truthy but was nil
55
+ fails "NameError.new accepts a :receiver keyword argument" # ArgumentError: [NameError#initialize] wrong number of arguments (given 3, expected -2)
56
+ fails "NoMethodError#dup copies the name, arguments and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<Object:0x11274>>
57
+ fails "NoMethodError#message uses #name to display the receiver if it is a class or a module" # Expected "undefined method `foo' for #<Class:0x11230>" == "undefined method `foo' for MyClass:Class" to be truthy but was false
56
58
  fails "NoMethodError.new accepts a :receiver keyword argument" # NoMethodError: undefined method `receiver' for #<NoMethodError: msg>
57
- fails "SignalException can be rescued" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
58
- fails "SignalException cannot be trapped with Signal.trap" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
59
- fails "SignalException runs after at_exit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
60
- fails "SignalException self-signals for USR1" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
59
+ fails "SignalException can be rescued" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x52502>
60
+ fails "SignalException cannot be trapped with Signal.trap" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x52502>
61
+ fails "SignalException runs after at_exit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x52502>
62
+ fails "SignalException self-signals for USR1" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x52502>
61
63
  fails "SignalException#signm returns the signal name" # Expected SignalException but got: NoMethodError (undefined method `kill' for Process)
62
64
  fails "SignalException#signo returns the signal number" # Expected SignalException but got: NoMethodError (undefined method `kill' for Process)
63
65
  fails "SignalException.new raises an exception for an optional argument with a signal name" # Expected ArgumentError but no exception was raised (#<SignalException: INT> was returned)
64
- fails "SignalException.new raises an exception with an invalid first argument type" # Expected ArgumentError but no exception was raised (#<SignalException: #<Object:0x6271c>> was returned)
66
+ fails "SignalException.new raises an exception with an invalid first argument type" # Expected ArgumentError but no exception was raised (#<SignalException: #<Object:0x52564>> was returned)
65
67
  fails "SignalException.new raises an exception with an invalid signal name" # Expected ArgumentError but no exception was raised (#<SignalException: NONEXISTENT> was returned)
66
68
  fails "SignalException.new raises an exception with an invalid signal number" # Expected ArgumentError but no exception was raised (#<SignalException: 100000> was returned)
67
69
  fails "SignalException.new takes a signal name with SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: SIGINT>
@@ -70,16 +72,16 @@ opal_filter "Exception" do
70
72
  fails "SignalException.new takes a signal symbol with SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: SIGINT>
71
73
  fails "SignalException.new takes a signal symbol without SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: INT>
72
74
  fails "SignalException.new takes an optional message argument with a signal number" # NoMethodError: undefined method `list' for Signal
73
- fails "StopIteration#result returns the method-returned-object from an Enumerator" # NoMethodError: undefined method `next' for #<Enumerator: #<Object:0x4fb42>:each>
74
- fails "SystemCallError#backtrace is nil if not raised" # Expected ["ruby/core/exception/system_call_error_spec.rb:141:5:in `new'", "<internal:corelib/basic_object.rb>:119:1:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/mspec.rb:114:7:in `instance_exec'", "<internal:corelib/runtime.js>:1780:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1770:5:in `Opal.send'", "mspec/runner/context.rb:176:34:in `protect'", "<internal:corelib/runtime.js>:1569:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'"] == nil to be truthy but was false
75
- fails "SystemCallError#dup copies the errno" # NoMethodError: undefined method `errno' for #<SystemCallError: message>
76
- fails "SystemCallError#errno returns the errno given as optional argument to new" # NoMethodError: undefined method `errno' for #<SystemCallError: message>
75
+ fails "StopIteration#result returns the method-returned-object from an Enumerator" # Expected nil to be identical to "method_returned"
76
+ fails "SystemCallError#backtrace is nil if not raised" # Expected ["ruby/core/exception/system_call_error_spec.rb:141:20:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/context.rb:176:39:in `$$17'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "<internal:corelib/enumerable.rb>:27:16:in `$$3'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "<internal:corelib/enumerable.rb>:26:7:in `Enumerable_all$ques$1'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `all?'", "mspec/runner/context.rb:176:18:in `protect'", "mspec/runner/context.rb:212:26:in `$$21'", "<internal:corelib/runtime.js>:1667:5:in `Opal.yieldX'", "mspec/runner/mspec.rb:284:7:in `repeat'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `repeat'", "mspec/runner/context.rb:204:16:in `$$20'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/context.rb:203:18:in `process'", "mspec/runner/mspec.rb:55:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "mspec/runner/object.rb:11:10:in `describe'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `describe'", "ruby/core/exception/system_call_error_spec.rb:139:1:in `Opal.modules.ruby/core/exception/system_call_error_spec'", "<internal:corelib/runtime.js>:2692:7:in `Opal.load_normalized'", "<internal:corelib/runtime.js>:2721:5:in `load'", "<internal:corelib/kernel.rb>:535:6:in `load'", "mspec/runner/mspec.rb:99:42:in `instance_exec'", "<internal:corelib/basic_object.rb>:125:1:in `instance_exec'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `instance_exec'", "mspec/runner/mspec.rb:116:11:in `protect'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `protect'", "mspec/runner/mspec.rb:99:7:in `$$1'", "<internal:corelib/runtime.js>:1644:7:in `each'", "<internal:corelib/array.rb>:983:1:in `each'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each'", "mspec/runner/mspec.rb:90:12:in `each_file'", "<internal:corelib/runtime.js>:1878:5:in `Opal.send2'", "<internal:corelib/runtime.js>:1866:5:in `each_file'", "mspec/runner/mspec.rb:95:5:in `files'", "mspec/runner/mspec.rb:63:5:in `process'", "tmp/mspec_nodejs.rb:3880:6:in `undefined'", "<internal:corelib/runtime.js>:2805:7:in `<main>'", "tmp/mspec_nodejs.rb:1:1:in `null'", "node:internal/modules/cjs/loader:1105:14:in `Module._compile'", "node:internal/modules/cjs/loader:1159:10:in `Module._extensions..js'", "node:internal/modules/cjs/loader:981:32:in `Module.load'", "node:internal/modules/cjs/loader:822:12:in `Module._load'", "node:internal/modules/run_main:77:12:in `executeUserEntryPoint'", "node:internal/main/run_main_module:17:47:in `undefined'"] == nil to be truthy but was false
77
+ fails "SystemCallError#dup copies the errno" # Expected nil == 42 to be truthy but was false
78
+ fails "SystemCallError#errno returns the errno given as optional argument to new" # Expected nil == -1048576 to be truthy but was false
77
79
  fails "SystemCallError#message returns the default message when no message is given" # Expected "268435456" =~ /Unknown error/i to be truthy but was nil
78
80
  fails "SystemCallError.=== returns false if errnos different" # NoMethodError: undefined method `+' for Errno
79
81
  fails "SystemCallError.=== returns true if errnos same" # Expected false == true to be truthy but was false
80
82
  fails "SystemCallError.new accepts an optional custom message preceding the errno" # Expected #<SystemCallError: custom message> (SystemCallError) to be an instance of Errno::EINVAL
81
83
  fails "SystemCallError.new accepts an optional third argument specifying the location" # Expected #<SystemCallError: custom message> (SystemCallError) to be an instance of Errno::EINVAL
82
- fails "SystemCallError.new accepts single Integer argument as errno" # NoMethodError: undefined method `errno' for #<SystemCallError: -16777216>
84
+ fails "SystemCallError.new accepts single Integer argument as errno" # Expected nil == -16777216 to be truthy but was false
83
85
  fails "SystemCallError.new coerces location if it is not a String" # Expected "foo" =~ /@ not_a_string - foo/ to be truthy but was nil
84
86
  fails "SystemCallError.new constructs the appropriate Errno class" # Expected #<SystemCallError: Errno> (SystemCallError) to be an instance of Errno::EINVAL
85
87
  fails "SystemCallError.new converts to Integer if errno is a Complex convertible to Integer" # Expected #<SystemCallError: foo> == #<SystemCallError: foo> to be truthy but was false
@@ -88,8 +90,12 @@ opal_filter "Exception" do
88
90
  fails "SystemCallError.new raises TypeError if errno is not an Integer" # Expected TypeError (/no implicit conversion of String into Integer/) but no exception was raised (#<SystemCallError: foo> was returned)
89
91
  fails "SystemCallError.new raises TypeError if message is not a String" # Expected TypeError (/no implicit conversion of Symbol into String/) but no exception was raised (#<SystemCallError: foo> was returned)
90
92
  fails "SystemCallError.new requires at least one argument" # Expected ArgumentError but no exception was raised (#<SystemCallError: SystemCallError> was returned)
91
- fails "SystemExit sets the exit status and exits silently when raised when subclassed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6edd2>
92
- fails "SystemExit sets the exit status and exits silently when raised" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6edd2>
93
+ fails "SystemExit #initialize accepts a message only" # NoMethodError: undefined method `status' for #<SystemExit: message>
94
+ fails "SystemExit #initialize accepts a status and message" # NoMethodError: undefined method `status' for #<SystemExit: 42>
95
+ fails "SystemExit #initialize accepts a status only" # NoMethodError: undefined method `status' for #<SystemExit: 42>
96
+ fails "SystemExit #initialize accepts no arguments" # NoMethodError: undefined method `status' for #<SystemExit: SystemExit>
97
+ fails "SystemExit sets the exit status and exits silently when raised when subclassed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x9fe6a>
98
+ fails "SystemExit sets the exit status and exits silently when raised" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x9fe6a>
93
99
  fails_badly "SystemExit#status returns the exit status"
94
100
  fails_badly "SystemExit#success? returns false if the process exited unsuccessfully"
95
101
  fails_badly "SystemExit#success? returns true if the process exited successfully"