opal 1.2.0 → 1.3.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.await.js +6 -0
  3. data/.eslintrc.js +34 -0
  4. data/.github/workflows/build.yml +8 -0
  5. data/.rubocop.yml +9 -0
  6. data/CHANGELOG.md +4 -0
  7. data/README.md +1 -1
  8. data/Rakefile +1 -0
  9. data/UNRELEASED.md +64 -38
  10. data/docs/async.md +109 -0
  11. data/docs/roda-sprockets.md +0 -2
  12. data/exe/opal +2 -0
  13. data/exe/opal-repl +2 -2
  14. data/lib/opal/builder.rb +5 -1
  15. data/lib/opal/builder_processors.rb +7 -2
  16. data/lib/opal/cache/file_cache.rb +119 -0
  17. data/lib/opal/cache.rb +71 -0
  18. data/lib/opal/cli.rb +35 -1
  19. data/lib/opal/cli_options.rb +21 -0
  20. data/lib/opal/cli_runners/chrome.rb +21 -14
  21. data/lib/opal/cli_runners/chrome_cdp_interface.js +30285 -0
  22. data/lib/opal/cli_runners/{chrome.js → chrome_cdp_interface.rb} +27 -6
  23. data/lib/opal/cli_runners/compiler.rb +2 -1
  24. data/lib/opal/cli_runners/gjs.rb +27 -0
  25. data/lib/opal/cli_runners/mini_racer.rb +36 -0
  26. data/lib/opal/cli_runners/source-map-support-browser.js +276 -91
  27. data/lib/opal/cli_runners/source-map-support-node.js +276 -91
  28. data/lib/opal/cli_runners/source-map-support.js +60 -18
  29. data/lib/opal/cli_runners.rb +2 -0
  30. data/lib/opal/compiler.rb +99 -10
  31. data/lib/opal/fragment.rb +77 -14
  32. data/lib/opal/nodes/args/extract_kwrestarg.rb +6 -4
  33. data/lib/opal/nodes/args/extract_restarg.rb +10 -12
  34. data/lib/opal/nodes/args.rb +28 -0
  35. data/lib/opal/nodes/base.rb +29 -5
  36. data/lib/opal/nodes/call.rb +123 -2
  37. data/lib/opal/nodes/case.rb +7 -1
  38. data/lib/opal/nodes/class.rb +12 -2
  39. data/lib/opal/nodes/def.rb +3 -23
  40. data/lib/opal/nodes/definitions.rb +21 -4
  41. data/lib/opal/nodes/helpers.rb +2 -2
  42. data/lib/opal/nodes/if.rb +39 -9
  43. data/lib/opal/nodes/iter.rb +15 -3
  44. data/lib/opal/nodes/lambda.rb +3 -1
  45. data/lib/opal/nodes/literal.rb +13 -7
  46. data/lib/opal/nodes/logic.rb +2 -2
  47. data/lib/opal/nodes/module.rb +12 -2
  48. data/lib/opal/nodes/rescue.rb +59 -34
  49. data/lib/opal/nodes/scope.rb +88 -6
  50. data/lib/opal/nodes/super.rb +52 -25
  51. data/lib/opal/nodes/top.rb +13 -7
  52. data/lib/opal/nodes/while.rb +7 -1
  53. data/lib/opal/parser/patch.rb +2 -1
  54. data/lib/opal/repl.rb +137 -49
  55. data/lib/opal/rewriters/binary_operator_assignment.rb +10 -10
  56. data/lib/opal/rewriters/block_to_iter.rb +3 -3
  57. data/lib/opal/rewriters/for_rewriter.rb +7 -7
  58. data/lib/opal/rewriters/js_reserved_words.rb +5 -3
  59. data/lib/opal/source_map/file.rb +7 -4
  60. data/lib/opal/source_map/map.rb +17 -3
  61. data/lib/opal/version.rb +1 -1
  62. data/opal/corelib/array.rb +2 -2
  63. data/opal/corelib/binding.rb +46 -0
  64. data/opal/corelib/boolean.rb +54 -4
  65. data/opal/corelib/class.rb +2 -0
  66. data/opal/corelib/constants.rb +2 -2
  67. data/opal/corelib/error.rb +98 -12
  68. data/opal/corelib/io.rb +250 -38
  69. data/opal/corelib/kernel/format.rb +5 -2
  70. data/opal/corelib/kernel.rb +44 -23
  71. data/opal/corelib/main.rb +5 -0
  72. data/opal/corelib/method.rb +1 -0
  73. data/opal/corelib/module.rb +28 -0
  74. data/opal/corelib/number.rb +12 -1
  75. data/opal/corelib/random/seedrandom.js.rb +2 -2
  76. data/opal/corelib/regexp.rb +47 -3
  77. data/opal/corelib/runtime.js +152 -12
  78. data/opal/corelib/string/encoding.rb +17 -17
  79. data/opal/corelib/string.rb +2 -0
  80. data/opal/corelib/struct.rb +10 -3
  81. data/opal/corelib/trace_point.rb +57 -0
  82. data/opal/opal/full.rb +2 -0
  83. data/package.json +3 -2
  84. data/spec/filters/bugs/array.rb +0 -1
  85. data/spec/filters/bugs/basicobject.rb +0 -1
  86. data/spec/filters/bugs/binding.rb +27 -0
  87. data/spec/filters/bugs/enumerator.rb +132 -0
  88. data/spec/filters/bugs/exception.rb +70 -93
  89. data/spec/filters/bugs/float.rb +0 -1
  90. data/spec/filters/bugs/kernel.rb +3 -9
  91. data/spec/filters/bugs/language.rb +15 -58
  92. data/spec/filters/bugs/main.rb +16 -0
  93. data/spec/filters/bugs/matrix.rb +39 -0
  94. data/spec/filters/bugs/method.rb +0 -2
  95. data/spec/filters/bugs/module.rb +36 -79
  96. data/spec/filters/bugs/proc.rb +0 -1
  97. data/spec/filters/bugs/regexp.rb +0 -16
  98. data/spec/filters/bugs/trace_point.rb +12 -0
  99. data/spec/filters/bugs/warnings.rb +0 -4
  100. data/spec/filters/unsupported/freeze.rb +2 -0
  101. data/spec/filters/unsupported/privacy.rb +4 -0
  102. data/spec/lib/compiler_spec.rb +7 -1
  103. data/spec/lib/repl_spec.rb +4 -2
  104. data/spec/lib/source_map/file_spec.rb +1 -1
  105. data/spec/mspec-opal/formatters.rb +18 -4
  106. data/spec/mspec-opal/runner.rb +2 -2
  107. data/spec/opal/core/boolean_spec.rb +44 -0
  108. data/spec/opal/core/hash_spec.rb +8 -0
  109. data/spec/opal/core/number/to_s_spec.rb +11 -0
  110. data/spec/opal/stdlib/json/ext_spec.rb +3 -3
  111. data/spec/opal/stdlib/logger/logger_spec.rb +10 -1
  112. data/spec/ruby_specs +18 -0
  113. data/stdlib/await.rb +83 -0
  114. data/stdlib/base64.rb +4 -4
  115. data/stdlib/bigdecimal/bignumber.js.rb +4 -2
  116. data/stdlib/bigdecimal.rb +1 -0
  117. data/stdlib/gjs/io.rb +33 -0
  118. data/stdlib/gjs/kernel.rb +5 -0
  119. data/stdlib/gjs.rb +2 -0
  120. data/stdlib/js.rb +4 -0
  121. data/stdlib/json.rb +3 -3
  122. data/stdlib/logger.rb +1 -1
  123. data/stdlib/nashorn/file.rb +2 -0
  124. data/stdlib/nodejs/env.rb +7 -0
  125. data/stdlib/nodejs/file.rb +6 -41
  126. data/stdlib/nodejs/io.rb +21 -5
  127. data/stdlib/nodejs/js-yaml-3-6-1.js +2 -2
  128. data/stdlib/opal/miniracer.rb +6 -0
  129. data/stdlib/opal/platform.rb +4 -0
  130. data/stdlib/opal/repl_js.rb +5 -0
  131. data/stdlib/opal/replutils.rb +271 -0
  132. data/stdlib/opal-parser.rb +24 -11
  133. data/stdlib/opal-platform.rb +8 -0
  134. data/stdlib/promise/v2.rb +16 -4
  135. data/stdlib/promise.rb +14 -0
  136. data/stdlib/stringio.rb +13 -110
  137. data/stdlib/thread.rb +29 -0
  138. data/tasks/building.rake +10 -4
  139. data/tasks/linting-parse-eslint-results.js +39 -0
  140. data/tasks/linting.rake +38 -28
  141. data/tasks/performance/asciidoctor_test.rb.erb +6 -0
  142. data/tasks/performance/optimization_status.rb +77 -0
  143. data/tasks/performance.rake +149 -0
  144. data/tasks/testing.rake +9 -1
  145. data/test/nodejs/test_await.rb +169 -0
  146. data/test/opal/promisev2/test_error.rb +9 -3
  147. data/test/opal/unsupported_and_bugs.rb +5 -0
  148. data/vendored-minitest/minitest/benchmark.rb +9 -7
  149. data/vendored-minitest/minitest/test.rb +14 -12
  150. data/vendored-minitest/minitest.rb +19 -16
  151. data/yarn.lock +686 -117
  152. metadata +60 -23
  153. data/.jshintrc +0 -41
  154. data/spec/filters/unsupported/refinements.rb +0 -8
  155. data/vendored-minitest/minitest/hell.rb +0 -11
  156. data/vendored-minitest/minitest/parallel.rb +0 -65
  157. data/vendored-minitest/minitest/pride.rb +0 -4
  158. data/vendored-minitest/minitest/pride_plugin.rb +0 -142
  159. data/vendored-minitest/minitest/unit.rb +0 -45
@@ -1,120 +1,97 @@
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:0x590>
4
- fails "An Exception reaching the top level the Exception#cause is printed to STDERR with backtraces" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x50c96>
5
- fails "An Exception reaching the top level with a custom backtrace is printed on STDERR" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x590>
6
- fails "Errno::EAGAIN is the same class as Errno::EWOULDBLOCK if they represent the same errno value"
7
- fails "Errno::EINVAL.new accepts an optional custom message and location"
8
- fails "Errno::EINVAL.new accepts an optional custom message"
9
- fails "Errno::EINVAL.new can be called with no arguments"
10
- fails "Errno::EMFILE can be subclassed"
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>
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>
10
+ fails "Errno::EMFILE can be subclassed" # NameError: uninitialized constant Errno::EMFILE
11
11
  fails "Errno::ENOTSUP is defined" # Expected Errno to have constant 'ENOTSUP' but it does not
12
12
  fails "Errno::ENOTSUP is the same class as Errno::EOPNOTSUPP if they represent the same errno value" # NameError: uninitialized constant Errno::ENOTSUP
13
- fails "Exception has the right class hierarchy" # NameError: uninitialized constant FiberError
14
- fails "Exception is a superclass of Interrupt"
15
- fails "Exception is a superclass of SystemStackError"
16
- fails "Exception#== returns true if both exceptions have the same class, no message, and no backtrace"
17
- fails "Exception#== returns true if both exceptions have the same class, the same message, and no backtrace"
18
- fails "Exception#== returns true if both exceptions have the same class, the same message, and the same backtrace"
19
- fails "Exception#== returns true if one exception is the dup'd copy of the other"
20
- fails "Exception#== returns true if the two objects subclass Exception and have the same message and backtrace"
21
- fails "Exception#backtrace captures the backtrace for an exception into $!" # Expected "RuntimeError: " =~ /backtrace_spec/ to be truthy but was nil
22
- fails "Exception#backtrace captures the backtrace for an exception into $@" # NoMethodError: undefined method `first' for nil
23
- fails "Exception#backtrace includes the filename of the location immediately prior to where self raised in the second element"
24
- fails "Exception#backtrace includes the filename of the location where self raised in the first element"
25
- fails "Exception#backtrace includes the line number of the location immediately prior to where self raised in the second element"
26
- fails "Exception#backtrace includes the line number of the location where self raised in the first element"
27
- fails "Exception#backtrace includes the name of the method from where self raised in the first element"
28
- fails "Exception#backtrace produces a backtrace for an exception captured using $!" # Expected "RuntimeError" to match /backtrace_spec/
29
- fails "Exception#backtrace returns an Array that can be updated" # Expected "RuntimeError" to equal "backtrace first"
30
- fails "Exception#backtrace returns nil if no backtrace was set"
31
- fails "Exception#backtrace returns the same array after duping"
32
- fails "Exception#backtrace_locations produces a backtrace for an exception captured using $!" # NoMethodError: undefined method `backtrace_locations' for #<RuntimeError: RuntimeError>
33
- fails "Exception#backtrace_locations returns an Array that can be updated" # NoMethodError: undefined method `backtrace_locations' for #<RuntimeError: RuntimeError>
34
- fails "Exception#backtrace_locations returns an Array" # NoMethodError: undefined method `backtrace_locations' for #<RuntimeError: RuntimeError>
35
- fails "Exception#backtrace_locations returns nil if no backtrace was set" # NoMethodError: undefined method `backtrace_locations' for #<RuntimeError: RuntimeError>
36
- fails "Exception#backtrace_locations sets each element to a Thread::Backtrace::Location" # NoMethodError: undefined method `backtrace_locations' for #<RuntimeError: RuntimeError>
37
- fails "Exception#cause is not set to the exception itself when it is re-raised" # NoMethodError: undefined method `cause' for #<RuntimeError: RuntimeError>
13
+ 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
+ fails "Exception#== returns true if both exceptions have the same class, the same message, and no backtrace" # Expected #<TypeError: message> == #<TypeError: message> to be truthy but was false
15
+ 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
16
+ 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
17
+ 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
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 captures the backtrace for an exception into $@" # Expected "<internal:corelib/kernel.rb>:536:23:in `new'" =~ /backtrace_spec/ to be truthy but was nil
20
+ 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
21
+ 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
22
+ 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
23
+ 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
24
+ 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
25
+ 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
26
+ 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
27
+ 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
38
28
  fails "Exception#cause is set for internal errors caused by user errors" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
39
29
  fails "Exception#cause is set for user errors caused by internal errors" # Expected RuntimeError but no exception was raised (Infinity was returned)
40
- fails "Exception#cause returns the active exception when an exception is raised"
41
- fails "Exception#dup does copy the backtrace" # Expected [] to equal ["InitializeException: my exception", " at TMP_13 (...)"]
42
- fails "Exception#dup does copy the cause" # NoMethodError: undefined method `cause' for #<RuntimeError: the consequence>
43
30
  fails "Exception#exception captures an exception into $!" # Expected "RuntimeError" == "" to be truthy but was false
44
- fails "Exception#full_message contains all the chain of exceptions" # NoMethodError: undefined method `full_message' for #<RuntimeError: last exception>
45
- fails "Exception#full_message contains cause of exception" # NoMethodError: undefined method `full_message' for #<RuntimeError: main exception>
46
- fails "Exception#full_message returns formatted string of exception using the same format that is used to print an uncaught exceptions to stderr" # NoMethodError: undefined method `full_message' for #<RuntimeError: Some runtime error>
47
- fails "Exception#full_message shows the caller if the exception has no backtrace"
48
- fails "Exception#full_message shows the exception class at the end of the first line of the message when the message contains multiple lines" # NoMethodError: undefined method `full_message' for #<RuntimeError: first line second line>
49
- fails "Exception#full_message supports :highlight option and adds escape sequences to highlight some strings" # NoMethodError: undefined method `full_message' for #<RuntimeError: Some runtime error>
50
- fails "Exception#full_message supports :order option and places the error message and the backtrace at the top or the bottom" # NoMethodError: undefined method `full_message' for #<RuntimeError: Some runtime error>
51
- fails "Exception#set_backtrace raises a TypeError when passed a Symbol"
52
- fails "Exception#set_backtrace raises a TypeError when the Array contains a Symbol"
53
- fails "Exception#to_s calls #to_s on the message" # Mock 'message' expected to receive 'to_s' exactly 1 times but received it 2 times
54
- fails "IOError is a superclass of EOFError"
55
- fails "Interrupt is a subclass of SignalException" # Expected Exception to equal SignalException
56
- fails "Interrupt is raised on the main Thread by the default SIGINT handler" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x2316>
57
- fails "Interrupt.new returns an instance of interrupt with no message given" # NoMethodError: undefined method `signo' for #<Interrupt: Interrupt>:Interrupt
58
- fails "Interrupt.new takes an optional message argument" # NoMethodError: undefined method `signo' for #<Interrupt: message>:Interrupt
31
+ 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"
32
+ 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
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>:539:23:in `new': first line " to include "ruby/core/exception/full_message_spec.rb:46:in `"
34
+ 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
35
+ fails "Exception#set_backtrace raises a TypeError when passed a Symbol" # Expected TypeError but no exception was raised ("unhappy" was returned)
36
+ fails "Exception#set_backtrace raises a TypeError when the Array contains a Symbol" # Expected TypeError but no exception was raised (["String", "unhappy"] was returned)
37
+ 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
38
+ fails "Interrupt is raised on the main Thread by the default SIGINT handler" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6b5e8>
39
+ fails "Interrupt.new returns an instance of interrupt with no message given" # NoMethodError: undefined method `signo' for #<Interrupt: Interrupt>
40
+ fails "Interrupt.new takes an optional message argument" # NoMethodError: undefined method `signo' for #<Interrupt: message>
59
41
  fails "KeyError accepts :receiver and :key options" # ArgumentError: no receiver is available
60
42
  fails "LocalJumpError#exit_value returns the value given to return" # Expected LocalJumpError but got: Exception (unexpected return)
61
43
  fails "LocalJumpError#reason returns 'return' for a return" # Expected LocalJumpError but got: Exception (unexpected return)
62
- fails "NameError#dup copies the name and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<MSpecEnv:0x262>>
63
- fails "NameError#name returns a class variable name as a symbol"
64
- fails "NameError#receiver returns a class when an undefined class variable is called in a subclass' namespace"
65
- fails "NameError#receiver returns a class when an undefined constant is called"
66
- fails "NameError#receiver returns the Object class when an undefined class variable is called"
67
- fails "NameError#receiver returns the Object class when an undefined constant is called without namespace"
68
- fails "NameError#receiver returns the object that raised the exception"
69
- fails "NameError#receiver returns the receiver when raised from #class_variable_get"
70
- fails "NameError#receiver returns the receiver when raised from #instance_variable_get"
71
- fails "NameError#to_s raises its own message for an undefined variable" # Expected "undefined method `not_defined' for #<MSpecEnv:0x54e>" =~ /undefined local variable or method `not_defined'/ to be truthy but was nil
44
+ fails "NameError#dup copies the name and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<MSpecEnv:0x69be8>>
45
+ fails "NameError#name returns a class variable name as a symbol" # Expected "binding" == "@@doesnt_exist" to be truthy but was false
46
+ 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>
47
+ fails "NameError#receiver returns a class when an undefined constant is called" # NoMethodError: undefined method `receiver' for #<NameError: uninitialized constant NameErrorSpecs::ReceiverClass::DoesntExist>
48
+ 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 constant is called without namespace" # NoMethodError: undefined method `receiver' for #<NameError: uninitialized constant DoesntExist>
50
+ 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 receiver when raised from #class_variable_get" # NoMethodError: undefined method `receiver' for #<NameError: `invalid_cvar_name' is not allowed as a class variable name>
52
+ 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>
53
+ 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
72
54
  fails "NameError.new accepts a :receiver keyword argument" # ArgumentError: [NameError#initialize] wrong number of arguments(3 for -2)
73
- fails "NoMethodError#dup copies the name, arguments and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<Object:0x230>>
74
- fails "NoMethodError#message uses #name to display the receiver if it is a class or a module" # Expected "undefined method `foo' for #<Class:0x8b870>" == "undefined method `foo' for MyClass:Class" to be truthy but was false
55
+ fails "NoMethodError#dup copies the name, arguments and receiver" # NoMethodError: undefined method `receiver' for #<NoMethodError: undefined method `foo' for #<Object:0x31eb8>>
56
+ 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
75
57
  fails "NoMethodError.new accepts a :receiver keyword argument" # NoMethodError: undefined method `receiver' for #<NoMethodError: msg>
76
- fails "SignalException can be rescued" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x278>
77
- fails "SignalException cannot be trapped with Signal.trap" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x278>
78
- fails "SignalException runs after at_exit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x278>
79
- fails "SignalException self-signals for USR1" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x278>
58
+ fails "SignalException can be rescued" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
59
+ fails "SignalException cannot be trapped with Signal.trap" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
60
+ fails "SignalException runs after at_exit" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
61
+ fails "SignalException self-signals for USR1" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x626ae>
80
62
  fails "SignalException#signm returns the signal name" # Expected SignalException but got: NoMethodError (undefined method `kill' for Process)
81
63
  fails "SignalException#signo returns the signal number" # Expected SignalException but got: NoMethodError (undefined method `kill' for Process)
82
- fails "SignalException.new raises an exception for an optional argument with a signal name"
83
- fails "SignalException.new raises an exception with an invalid first argument type" # Expected ArgumentError but no exception was raised (#<SignalException: #<Object:0x20000>> was returned)
84
- fails "SignalException.new raises an exception with an invalid signal name"
85
- fails "SignalException.new raises an exception with an invalid signal number"
86
- fails "SignalException.new takes a signal name with SIG prefix as the first argument"
87
- fails "SignalException.new takes a signal name without SIG prefix as the first argument"
88
- fails "SignalException.new takes a signal number as the first argument"
89
- fails "SignalException.new takes a signal symbol with SIG prefix as the first argument"
90
- fails "SignalException.new takes a signal symbol without SIG prefix as the first argument"
91
- fails "SignalException.new takes an optional message argument with a signal number"
92
- fails "StopIteration#result returns the method-returned-object from an Enumerator"
93
- fails "SystemCallError#backtrace is nil if not raised" # Expected ["SystemCallError: message", " from ruby/core/exception/system_call_error_spec.rb:141:5:in `new'", " from corelib/basic_object.rb:119:1:in `$instance_exec'", " from corelib/runtime.js:1729:5:in `Opal.send2'", " from corelib/runtime.js:1719:5:in `Opal.send'", " from mspec/runner/mspec.rb:114:7:in `instance_exec'", " from corelib/runtime.js:1729:5:in `Opal.send2'", " from corelib/runtime.js:1719:5:in `Opal.send'", " from mspec/runner/context.rb:176:34:in `protect'", " from corelib/runtime.js:1518:5:in `Opal.yieldX'", " from corelib/enumerable.rb:27:16:in `$$3'"] == nil to be truthy but was false
64
+ 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)
65
+ 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 signal name" # Expected ArgumentError but no exception was raised (#<SignalException: NONEXISTENT> was returned)
67
+ fails "SignalException.new raises an exception with an invalid signal number" # Expected ArgumentError but no exception was raised (#<SignalException: 100000> was returned)
68
+ fails "SignalException.new takes a signal name with SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: SIGINT>
69
+ fails "SignalException.new takes a signal name without SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: INT>
70
+ fails "SignalException.new takes a signal number as the first argument" # NoMethodError: undefined method `list' for Signal
71
+ fails "SignalException.new takes a signal symbol with SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: SIGINT>
72
+ fails "SignalException.new takes a signal symbol without SIG prefix as the first argument" # NoMethodError: undefined method `signo' for #<SignalException: INT>
73
+ fails "SignalException.new takes an optional message argument with a signal number" # NoMethodError: undefined method `list' for Signal
74
+ fails "StopIteration#result returns the method-returned-object from an Enumerator" # NoMethodError: undefined method `next' for #<Enumerator: #<Object:0x4fb42>:each>
75
+ 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
94
76
  fails "SystemCallError#dup copies the errno" # NoMethodError: undefined method `errno' for #<SystemCallError: message>
95
- fails "SystemCallError#errno returns nil when no errno given"
96
- fails "SystemCallError#errno returns the errno given as optional argument to new"
97
- fails "SystemCallError#message returns the default message when no message is given"
77
+ fails "SystemCallError#errno returns nil when no errno given" # NoMethodError: undefined method `errno' for #<SystemCallError: message>
78
+ fails "SystemCallError#errno returns the errno given as optional argument to new" # NoMethodError: undefined method `errno' for #<SystemCallError: message>
79
+ fails "SystemCallError#message returns the default message when no message is given" # Expected "268435456" =~ /Unknown error/i to be truthy but was nil
98
80
  fails "SystemCallError.=== returns false if errnos different" # NoMethodError: undefined method `+' for Errno
99
81
  fails "SystemCallError.=== returns true if errnos same" # Expected false == true to be truthy but was false
100
- fails "SystemCallError.new accepts an optional custom message preceding the errno"
101
- fails "SystemCallError.new accepts an optional third argument specifying the location"
102
- fails "SystemCallError.new accepts single Fixnum argument as errno"
82
+ fails "SystemCallError.new accepts an optional custom message preceding the errno" # Expected #<SystemCallError: custom message> (SystemCallError) to be an instance of Errno::EINVAL
83
+ fails "SystemCallError.new accepts an optional third argument specifying the location" # Expected #<SystemCallError: custom message> (SystemCallError) to be an instance of Errno::EINVAL
103
84
  fails "SystemCallError.new accepts single Integer argument as errno" # NoMethodError: undefined method `errno' for #<SystemCallError: -16777216>
104
85
  fails "SystemCallError.new coerces location if it is not a String" # Expected "foo" =~ /@ not_a_string - foo/ to be truthy but was nil
105
- fails "SystemCallError.new constructs the appropriate Errno class"
86
+ fails "SystemCallError.new constructs the appropriate Errno class" # Expected #<SystemCallError: Errno> (SystemCallError) to be an instance of Errno::EINVAL
106
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
107
88
  fails "SystemCallError.new converts to Integer if errno is a Float" # Expected #<SystemCallError: foo> == #<SystemCallError: foo> to be truthy but was false
108
89
  fails "SystemCallError.new raises RangeError if errno is a Complex not convertible to Integer" # Expected RangeError (/can't convert/) but no exception was raised (#<SystemCallError: foo> was returned)
109
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)
110
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)
111
- fails "SystemCallError.new requires at least one argument"
112
- fails "SystemExit sets the exit status and exits silently when raised when subclassed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x542>
113
- fails "SystemExit sets the exit status and exits silently when raised" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x542>
114
- fails "SystemStackError is a subclass of Exception"
115
- fails "UncaughtThrowError#tag returns the object thrown" # NoMethodError: undefined method `tag' for #<UncaughtThrowError: uncaught throw "abc">:UncaughtThrowError
116
- fails "rescueing Interrupt raises an Interrupt when sent a signal SIGINT" # NoMethodError: undefined method `kill' for Process
117
- fails "rescueing SignalException raises a SignalException when sent a signal"
92
+ fails "SystemCallError.new requires at least one argument" # Expected ArgumentError but no exception was raised (#<SystemCallError: SystemCallError> was returned)
93
+ fails "SystemExit sets the exit status and exits silently when raised when subclassed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6edd2>
94
+ fails "SystemExit sets the exit status and exits silently when raised" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6edd2>
118
95
  fails_badly "SystemExit#status returns the exit status"
119
96
  fails_badly "SystemExit#success? returns false if the process exited unsuccessfully"
120
97
  fails_badly "SystemExit#success? returns true if the process exited successfully"
@@ -4,7 +4,6 @@ opal_filter "Float" do
4
4
  fails "Float constant MIN is 2.2250738585072014e-308"
5
5
  fails "Float#<=> raises TypeError when #coerce misbehaves" # Expected TypeError (coerce must return [x, y]) but no exception was raised (nil was returned)
6
6
  fails "Float#divmod returns an [quotient, modulus] from dividing self by other" # precision errors caused by Math.frexp and Math.ldexp
7
- fails "Float#inspect emits '-' for -0.0" # Expected "0" == "-0.0" to be truthy but was false
8
7
  fails "Float#inspect emits a trailing '.0' for a whole number" # Expected "50" == "50.0" to be truthy but was false
9
8
  fails "Float#inspect emits a trailing '.0' for the mantissa in e format" # Expected "100000000000000000000" == "1.0e+20" to be truthy but was false
10
9
  fails "Float#inspect encoding returns a String in US-ASCII encoding when Encoding.default_internal is nil" # NoMethodError: undefined method `default_internal' for Encoding
@@ -71,16 +71,10 @@ opal_filter "Kernel" do
71
71
  fails "Kernel#eval activates refinements from the binding" # NoMethodError: undefined method `refine' for #<Module:0x1ad8>
72
72
  fails "Kernel#eval activates refinements from the eval scope" # NoMethodError: undefined method `refine' for #<Module:0x20d4>
73
73
  fails "Kernel#eval allows a binding to be captured inside an eval"
74
- fails "Kernel#eval allows creating a new class in a binding created by #eval"
75
- fails "Kernel#eval allows creating a new class in a binding"
76
74
  fails "Kernel#eval can be aliased"
77
- fails "Kernel#eval does not alter the value of __FILE__ in the binding"
78
- fails "Kernel#eval does not make Proc locals visible to evaluated code"
79
75
  fails "Kernel#eval does not share locals across eval scopes"
80
76
  fails "Kernel#eval doesn't accept a Proc object as a binding"
81
77
  fails "Kernel#eval evaluates string with given filename and negative linenumber" # NameError: uninitialized constant TOPLEVEL_BINDING
82
- fails "Kernel#eval finds a local in an enclosing scope"
83
- fails "Kernel#eval finds locals in a nested eval"
84
78
  fails "Kernel#eval includes file and line information in syntax error"
85
79
  fails "Kernel#eval raises a LocalJumpError if there is no lambda-style closure in the chain"
86
80
  fails "Kernel#eval unwinds through a Proc-style closure and returns from a lambda-style closure in the closure chain"
@@ -88,7 +82,6 @@ opal_filter "Kernel" do
88
82
  fails "Kernel#eval updates a local in a scope above when modified in a nested block scope"
89
83
  fails "Kernel#eval updates a local in a surrounding block scope"
90
84
  fails "Kernel#eval updates a local in an enclosing scope"
91
- fails "Kernel#eval uses (eval) filename if none is provided" # NoMethodError: undefined method `binding' for #<MSpecEnv:0x50788>
92
85
  fails "Kernel#eval uses the filename of the binding if none is provided"
93
86
  fails "Kernel#eval uses the same scope for local variables when given the same binding"
94
87
  fails "Kernel#eval with a magic encoding comment allows a magic encoding comment and a frozen_string_literal magic comment on the same line in emacs style" # Opal::SyntaxError: unexpected token $end
@@ -100,6 +93,8 @@ opal_filter "Kernel" do
100
93
  fails "Kernel#eval with a magic encoding comment ignores the frozen_string_literal magic comment if it appears after a token and warns if $VERBOSE is true" # Expected warning to match: /warning: `frozen_string_literal' is ignored after any tokens/ but got: ""
101
94
  fails "Kernel#eval with a magic encoding comment ignores the magic encoding comment if it is after a frozen_string_literal magic comment" # Opal::SyntaxError: unexpected token $end
102
95
  fails "Kernel#eval with a magic encoding comment uses the magic comment encoding for parsing constants" # Opal::SyntaxError: unexpected token $end
96
+ fails "Kernel#eval with refinements activates refinements from the binding" # NoMethodError: undefined method `foo' for #<EvalSpecs::A:0x26588>
97
+ fails "Kernel#eval with refinements activates refinements from the eval scope" # NoMethodError: undefined method `foo' for #<EvalSpecs::A:0x26698>
103
98
  fails "Kernel#extend does not calls append_features on arguments metaclass"
104
99
  fails "Kernel#extend raises an ArgumentError when no arguments given"
105
100
  fails "Kernel#fail accepts an Object with an exception method returning an Exception" # TypeError: exception class/object expected
@@ -145,7 +140,6 @@ opal_filter "Kernel" do
145
140
  fails "Kernel#raise accepts a cause keyword argument that overrides the last exception" # NoMethodError: undefined method `cause' for #<RuntimeError: error>
146
141
  fails "Kernel#raise accepts a cause keyword argument that sets the cause" # NoMethodError: undefined method `cause' for #<RuntimeError: error>
147
142
  fails "Kernel#raise passes no arguments to the constructor when given only an exception class" # Expected #<Class:0x4c8> but got: ArgumentError ([#initialize] wrong number of arguments(1 for 0))
148
- fails "Kernel#raise raises RuntimeError if no exception class is given" # RuntimeError: RuntimeError
149
143
  fails "Kernel#raise raises an ArgumentError when only cause is given" # Expected ArgumentError but got: TypeError (exception class/object expected)
150
144
  fails "Kernel#raise re-raises a previously rescued exception without overwriting the backtrace" # Expected "RuntimeError: raised" to include "ruby/shared/kernel/raise.rb:65:"
151
145
  fails "Kernel#respond_to? throws a type error if argument can't be coerced into a Symbol"
@@ -264,7 +258,6 @@ opal_filter "Kernel" do
264
258
  fails "Kernel#then returns a sized Enumerator when no block given" # NoMethodError: undefined method `then' for #<Object:0x22882>
265
259
  fails "Kernel#warn :uplevel keyword argument converts first arg using to_s" # Expected: $stderr: /core\/kernel\/fixtures\/classes.rb:441: warning: false/ got: $stderr: "ruby/core/kernel/fixtures/classes.rb:441:7:in `warn': warning: false\n"
266
260
  fails "Kernel#warn :uplevel keyword argument converts value to Integer" # TypeError: no implicit conversion of Number into Integer
267
- fails "Kernel#warn :uplevel keyword argument does not prepend caller information if the uplevel argument is too large" # Expected: $stderr: "warning: foo\n" got: $stderr: "ruby/core/kernel/fixtures/classes.rb:441:7:in `warn': warning: foo\n"
268
261
  fails "Kernel#warn :uplevel keyword argument prepends a message with specified line from the backtrace" # Expected: $stderr: /core\/kernel\/fixtures\/classes.rb:441: warning: foo/ got: $stderr: "ruby/core/kernel/fixtures/classes.rb:441:7:in `warn': warning: foo\n"
269
262
  fails "Kernel#warn :uplevel keyword argument prepends even if a message is empty or nil" # Expected: $stderr: /core\/kernel\/fixtures\/classes.rb:441: warning: \n$/ got: $stderr: "ruby/core/kernel/fixtures/classes.rb:441:7:in `warn': warning: \n"
270
263
  fails "Kernel#warn :uplevel keyword argument raises if :category keyword is not nil and not convertible to symbol" # Expected TypeError but no exception was raised (nil was returned)
@@ -361,6 +354,7 @@ opal_filter "Kernel" do
361
354
  fails "Kernel.lambda returns from the lambda itself, not the creation site of the lambda"
362
355
  fails "Kernel.lambda returns the passed Proc if given an existing Proc through super" # Expected true to be false
363
356
  fails "Kernel.lambda returns the passed Proc if given an existing Proc" # Expected true to be false
357
+ fails "Kernel.lambda treats the block as a Proc when lambda is re-defined" # Expected 2 == 1 to be truthy but was false
364
358
  fails "Kernel.loop returns StopIteration#result, the result value of a finished iterator" # requires changes in enumerator.rb
365
359
  fails "Kernel.printf calls write on the first argument when it is not a string"
366
360
  fails "Kernel.printf formatting io is not specified other formats s preserves encoding of the format string" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT (dummy)> to be truthy but was false
@@ -59,7 +59,6 @@ opal_filter "language" do
59
59
  fails "A method assigns local variables from method parameters for definition \n def m(a, b = nil, c = nil, d, e: nil, **f)\n [a, b, c, d, e, f]\n end" # Exception: Cannot read property '$$is_array' of undefined
60
60
  fails "A method assigns the last Hash to the last optional argument if the Hash contains non-Symbol keys and is not passed as keywords" # Exception: Object.defineProperty called on non-object
61
61
  fails "A method definition in an eval creates a class method"
62
- fails "A method definition in an eval creates a singleton method"
63
62
  fails "A method definition in an eval creates an instance method"
64
63
  fails "A method raises ArgumentError if passing hash as keyword arguments for definition 'def m(a: nil); a; end'" # Expected ArgumentError but no exception was raised (1 was returned)
65
64
  fails "A method when passing an empty keyword splat to a method that does not accept keywords for definition 'def m(*a); a; end'" # Expected [{}] == [] to be truthy but was false
@@ -76,12 +75,10 @@ opal_filter "language" do
76
75
  fails "A singleton method definition can be declared for a global variable"
77
76
  fails "A singleton method definition raises FrozenError with the correct class name" # Expected FrozenError but no exception was raised ("foo" was returned)
78
77
  fails "Allowed characters allows non-ASCII lowercased characters at the beginning" # Expected nil == 1 to be truthy but was false
79
- fails "Allowed characters allows not ASCII characters in the middle of a name" # NoMethodError: undefined method `mod' for #<MSpecEnv:0xa920>
80
78
  fails "Allowed characters allows not ASCII upcased characters at the beginning" # NameError: wrong constant name ἍBB
81
79
  fails "Allowed characters does not allow non-ASCII upcased characters at the beginning" # Expected SyntaxError (/dynamic constant assignment/) but no exception was raised ("test" was returned)
82
80
  fails "An ensure block inside 'do end' block is executed even when a symbol is thrown in it's corresponding begin block" # Expected ["begin", "rescue", "ensure"] to equal ["begin", "ensure"]
83
81
  fails "An ensure block inside a begin block is executed even when a symbol is thrown in it's corresponding begin block"
84
- fails "An ensure block inside a begin block sets exception cause if raises exception in block and in ensure" # NoMethodError: undefined method `cause' for #<RuntimeError: from ensure>
85
82
  fails "An ensure block inside a class is executed even when a symbol is thrown" # Expected ["class", "rescue", "ensure"] to equal ["class", "ensure"]
86
83
  fails "An instance method definition with a splat requires the presence of any arguments that precede the *" # ArgumentError: [MSpecEnv#foo] wrong number of arguments(1 for -3)
87
84
  fails "An instance method raises FrozenError with the correct class name" # Expected FrozenError but no exception was raised (#<Module:0x225b4> was returned)
@@ -202,34 +199,23 @@ opal_filter "language" do
202
199
  fails "NoMethodError#message fallbacks to a simpler representation of the receiver when receiver.inspect raises an exception" # NoMethodError: undefined method `name' for #<NoMethodErrorSpecs::InstanceException: NoMethodErrorSpecs::InstanceException>
203
200
  fails "Numbered parameters does not support more than 9 parameters" # Expected NameError (/undefined local variable or method `_10'/) but got: NoMethodError (undefined method `_10' for #<MSpecEnv:0x5d700>)
204
201
  fails "Operators * / % are left-associative"
202
+ fails "Operators <=> == === != =~ !~ have higher precedence than &&" # Expected false == false to be falsy but was true
205
203
  fails "Optional constant assignment with ||= causes side-effects of the module part to be applied (for nil constant)" # Expected 3 == 1 to be truthy but was false
206
204
  fails "Optional constant assignment with ||= causes side-effects of the module part to be applied only once (for undefined constant)" # Expected 2 == 1 to be truthy but was false
207
205
  fails "Optional variable assignments using compounded constants with &&= assignments" # Expected warning to match: /already initialized constant/ but got: ""
208
206
  fails "Optional variable assignments using compounded constants with operator assignments" # Expected warning to match: /already initialized constant/ but got: ""
209
207
  fails "Optional variable assignments using compunded constants with ||= assignments"
210
- fails "Pattern matching Array pattern accepts a subclass of Array from #deconstruct" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
211
- fails "Pattern matching Array pattern calls #deconstruct even on objects that are already an array" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
212
- fails "Pattern matching Array pattern calls #deconstruct once for multiple patterns, caching the result" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
213
- fails "Pattern matching Array pattern does not match object if elements of array returned by #deconstruct method does not match elements in pattern" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
214
- fails "Pattern matching Array pattern does not match object without #deconstruct method" # Mock '#<Object:0x239ca>' expected to receive respond_to?("deconstruct") exactly 1 times but received it 0 times
215
- fails "Pattern matching Array pattern matches an object with #deconstruct method which returns an array and each element in array matches element in pattern" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
216
- fails "Pattern matching Array pattern raises TypeError if #deconstruct method does not return array" # Expected TypeError (/deconstruct must return Array/) but got: NoMethodError (undefined method `obj' for #<MSpecEnv:0x1af0a>)
217
- fails "Pattern matching Hash pattern calls #deconstruct_keys per pattern" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
218
- fails "Pattern matching Hash pattern does not match object if #deconstruct_keys method does not return Hash" # Expected TypeError (/deconstruct_keys must return Hash/) but got: NoMethodError (undefined method `obj' for #<MSpecEnv:0x1af0a>)
219
- fails "Pattern matching Hash pattern does not match object if #deconstruct_keys method returns Hash with non-symbol keys" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
220
- fails "Pattern matching Hash pattern does not match object if elements of Hash returned by #deconstruct_keys method does not match values in pattern" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
221
- fails "Pattern matching Hash pattern does not match object without #deconstruct_keys method" # Mock '#<Object:0x29382>' expected to receive respond_to?("deconstruct_keys") exactly 1 times but received it 0 times
222
- fails "Pattern matching Hash pattern matches an object with #deconstruct_keys method which returns a Hash with equal keys and each value in Hash matches value in pattern" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
223
- fails "Pattern matching Hash pattern passes keys specified in pattern as arguments to #deconstruct_keys method" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
224
- fails "Pattern matching Hash pattern passes keys specified in pattern to #deconstruct_keys method if pattern contains double splat operator **" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
225
- fails "Pattern matching Hash pattern passes nil to #deconstruct_keys method if pattern contains double splat operator **rest" # NoMethodError: undefined method `obj' for #<MSpecEnv:0x1af0a>
226
- fails "Pattern matching Hash pattern raise SyntaxError when keys duplicate in pattern" # Expected SyntaxError (/duplicated key name/) but got: Opal::SyntaxError (duplicate hash pattern key a)
208
+ fails "Pattern matching Array pattern calls #deconstruct once for multiple patterns, caching the result" # Expected ["deconstruct", "deconstruct"] == ["deconstruct"] to be truthy but was false
209
+ fails "Pattern matching Array pattern raises TypeError if #deconstruct method does not return array" # Expected TypeError (/deconstruct must return Array/) but no exception was raised (nil was returned)
210
+ fails "Pattern matching Hash pattern does not match object if #deconstruct_keys method does not return Hash" # Expected TypeError (/deconstruct_keys must return Hash/) but got: NoMethodError (undefined method `key?' for "")
211
+ fails "Pattern matching Hash pattern does not match object if #deconstruct_keys method returns Hash with non-symbol keys" # Expected true == false to be truthy but was false
212
+ fails "Pattern matching Hash pattern raise SyntaxError when keys duplicate in pattern" # Expected SyntaxError (/duplicated key name/) but got: SyntaxError (duplicate hash pattern key a)
227
213
  fails "Pattern matching alternative pattern does not support variable binding" # Expected SyntaxError (/illegal variable in alternative pattern/) but no exception was raised (nil was returned)
228
- fails "Pattern matching cannot mix in and when operators" # Expected SyntaxError (/syntax error, unexpected `in'/) but got: Opal::SyntaxError (unexpected token kIN)
214
+ fails "Pattern matching cannot mix in and when operators" # Expected SyntaxError (/syntax error, unexpected `in'/) but got: SyntaxError (unexpected token kIN)
229
215
  fails "Pattern matching variable pattern allows applying ^ operator to bound variables" # NoMatchingPatternError: [1, 1]
230
- fails "Pattern matching variable pattern does not support using variable name (except _) several times" # Expected SyntaxError (/duplicated variable name/) but got: Opal::SyntaxError (duplicate variable name a)
231
- fails "Pattern matching variable pattern requires bound variable to be specified in a pattern before ^ operator when it relies on a bound variable" # Expected SyntaxError (/n: no such local variable/) but got: Opal::SyntaxError (no such local variable: `n')
232
- fails "Pattern matching variable pattern supports existing variables in a pattern specified with ^ operator" # Opal::SyntaxError: no such local variable: `a'
216
+ fails "Pattern matching variable pattern does not support using variable name (except _) several times" # Expected SyntaxError (/duplicated variable name/) but got: SyntaxError (duplicate variable name a)
217
+ fails "Pattern matching variable pattern requires bound variable to be specified in a pattern before ^ operator when it relies on a bound variable" # Expected SyntaxError (/n: no such local variable/) but got: SyntaxError (no such local variable: `n')
218
+ fails "Pattern matching variable pattern supports existing variables in a pattern specified with ^ operator" # SyntaxError: no such local variable: `a'
233
219
  fails "Pattern matching warning warns about pattern matching is experimental feature" # NameError: uninitialized constant Warning
234
220
  fails "Post-args with optional args with a circular argument reference shadows an existing local with the same name as the argument"
235
221
  fails "Post-args with optional args with a circular argument reference shadows an existing method with the same name as the argument"
@@ -261,8 +247,6 @@ opal_filter "language" do
261
247
  fails "Ruby String interpolation returns a string with the source encoding by default" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT (dummy)> to be truthy but was false
262
248
  fails "Ruby String interpolation returns a string with the source encoding, even if the components have another encoding" # ArgumentError: unknown encoding name - euc-jp
263
249
  fails "Safe navigator allows assignment methods"
264
- fails "Safe navigator allows assignment operators"
265
- fails "Safe navigator does not call the operator method lazily with an assignment operator"
266
250
  fails "Struct#deconstruct_keys requires one argument" # Expected ArgumentError (/wrong number of arguments \(given 0, expected 1\)/) but got: ArgumentError ([#deconstruct_keys] wrong number of arguments(0 for 1))
267
251
  fails "The =~ operator with named captures on syntax of 'string_literal' =~ /regexp/ does not set local variables" # Exception: named captures are not supported in javascript: "(?<matched>foo)(?<unmatched>bar)?"
268
252
  fails "The =~ operator with named captures on syntax of /regexp/ =~ string_variable sets local variables by the captured pairs"
@@ -317,54 +301,24 @@ opal_filter "language" do
317
301
  fails "The defined? keyword for variables returns nil for a global variable that has been read but not assigned to"
318
302
  fails "The defined? keyword for variables when a Regexp matches a String returns nil for non-captures"
319
303
  fails "The defined? keyword for variables when a String matches a Regexp returns nil for non-captures"
320
- fails "The if expression accepts multiple assignments in conditional expression with nil values" # NoMethodError: undefined method `ary' for #<MSpecEnv:0x50754>
321
- fails "The if expression accepts multiple assignments in conditional expression with non-nil values" # NoMethodError: undefined method `ary' for #<MSpecEnv:0x50754>
322
- fails "The if expression with a boolean range ('flip-flop' operator) allows combining two flip-flops"
323
304
  fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with exclusive-end range"
324
305
  fails "The if expression with a boolean range ('flip-flop' operator) evaluates the first conditions lazily with inclusive-end range"
325
- fails "The if expression with a boolean range ('flip-flop' operator) evaluates the second conditions lazily with exclusive-end range"
326
- fails "The if expression with a boolean range ('flip-flop' operator) evaluates the second conditions lazily with inclusive-end range"
327
- fails "The if expression with a boolean range ('flip-flop' operator) keeps flip-flops from interfering"
328
- fails "The if expression with a boolean range ('flip-flop' operator) mimics a sed conditional with a many-element exclusive-end range"
329
- fails "The if expression with a boolean range ('flip-flop' operator) mimics a sed conditional with a zero-element exclusive-end range"
330
- fails "The if expression with a boolean range ('flip-flop' operator) mimics an awk conditional with a many-element inclusive-end range"
331
- fails "The if expression with a boolean range ('flip-flop' operator) mimics an awk conditional with a single-element inclusive-end range"
332
- fails "The if expression with a boolean range ('flip-flop' operator) scopes state by flip-flop"
333
306
  fails "The or operator has a lower precedence than 'next' in 'next true or false'"
334
- fails "The predefined global constants includes TOPLEVEL_BINDING"
335
- fails "The redo statement in a method is invalid and raises a SyntaxError"
307
+ fails "The redo statement in a method is invalid and raises a SyntaxError" # Expected SyntaxError but no exception was raised ("m" was returned)
336
308
  fails "The redo statement triggers ensure block when re-executing a block"
309
+ fails "The rescue keyword allows rescue in 'do end' block" # NoMethodError: undefined method `call' for nil
337
310
  fails "The rescue keyword can capture the raised exception using a setter method" # NoMethodError: undefined method `message' for nil
338
311
  fails "The rescue keyword can capture the raised exception using a square brackets setter" # ArgumentError: [SquareBracketsCaptor#[]=] wrong number of arguments(1 for 2)
339
312
  fails "The rescue keyword inline form can be inlined" # Expected Infinity to equal 1
340
313
  fails "The rescue keyword only accepts Module or Class in rescue clauses" # RuntimeError: error
341
314
  fails "The rescue keyword only accepts Module or Class in splatted rescue clauses" # RuntimeError: error
342
315
  fails "The rescue keyword rescues the exception in the deepest rescue block declared to handle the appropriate exception type" # Expected "StandardError: an error occurred" to include ":in `raise_standard_error'"
343
- fails "The rescue keyword suppresses exception from block when raises one from rescue expression" # NoMethodError: undefined method `cause' for #<RuntimeError: from rescue expression>
344
316
  fails "The rescue keyword will execute an else block even without rescue and ensure" # Expected warning to match: /else without rescue is useless/ but got: ""
345
- fails "The rescue keyword without rescue expression will not rescue exceptions except StandardError" # NameError: uninitialized constant SystemStackError
346
- fails "The retry keyword inside a begin block's rescue block causes the begin block to be executed again"
347
- fails "The retry statement raises a SyntaxError when used outside of a begin statement"
348
- fails "The retry statement re-executes the closest block"
349
317
  fails "The return keyword at top level return with argument warns but does not affect exit status" # Exception: path.substr is not a function
350
318
  fails "The return keyword at top level within a block within a class is allowed" # Exception: path.substr is not a function
351
319
  fails "The return keyword at top level within a block within a class is not allowed" # Exception: path.substr is not a function
352
- fails "The super keyword passes along modified rest args when they were originally empty"
353
- fails "The super keyword passes along modified rest args when they weren't originally empty"
354
- fails "The super keyword passes along reassigned rest args" # Expected ["bar"] to equal ["foo"]
355
320
  fails "The super keyword uses block argument given to method when used in a block" # LocalJumpError: no block given
356
321
  fails "The super keyword uses given block even if arguments are passed explicitly"
357
- fails "The super keyword when using keyword arguments passes any given keyword arguments including optional and required ones to the parent"
358
- fails "The super keyword when using keyword arguments passes default argument values to the parent" # Expected {} to equal {"b"=>"b"}
359
- fails "The super keyword when using regular and keyword arguments passes default argument values to the parent" # Expected ["a", {}] to equal ["a", {"c"=>"c"}]
360
- fails "The super keyword without explicit arguments passes arguments and rest arguments including any modifications"
361
- fails "The super keyword without explicit arguments passes arguments, rest arguments including modifications, and post arguments" # Expected [1, 2, 3] == [1, 14, 3] to be truthy but was false
362
- fails "The super keyword without explicit arguments passes optional arguments that have a default value but were modified"
363
- fails "The super keyword without explicit arguments passes optional arguments that have a default value"
364
- fails "The super keyword without explicit arguments passes optional arguments that have a non-default value but were modified"
365
- fails "The super keyword without explicit arguments passes rest arguments including any modifications"
366
- fails "The super keyword without explicit arguments that are '_' including any modifications" # Expected [1, 2] to equal [14, 2]
367
- fails "The super keyword wraps into array and passes along reassigned rest args with non-array scalar value" # Expected ["bar"] to equal ["foo"]
368
322
  fails "The throw keyword raises an UncaughtThrowError if used to exit a thread" # NotImplementedError: Thread creation not available
369
323
  fails "The unpacking splat operator (*) when applied to a BasicObject coerces it to Array if it respond_to?(:to_a)" # NoMethodError: undefined method `respond_to?' for BasicObject
370
324
  fails "The until expression restarts the current iteration without reevaluating condition with redo"
@@ -381,6 +335,9 @@ opal_filter "language" do
381
335
  fails "self.send(:block_given?) returns false when a method defined by define_method is called with a block"
382
336
  fails "self.send(:block_given?) returns true if and only if a block is supplied"
383
337
  fails "top-level constant lookup on a class does not search Object after searching other scopes" # Expected NameError but no exception was raised (Hash was returned)
338
+ fails_badly "Pattern matching refinements are used for #=== in constant pattern"
339
+ fails_badly "Pattern matching refinements are used for #deconstruct"
340
+ fails_badly "Pattern matching refinements are used for #deconstruct_keys"
384
341
  fails_badly "The while expression stops running body if interrupted by break in a begin ... end attribute op-assign-or value"
385
342
  fails_badly "The while expression stops running body if interrupted by break in a parenthesized attribute op-assign-or value"
386
343
  fails_badly "The while expression stops running body if interrupted by break with unless in a begin ... end attribute op-assign-or value"
@@ -0,0 +1,16 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "main" do
3
+ fails "main#include in a file loaded with wrapping includes the given Module in the load wrapper" # ArgumentError: [MSpecEnv#load] wrong number of arguments(2 for 1)
4
+ fails "main#private raises a NameError when at least one of given method names is undefined" # Expected NameError but no exception was raised (nil was returned)
5
+ fails "main#private returns Object" # Expected nil to be identical to Object
6
+ fails "main#private when multiple arguments are passed sets the visibility of the given methods to private" # Expected Object to have private method 'main_public_method' but it does not
7
+ fails "main#private when single argument is passed and is an array sets the visibility of the given methods to private" # Expected Object to have private method 'main_public_method' but it does not
8
+ fails "main#private when single argument is passed and it is not an array sets the visibility of the given methods to private" # Expected Object to have private method 'main_public_method' but it does not
9
+ fails "main#public raises a NameError when given an undefined name" # Expected NameError but no exception was raised (nil was returned)
10
+ fails "main#public returns Object" # Expected nil to be identical to Object
11
+ fails "main.ruby2_keywords is the same as Object.ruby2_keywords" # Expected main to have private method 'ruby2_keywords' but it does not
12
+ fails "main.using does not propagate refinements of new modules added after it is called" # Expected "quux" == "bar" to be truthy but was false
13
+ fails "main.using requires one Module argument" # Expected TypeError but no exception was raised (main was returned)
14
+ fails "main.using uses refinements from the given module for method calls in the target file" # LoadError: cannot load such file -- ruby/core/main/fixtures/string_refinement_user
15
+ fails "main.using uses refinements from the given module only in the target file" # LoadError: cannot load such file -- ruby/core/main/fixtures/string_refinement_user
16
+ end
@@ -0,0 +1,39 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "Matrix" do
3
+ fails "Matrix#** returns the power for non integer powers" # RangeError: can't convert 7.000000000000007+8.881784197001252e-16i into Float
4
+ fails "Matrix#/ returns the result of dividing self by a Bignum" # Expected Matrix[[1.0842021724855044e-19, 2.168404344971009e-19], [3.2526065174565133e-19, 4.336808689942018e-19]] == Matrix[[0, 0], [0, 0]] to be truthy but was false
5
+ fails "Matrix#/ returns the result of dividing self by a Fixnum" # Expected Matrix[[0.5, 1], [1.5, 2]] == Matrix[[0, 1], [1, 2]] to be truthy but was false
6
+ fails "Matrix#antisymmetric? returns false for non-antisymmetric matrices" # Expected true to be false
7
+ fails "Matrix#each returns an Enumerator when called without a block" # ArgumentError: tried to create a Proc object without a block
8
+ fails "Matrix#each returns self" # ArgumentError: tried to create a Proc object without a block
9
+ fails "Matrix#each yields the elements starting with the those of the first row" # ArgumentError: tried to create a Proc object without a block
10
+ fails "Matrix#each_with_index with an argument raises an ArgumentError for unrecognized argument" # Expected ArgumentError but no exception was raised (Matrix[[1, 2, 3, 4], [5, 6, 7, 8]] was returned)
11
+ fails "Matrix#eql? returns false if some elements are == but not eql?" # Expected true to be false
12
+ fails "Matrix#find_index with a subselection argument and a generic argument returns the index of the requested value" # ArgumentError: [Matrix#[]] wrong number of arguments(0 for 2)
13
+ fails "Matrix#find_index with a subselection argument and no generic argument returns the first index for which the block returns true" # ArgumentError: [Matrix#[]] wrong number of arguments(0 for 2)
14
+ fails "Matrix#find_index with only a generic argument ignores a block" # Expected nil == [0, 3] to be truthy but was false
15
+ fails "Matrix#find_index with only a generic argument returns the first index for of the requested value" # Expected nil == [0, 2] to be truthy but was false
16
+ fails "Matrix#find_index with two arguments raises an ArgumentError for an unrecognized last argument" # Expected ArgumentError but no exception was raised (nil was returned)
17
+ fails "Matrix#find_index without any argument returns the first index for which the block is true" # Expected nil == [0, 2] to be truthy but was false
18
+ fails "Matrix#hash returns an Integer" # Expected "A,A,3,5" (String) to be an instance of Integer
19
+ fails "Matrix#real? returns false if one element is a Complex whose imaginary part is 0" # ArgumentError: tried to create a Proc object without a block
20
+ fails "Matrix#real? returns false if one element is a Complex" # ArgumentError: tried to create a Proc object without a block
21
+ fails "Matrix#real? returns true for empty matrices" # ArgumentError: tried to create a Proc object without a block
22
+ fails "Matrix#real? returns true for matrices with all real entries" # ArgumentError: tried to create a Proc object without a block
23
+ fails "Matrix.diagonal? returns false for a non diagonal square Matrix" # Expected true to be false
24
+ fails "Matrix.hermitian? returns false for a matrix with complex values on the diagonal" # Expected true to be false
25
+ fails "Matrix.hermitian? returns false for an asymmetric Matrix" # Expected true to be false
26
+ fails "Matrix.lower_triangular? returns false for a non lower triangular square Matrix" # Expected true to be false
27
+ fails "Matrix.symmetric? returns false for an asymmetric Matrix" # Expected true to be false
28
+ fails "Matrix.upper_triangular? returns false for a non upper triangular square Matrix" # Expected true to be false
29
+ fails "Matrix.zero? returns false for matrices with non zero entries" # ArgumentError: tried to create a Proc object without a block
30
+ fails "Matrix.zero? returns true for empty matrices" # ArgumentError: tried to create a Proc object without a block
31
+ fails "Matrix.zero? returns true for matrices with zero entries" # ArgumentError: tried to create a Proc object without a block
32
+ fails "Matrix::EigenvalueDecomposition#eigenvalue_matrix returns a diagonal matrix with the eigenvalues on the diagonal" # Expected Matrix[[-7.661903789690598, 0], [0, 15.661903789690601]] == Matrix[[6, 0], [0, 2]] to be truthy but was false
33
+ fails "Matrix::EigenvalueDecomposition#eigenvalues returns an array of complex eigenvalues for a rotation matrix" # Expected [0, 1.9999999999999998] == [(1-1i), (1+1i)] to be truthy but was false
34
+ fails "Matrix::EigenvalueDecomposition#eigenvalues returns an array of real eigenvalues for a matrix" # Expected [-7.6619037897, 15.6619037897] == [2, 6] to be truthy but was false
35
+ fails "Matrix::EigenvalueDecomposition#eigenvector_matrix returns a complex eigenvector matrix given a rotation matrix" # Expected Matrix[[-0.7071067811865475, -0.7071067811865475], [-0.7071067811865475, 0.7071067811865475]] == Matrix[[1, 1], [(0+1i), (0-1i)]] to be truthy but was false
36
+ fails "Matrix::EigenvalueDecomposition#eigenvectors returns an array of complex eigenvectors for a rotation matrix" # Expected [Vector[-0.7071067811865475, -0.7071067811865475], Vector[-0.7071067811865475, 0.7071067811865475]] == [Vector[1, (0+1i)], Vector[1, (0-1i)]] to be truthy but was false
37
+ fails "Matrix::EigenvalueDecomposition#to_a returns a factorization" # Expected Matrix[[14, -6], [-6, -6]] == Matrix[[14, 16], [-6, -6]] to be truthy but was false
38
+ fails "Vector#eql? returns false when there are a pair corresponding elements which are not equal in the sense of Kernel#eql?" # Expected true to be false
39
+ end
@@ -11,8 +11,6 @@ opal_filter "Method" do
11
11
  fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing dynamically" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
12
12
  fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
13
13
  fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
14
- fails "Method#=== invokes the method with the specified arguments, returning the method's return value" # Expected false to equal 15
15
- fails "Method#=== raises an ArgumentError when given incorrect number of arguments" # Expected ArgumentError but no exception was raised (false was returned)
16
14
  fails "Method#>> composition is a lambda" # NoMethodError: undefined method `>>' for #<Method: MethodSpecs::Composition#pow_2 (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:200)>
17
15
  fails "Method#>> does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `>>' for #<Method: MethodSpecs::Composition#upcase (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:192)>)
18
16
  fails "Method#>> raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `>>' for #<Method: MethodSpecs::Composition#upcase (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:192)>)