opal 0.8.1 → 0.9.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.gitmodules +3 -3
  4. data/.jshintrc +17 -20
  5. data/.travis.yml +22 -11
  6. data/CHANGELOG.md +51 -1
  7. data/CODE_OF_CONDUCT.md +15 -0
  8. data/CONTRIBUTING.md +125 -9
  9. data/Gemfile +1 -1
  10. data/Guardfile +2 -2
  11. data/README.md +95 -29
  12. data/Rakefile +1 -1
  13. data/benchmark/benchmarks +103 -0
  14. data/benchmark/bm_array_flatten.rb +9 -0
  15. data/benchmark/bm_array_intersection_numbers.rb +7 -0
  16. data/benchmark/bm_array_intersection_objects.rb +7 -0
  17. data/benchmark/bm_array_intersection_strings.rb +7 -0
  18. data/benchmark/bm_array_join_ary.rb +9 -0
  19. data/benchmark/bm_array_minus_numbers.rb +7 -0
  20. data/benchmark/bm_array_minus_objects.rb +7 -0
  21. data/benchmark/bm_array_minus_strings.rb +7 -0
  22. data/benchmark/bm_array_union_numbers.rb +7 -0
  23. data/benchmark/bm_array_union_objects.rb +7 -0
  24. data/benchmark/bm_array_union_strings.rb +7 -0
  25. data/benchmark/bm_array_uniq_bang_numbers.rb +5 -0
  26. data/benchmark/bm_array_uniq_bang_objects.rb +5 -0
  27. data/benchmark/bm_array_uniq_bang_strings.rb +5 -0
  28. data/benchmark/bm_array_uniq_numbers.rb +5 -0
  29. data/benchmark/bm_array_uniq_objects.rb +5 -0
  30. data/benchmark/bm_array_uniq_strings.rb +5 -0
  31. data/benchmark/bm_dispatch_bind_table.rb +57 -0
  32. data/benchmark/bm_dispatch_code_gen.rb +65 -0
  33. data/benchmark/bm_dispatch_code_gen_if.rb +64 -0
  34. data/benchmark/bm_dispatch_hardcoded.rb +44 -0
  35. data/benchmark/bm_dispatch_send.rb +38 -0
  36. data/benchmark/bm_dispatch_send_table.rb +57 -0
  37. data/benchmark/bm_hash_assoc_object.rb +11 -0
  38. data/benchmark/bm_hash_assoc_string.rb +9 -0
  39. data/benchmark/bm_hash_clone_object.rb +9 -0
  40. data/benchmark/bm_hash_clone_string.rb +9 -0
  41. data/benchmark/bm_hash_delete_object.rb +11 -0
  42. data/benchmark/bm_hash_delete_string.rb +9 -0
  43. data/benchmark/bm_hash_each_key_object.rb +9 -0
  44. data/benchmark/bm_hash_each_key_string.rb +9 -0
  45. data/benchmark/bm_hash_each_object.rb +9 -0
  46. data/benchmark/bm_hash_each_string.rb +9 -0
  47. data/benchmark/bm_hash_each_value_object.rb +9 -0
  48. data/benchmark/bm_hash_each_value_string.rb +9 -0
  49. data/benchmark/bm_hash_element_reference_object.rb +11 -0
  50. data/benchmark/bm_hash_element_reference_string.rb +9 -0
  51. data/benchmark/bm_hash_element_set_object.rb +5 -0
  52. data/benchmark/bm_hash_element_set_string.rb +5 -0
  53. data/benchmark/bm_hash_equal_value_object.rb +14 -0
  54. data/benchmark/bm_hash_equal_value_string.rb +11 -0
  55. data/benchmark/bm_hash_fetch_object.rb +11 -0
  56. data/benchmark/bm_hash_fetch_string.rb +9 -0
  57. data/benchmark/bm_hash_flatten_object.rb +9 -0
  58. data/benchmark/bm_hash_flatten_string.rb +9 -0
  59. data/benchmark/bm_hash_has_key_object.rb +11 -0
  60. data/benchmark/bm_hash_has_key_string.rb +9 -0
  61. data/benchmark/bm_hash_has_value_object.rb +9 -0
  62. data/benchmark/bm_hash_has_value_string.rb +9 -0
  63. data/benchmark/bm_hash_hash_object.rb +9 -0
  64. data/benchmark/bm_hash_hash_string.rb +9 -0
  65. data/benchmark/bm_hash_inspect_object.rb +9 -0
  66. data/benchmark/bm_hash_inspect_string.rb +9 -0
  67. data/benchmark/bm_hash_invert_object.rb +9 -0
  68. data/benchmark/bm_hash_invert_string.rb +9 -0
  69. data/benchmark/bm_hash_keep_if_object.rb +9 -0
  70. data/benchmark/bm_hash_keep_if_string.rb +9 -0
  71. data/benchmark/bm_hash_key_object.rb +9 -0
  72. data/benchmark/bm_hash_key_string.rb +9 -0
  73. data/benchmark/bm_hash_keys_object.rb +9 -0
  74. data/benchmark/bm_hash_keys_string.rb +9 -0
  75. data/benchmark/bm_hash_literal_mixed_large.rb +3 -0
  76. data/benchmark/bm_hash_literal_mixed_small.rb +3 -0
  77. data/benchmark/bm_hash_literal_object_large.rb +4 -0
  78. data/benchmark/bm_hash_literal_object_small.rb +3 -0
  79. data/benchmark/bm_hash_literal_string_large.rb +4 -0
  80. data/benchmark/bm_hash_literal_string_small.rb +3 -0
  81. data/benchmark/bm_hash_merge_object.rb +22 -0
  82. data/benchmark/bm_hash_merge_string.rb +18 -0
  83. data/benchmark/bm_hash_rassoc_object.rb +9 -0
  84. data/benchmark/bm_hash_rassoc_string.rb +9 -0
  85. data/benchmark/bm_hash_rehash_object.rb +9 -0
  86. data/benchmark/bm_hash_rehash_string.rb +9 -0
  87. data/benchmark/bm_hash_reject_bang_object.rb +9 -0
  88. data/benchmark/bm_hash_reject_bang_string.rb +9 -0
  89. data/benchmark/bm_hash_reject_object.rb +9 -0
  90. data/benchmark/bm_hash_reject_string.rb +9 -0
  91. data/benchmark/bm_hash_replace_object.rb +18 -0
  92. data/benchmark/bm_hash_replace_string.rb +14 -0
  93. data/benchmark/bm_hash_select_bang_object.rb +9 -0
  94. data/benchmark/bm_hash_select_bang_string.rb +9 -0
  95. data/benchmark/bm_hash_select_object.rb +9 -0
  96. data/benchmark/bm_hash_select_string.rb +9 -0
  97. data/benchmark/bm_hash_shift_object.rb +10 -0
  98. data/benchmark/bm_hash_shift_string.rb +10 -0
  99. data/benchmark/bm_hash_to_a_object.rb +9 -0
  100. data/benchmark/bm_hash_to_a_string.rb +9 -0
  101. data/benchmark/bm_hash_to_h_object.rb +10 -0
  102. data/benchmark/bm_hash_to_h_string.rb +10 -0
  103. data/benchmark/bm_hash_values_object.rb +9 -0
  104. data/benchmark/bm_hash_values_string.rb +9 -0
  105. data/benchmark/run.rb +48 -0
  106. data/bin/opal-mspec +1 -1
  107. data/bin/opal-repl +4 -4
  108. data/docs/compiled_ruby.md +214 -56
  109. data/docs/configuring_gems.md +2 -2
  110. data/docs/faq.md +2 -2
  111. data/docs/getting_started.md +19 -2
  112. data/docs/jquery.md +5 -5
  113. data/docs/opal_parser.md +53 -0
  114. data/docs/unsupported_features.md +2 -2
  115. data/docs/upgrading.md +22 -0
  116. data/docs/using_sprockets.md +15 -0
  117. data/examples/rack/config.ru +13 -0
  118. data/examples/sinatra/config.ru +4 -5
  119. data/lib/mspec/opal/runner.rb +54 -11
  120. data/lib/opal.rb +1 -1
  121. data/lib/opal/builder.rb +1 -1
  122. data/lib/opal/builder_processors.rb +1 -1
  123. data/lib/opal/cli.rb +17 -13
  124. data/lib/opal/cli_options.rb +1 -1
  125. data/lib/opal/compiler.rb +12 -0
  126. data/lib/opal/config.rb +4 -0
  127. data/lib/opal/nodes/arglist.rb +5 -7
  128. data/lib/opal/nodes/call.rb +6 -1
  129. data/lib/opal/nodes/call_special.rb +74 -0
  130. data/lib/opal/nodes/def.rb +35 -28
  131. data/lib/opal/nodes/definitions.rb +3 -5
  132. data/lib/opal/nodes/for.rb +13 -0
  133. data/lib/opal/nodes/helpers.rb +15 -1
  134. data/lib/opal/nodes/if.rb +5 -5
  135. data/lib/opal/nodes/iter.rb +6 -1
  136. data/lib/opal/nodes/literal.rb +1 -1
  137. data/lib/opal/nodes/logic.rb +2 -2
  138. data/lib/opal/nodes/masgn.rb +1 -2
  139. data/lib/opal/nodes/module.rb +2 -1
  140. data/lib/opal/nodes/rescue.rb +10 -1
  141. data/lib/opal/nodes/scope.rb +8 -2
  142. data/lib/opal/nodes/singleton_class.rb +1 -1
  143. data/lib/opal/nodes/top.rb +11 -0
  144. data/lib/opal/nodes/variables.rb +4 -4
  145. data/lib/opal/parser.rb +21 -3
  146. data/lib/opal/parser/grammar.rb +3115 -2961
  147. data/lib/opal/parser/grammar.y +29 -6
  148. data/lib/opal/parser/lexer.rb +18 -8
  149. data/lib/opal/sprockets.rb +85 -0
  150. data/lib/opal/sprockets/processor.rb +11 -35
  151. data/lib/opal/sprockets/server.rb +3 -15
  152. data/lib/opal/version.rb +2 -2
  153. data/opal.gemspec +4 -4
  154. data/opal/README.md +9 -0
  155. data/opal/corelib/array.rb +433 -181
  156. data/opal/corelib/basic_object.rb +48 -4
  157. data/opal/corelib/boolean.rb +15 -6
  158. data/opal/corelib/class.rb +6 -5
  159. data/opal/corelib/comparable.rb +12 -0
  160. data/opal/corelib/complex.rb +282 -0
  161. data/opal/corelib/constants.rb +9 -0
  162. data/opal/corelib/enumerable.rb +83 -34
  163. data/opal/corelib/enumerator.rb +3 -1
  164. data/opal/corelib/error.rb +49 -10
  165. data/opal/corelib/file.rb +1 -0
  166. data/opal/corelib/hash.rb +353 -577
  167. data/opal/corelib/helpers.rb +20 -0
  168. data/opal/corelib/kernel.rb +114 -59
  169. data/opal/corelib/math.rb +470 -0
  170. data/opal/corelib/method.rb +11 -2
  171. data/opal/corelib/module.rb +96 -96
  172. data/opal/corelib/{nil_class.rb → nil.rb} +20 -1
  173. data/opal/corelib/number.rb +751 -0
  174. data/opal/corelib/numeric.rb +77 -437
  175. data/opal/corelib/proc.rb +81 -1
  176. data/opal/corelib/process.rb +27 -0
  177. data/opal/corelib/rational.rb +358 -0
  178. data/opal/corelib/regexp.rb +156 -27
  179. data/opal/corelib/runtime.js +724 -335
  180. data/opal/corelib/string.rb +93 -104
  181. data/opal/corelib/string/encoding.rb +177 -0
  182. data/opal/corelib/string/inheritance.rb +2 -0
  183. data/opal/corelib/struct.rb +105 -18
  184. data/opal/corelib/time.rb +267 -146
  185. data/opal/corelib/unsupported.rb +216 -0
  186. data/opal/corelib/variables.rb +0 -6
  187. data/opal/opal.rb +8 -22
  188. data/opal/opal/base.rb +9 -0
  189. data/opal/opal/mini.rb +17 -0
  190. data/spec/README.md +1 -1
  191. data/spec/filters/bugs/array.rb +38 -136
  192. data/spec/filters/bugs/{basic_object.rb → basicobject.rb} +14 -15
  193. data/spec/filters/bugs/class.rb +6 -12
  194. data/spec/filters/bugs/complex.rb +3 -0
  195. data/spec/filters/bugs/date.rb +162 -10
  196. data/spec/filters/bugs/enumerable.rb +31 -58
  197. data/spec/filters/bugs/enumerator.rb +42 -0
  198. data/spec/filters/bugs/exception.rb +66 -10
  199. data/spec/filters/bugs/float.rb +17 -0
  200. data/spec/filters/bugs/hash.rb +11 -97
  201. data/spec/filters/bugs/inheritance.rb +5 -0
  202. data/spec/filters/bugs/integer.rb +28 -0
  203. data/spec/filters/bugs/kernel.rb +304 -12
  204. data/spec/filters/bugs/language.rb +133 -399
  205. data/spec/filters/bugs/language_opal.rb +88 -0
  206. data/spec/filters/bugs/module.rb +203 -62
  207. data/spec/filters/bugs/numeric.rb +32 -0
  208. data/spec/filters/bugs/proc.rb +39 -0
  209. data/spec/filters/bugs/range.rb +148 -0
  210. data/spec/filters/bugs/regexp.rb +168 -0
  211. data/spec/filters/bugs/set.rb +46 -3
  212. data/spec/filters/bugs/singleton.rb +1 -2
  213. data/spec/filters/bugs/string.rb +59 -90
  214. data/spec/filters/bugs/strscan.rb +80 -0
  215. data/spec/filters/bugs/struct.rb +10 -20
  216. data/spec/filters/bugs/time.rb +17 -184
  217. data/spec/filters/bugs/unboundmethod.rb +22 -0
  218. data/spec/filters/unsupported/array.rb +163 -0
  219. data/spec/filters/unsupported/basicobject.rb +14 -0
  220. data/spec/filters/unsupported/bignum.rb +46 -0
  221. data/spec/filters/unsupported/class.rb +4 -0
  222. data/spec/filters/unsupported/delegator.rb +5 -0
  223. data/spec/filters/unsupported/enumerable.rb +11 -0
  224. data/spec/filters/unsupported/enumerator.rb +8 -9
  225. data/spec/filters/unsupported/fixnum.rb +14 -0
  226. data/spec/filters/unsupported/float.rb +41 -7
  227. data/spec/filters/unsupported/freeze.rb +45 -0
  228. data/spec/filters/unsupported/hash.rb +50 -0
  229. data/spec/filters/unsupported/integer.rb +3 -0
  230. data/spec/filters/unsupported/kernel.rb +31 -0
  231. data/spec/filters/unsupported/language.rb +17 -0
  232. data/spec/filters/unsupported/matchdata.rb +30 -0
  233. data/spec/filters/unsupported/math.rb +3 -0
  234. data/spec/filters/unsupported/module.rb +5 -3
  235. data/spec/filters/unsupported/pathname.rb +3 -0
  236. data/spec/filters/unsupported/privacy.rb +136 -0
  237. data/spec/filters/unsupported/proc.rb +3 -0
  238. data/spec/filters/unsupported/regexp.rb +59 -0
  239. data/spec/filters/unsupported/set.rb +4 -0
  240. data/spec/filters/unsupported/{marshal.rb → singleton.rb} +4 -2
  241. data/spec/filters/unsupported/{mutable_strings.rb → string.rb} +456 -336
  242. data/spec/filters/unsupported/struct.rb +3 -0
  243. data/spec/filters/unsupported/symbol.rb +5 -0
  244. data/spec/filters/unsupported/taint.rb +16 -0
  245. data/spec/filters/unsupported/thread.rb +5 -0
  246. data/spec/filters/unsupported/time.rb +197 -16
  247. data/spec/lib/cli_spec.rb +14 -4
  248. data/spec/lib/compiler_spec.rb +9 -1
  249. data/spec/lib/parser/call_spec.rb +18 -0
  250. data/spec/lib/parser/not_spec.rb +2 -8
  251. data/spec/lib/sprockets_spec.rb +24 -0
  252. data/spec/opal/core/array/intersection_spec.rb +38 -0
  253. data/spec/opal/core/array/minus_spec.rb +38 -0
  254. data/spec/opal/core/array/union_spec.rb +38 -0
  255. data/spec/opal/core/array/uniq_spec.rb +49 -0
  256. data/spec/opal/core/exception_spec.rb +7 -0
  257. data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
  258. data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
  259. data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
  260. data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
  261. data/spec/opal/core/hash/internals_spec.rb +332 -0
  262. data/spec/opal/core/helpers_spec.rb +14 -0
  263. data/spec/opal/core/kernel/freeze_spec.rb +1 -1
  264. data/spec/opal/core/kernel/raise_spec.rb +13 -0
  265. data/spec/opal/core/kernel/require_tree_spec.rb +9 -0
  266. data/spec/opal/core/language/class_spec.rb +55 -0
  267. data/spec/opal/core/language/fixtures/send.rb +1 -0
  268. data/spec/opal/core/language/keyword_arguments_spec.rb +11 -0
  269. data/spec/opal/core/language/send_spec.rb +5 -0
  270. data/spec/opal/core/method/to_proc_spec.rb +28 -0
  271. data/spec/opal/core/module/name_spec.rb +0 -17
  272. data/spec/opal/core/runtime/bridged_classes_spec.rb +2 -2
  273. data/spec/opal/core/runtime/eval_spec.rb +1 -1
  274. data/spec/opal/core/runtime/method_missing_spec.rb +6 -0
  275. data/spec/opal/core/runtime_spec.rb +51 -0
  276. data/spec/opal/stdlib/js_spec.rb +66 -0
  277. data/spec/opal/stdlib/native/hash_spec.rb +36 -0
  278. data/spec/rubyspecs +152 -273
  279. data/spec/spec_helper.rb +10 -11
  280. data/stdlib/base64.rb +9 -9
  281. data/stdlib/benchmark.rb +551 -4
  282. data/stdlib/console.rb +94 -0
  283. data/stdlib/date.rb +1 -1
  284. data/stdlib/encoding.rb +1 -170
  285. data/stdlib/js.rb +56 -0
  286. data/stdlib/json.rb +9 -14
  287. data/stdlib/math.rb +1 -370
  288. data/stdlib/native.rb +133 -63
  289. data/stdlib/nodejs/file.rb +5 -0
  290. data/stdlib/nodejs/fileutils.rb +13 -6
  291. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/README.md +1 -1
  292. data/stdlib/opal-parser.rb +1 -2
  293. data/stdlib/ostruct.rb +65 -6
  294. data/stdlib/pp.rb +2 -4
  295. data/stdlib/rbconfig.rb +1 -3
  296. data/stdlib/strscan.rb +164 -28
  297. data/tasks/benchmarking.rake +88 -0
  298. data/tasks/testing.rake +181 -55
  299. data/{lib/mspec/opal/special_calls.rb → tasks/testing/mspec_special_calls.rb} +1 -1
  300. data/{lib/mspec/opal/sprockets.js → tasks/testing/phantomjs1-sprockets.js} +17 -6
  301. data/test/opal/test_keyword.rb +590 -0
  302. data/vendored-minitest/minitest.rb +2 -2
  303. data/vendored-minitest/test/unit.rb +5 -0
  304. metadata +229 -62
  305. data/benchmarks/operators.rb +0 -11
  306. data/benchmarks/prova.js.rb +0 -13
  307. data/docs/libraries.md +0 -36
  308. data/lib/mspec/opal/new.html.erb +0 -1
  309. data/lib/mspec/opal/rake_task.rb +0 -248
  310. data/opal/corelib/match_data.rb +0 -128
  311. data/spec/filters/bugs/math.rb +0 -95
  312. data/spec/filters/bugs/nil.rb +0 -7
  313. data/spec/filters/bugs/opal.rb +0 -9
  314. data/spec/filters/bugs/regular_expressions.rb +0 -41
  315. data/spec/filters/bugs/stringscanner.rb +0 -33
  316. data/spec/filters/unsupported/encoding.rb +0 -102
  317. data/spec/filters/unsupported/frozen.rb +0 -92
  318. data/spec/filters/unsupported/hash_compare_by_identity.rb +0 -16
  319. data/spec/filters/unsupported/integer_size.rb +0 -59
  320. data/spec/filters/unsupported/method_added.rb +0 -10
  321. data/spec/filters/unsupported/private_constants.rb +0 -30
  322. data/spec/filters/unsupported/private_methods.rb +0 -55
  323. data/spec/filters/unsupported/random.rb +0 -4
  324. data/spec/filters/unsupported/rational_numbers.rb +0 -4
  325. data/spec/filters/unsupported/regular_expressions.rb +0 -137
  326. data/spec/filters/unsupported/ruby_exe.rb +0 -5
  327. data/spec/filters/unsupported/symbols.rb +0 -17
  328. data/spec/filters/unsupported/tainted.rb +0 -180
  329. data/spec/filters/unsupported/trusted.rb +0 -88
  330. data/stdlib/process.rb +0 -10
  331. data/tasks/documenting.rake +0 -37
@@ -1,34 +1,33 @@
1
1
  opal_filter "BasicObject" do
2
- fails "BasicObject#instance_eval evaluates strings"
3
- fails "BasicObject#singleton_method_added is called when a method is defined with alias_method in the singleton class"
4
- fails "BasicObject#singleton_method_added is called when a method is defined with syntax alias in the singleton class"
2
+ fails "BasicObject does not define built-in constants (according to const_defined?)"
3
+ fails "BasicObject does not define built-in constants (according to defined?)"
5
4
  fails "BasicObject instance metaclass contains methods defined for the BasicObject instance"
6
5
  fails "BasicObject instance metaclass has BasicObject as superclass"
7
6
  fails "BasicObject instance metaclass is an instance of Class"
8
7
  fails "BasicObject metaclass contains methods for the BasicObject class"
9
8
  fails "BasicObject metaclass has Class as superclass"
10
- fails "BasicObject does not define built-in constants (according to defined?)"
11
- fails "BasicObject does not define built-in constants (according to const_defined?)"
12
9
  fails "BasicObject raises NameError when referencing built-in constants"
13
10
  fails "BasicObject raises NoMethodError for nonexistent methods after #method_missing is removed"
14
-
15
- fails "BasicObject#__id__ returns a different value for two Bignum literals"
16
- fails "BasicObject#__id__ returns a different value for two Float literals"
17
- fails "BasicObject#__id__ returns a different value for two String literals"
18
11
  fails "BasicObject#initialize does not accept arguments"
19
12
  fails "BasicObject#instance_eval binds self to the receiver"
13
+ fails "BasicObject#instance_eval evaluates strings"
20
14
  fails "BasicObject#instance_eval executes in the context of the receiver"
15
+ fails "BasicObject#instance_eval gets constants in the receiver if a string given"
21
16
  fails "BasicObject#instance_eval has access to receiver's instance variables"
22
- fails "BasicObject#instance_eval treats block-local variables as local to the block"
23
- fails "BasicObject#instance_eval sets class variables in the receiver"
24
17
  fails "BasicObject#instance_eval makes the receiver metaclass the scoped class when used with a string"
25
- fails "BasicObject#instance_eval gets constants in the receiver if a string given"
26
18
  fails "BasicObject#instance_eval raises a TypeError when defining methods on an immediate"
27
19
  fails "BasicObject#instance_eval raises a TypeError when defining methods on numerics"
28
- fails "BasicObject#instance_exec raises a LocalJumpError unless given a block"
29
- fails "BasicObject#instance_exec has an arity of -1"
20
+ fails "BasicObject#instance_eval sets class variables in the receiver"
21
+ fails "BasicObject#instance_eval treats block-local variables as local to the block"
30
22
  fails "BasicObject#instance_exec binds the block's binding self to the receiver"
31
- fails "BasicObject#instance_exec sets class variables in the receiver"
23
+ fails "BasicObject#instance_exec has an arity of -1"
24
+ fails "BasicObject#instance_exec raises a LocalJumpError unless given a block"
32
25
  fails "BasicObject#instance_exec raises a TypeError when defining methods on an immediate"
33
26
  fails "BasicObject#instance_exec raises a TypeError when defining methods on numerics"
27
+ fails "BasicObject#instance_exec sets class variables in the receiver"
28
+ fails "BasicObject#__send__ has a negative arity"
29
+ fails "Kernel#public_send has a negative arity"
30
+ fails "Kernel#send has a negative arity"
31
+ fails "Module#prepend does not affect the superclass"
32
+ fails "Module#singleton_class? returns true for singleton classes"
34
33
  end
@@ -1,21 +1,15 @@
1
1
  opal_filter "Class" do
2
- fails "Class#allocate returns a fully-formed instance of Module"
3
2
  fails "Class#allocate raises TypeError for #superclass"
4
-
5
- fails "Class#dup stores the new name if assigned to a constant"
6
- fails "Class#dup sets the name from the class to nil if not assigned to a constant"
7
- fails "Class#dup retains the correct ancestor chain for the singleton class"
8
- fails "Class#dup retains an included module in the ancestor chain for the singleton class"
3
+ fails "Class#allocate returns a fully-formed instance of Module"
9
4
  fails "Class#dup duplicates both the class and the singleton class"
10
-
11
- fails "Class#initialize_copy raises a TypeError when called on already initialized classes"
12
- fails "Class#initialize_copy raises a TypeError when called on BasicObject"
5
+ fails "Class#dup retains an included module in the ancestor chain for the singleton class"
6
+ fails "Class#dup retains the correct ancestor chain for the singleton class"
7
+ fails "Class#dup sets the name from the class to nil if not assigned to a constant"
8
+ fails "Class#dup stores the new name if assigned to a constant"
13
9
  fails "Class#initialize raises a TypeError when called on already initialized classes"
14
10
  fails "Class#initialize raises a TypeError when called on BasicObject"
15
11
  fails "Class#initialize when given the Class raises a TypeError"
16
-
17
- fails "Class.new raises a TypeError if passed a metaclass"
18
12
  fails "Class#new passes the block to #initialize"
19
-
20
13
  fails "Class#superclass for a singleton class of a class returns the singleton class of its superclass"
14
+ fails "Class.new raises a TypeError if passed a metaclass"
21
15
  end
@@ -0,0 +1,3 @@
1
+ opal_filter "Complex" do
2
+ fails "Complex#coerce returns an array containing other as Complex and self when other is a Numeric which responds to #real? with true"
3
+ end
@@ -1,20 +1,172 @@
1
1
  opal_filter "Date" do
2
+ fails "Date constants defines ABBR_MONTHNAMES"
3
+ fails "Date constants defines DAYNAMES"
4
+ fails "Date constants defines ENGLAND"
5
+ fails "Date constants defines GREGORIAN"
6
+ fails "Date constants defines ITALY"
7
+ fails "Date constants defines JULIAN"
8
+ fails "Date constants defines MONTHNAMES"
9
+ fails "Date constants freezes MONTHNAMES, DAYNAMES, ABBR_MONTHNAMES, ABBR_DAYSNAMES"
2
10
  fails "Date#<< raises an error on non numeric parameters"
3
-
11
+ fails "Date#<=> returns -1 when self is less than a Numeric"
12
+ fails "Date#<=> returns 1 when self is greater than a Numeric"
13
+ fails "Date#=== compares to another numeric"
14
+ fails "Date#>> returns the day of the reform if date falls within calendar reform"
15
+ fails "Date#ajd determines the Astronomical Julian day"
16
+ fails "Date#amjd determines the Astronomical Modified Julian day"
17
+ fails "Date#civil creates a Date for -4712 by default"
18
+ fails "Date#civil creates a Date for different calendar reform dates"
19
+ fails "Date#civil creates a date with arguments"
20
+ fails "Date#civil doesn't create dates for invalid arguments"
21
+ fails "Date#commercial creates a Date for Julian Day Number day 0 by default"
22
+ fails "Date#commercial Creates a Date for the correct day given the year, week and day number"
23
+ fails "Date#commercial Creates a Date for the monday in the year and week given"
24
+ fails "Date#commercial creates only Date objects for valid weeks"
25
+ fails "Date#cwday determines the commercial week day"
26
+ fails "Date#cweek determines the commercial week"
27
+ fails "Date#cwyear determines the commercial year"
28
+ fails "Date#day_fraction determines the day fraction"
29
+ fails "Date#downto creates earlier dates when passed a negative step"
30
+ fails "Date#england converts a date object into another with the English calendar reform"
31
+ fails "Date#gregorian converts a date object into another with the Gregorian calendar"
32
+ fails "Date#gregorian? marks a day after the calendar reform as Julian"
33
+ fails "Date#gregorian? marks a day before the calendar reform as Julian"
34
+ fails "Date#gregorian_leap? returns false if a year is not a leap year in the Gregorian calendar"
35
+ fails "Date#gregorian_leap? returns true if a year is a leap year in the Gregorian calendar"
36
+ fails "Date#hash returns the same value for equal dates"
37
+ fails "Date#italy converts a date object into another with the Italian calendar reform"
38
+ fails "Date#jd determines the Julian day for a Date object"
39
+ fails "Date#julian converts a date object into another with the Julian calendar"
40
+ fails "Date#julian? marks a day after the calendar reform as Julian"
41
+ fails "Date#julian? marks a day before the calendar reform as Julian"
42
+ fails "Date#ld determines the Modified Julian day"
43
+ fails "Date#mday determines the day of the month"
44
+ fails "Date#mjd determines the Modified Julian day"
45
+ fails "Date#mon determines the month"
46
+ fails "Date#new_start converts a date object into another with a new calendar reform"
47
+ fails "Date#next_year returns the day of the reform if date falls within calendar reform"
48
+ fails "Date#parse parses a day name into a Date object"
49
+ fails "Date#parse parses a month day into a Date object"
50
+ fails "Date#parse parses a month name into a Date object"
51
+ fails "Date#parse parses DD as month day number"
52
+ fails "Date#parse parses DDD as year day number"
53
+ fails "Date#parse parses MMDD as month and day"
54
+ fails "Date#parse parses YYDDD as year and day number in 1969--2068"
55
+ fails "Date#parse parses YYMMDD as year, month and day in 1969--2068"
56
+ fails "Date#parse parses YYYYDDD as year and day number"
57
+ fails "Date#parse parses YYYYMMDD as year, month and day number"
58
+ fails "Date#parse throws an argument error for a single digit"
59
+ fails "Date#parse with ' ' separator can handle negative year numbers"
60
+ fails "Date#parse with ' ' separator can parse a 'DD mmm YYYY' string into a Date object"
61
+ fails "Date#parse with ' ' separator can parse a 'mmm DD YYYY' string into a Date object"
62
+ fails "Date#parse with ' ' separator can parse a 'YYYY mmm DD' string into a Date object"
63
+ fails "Date#parse with ' ' separator can parse a mmm-YYYY string into a Date object"
64
+ fails "Date#parse with ' ' separator can parse a month name and day into a Date object"
65
+ fails "Date#parse with ' ' separator can parse a month name, day and year into a Date object"
66
+ fails "Date#parse with ' ' separator can parse a year, day and month name into a Date object"
67
+ fails "Date#parse with ' ' separator can parse a year, month name and day into a Date object"
68
+ fails "Date#parse with '-' separator EU-style can parse a MM-DD-YY string into a Date object NOT using the year digits as 20XX"
69
+ fails "Date#parse with '-' separator EU-style can parse a MM-DD-YY string into a Date object using the year digits as 20XX"
70
+ fails "Date#parse with '-' separator EU-style can parse a MM-DD-YY string into a Date object"
71
+ fails "Date#parse with '-' separator EU-style can parse a MM-DD-YYYY string into a Date object"
72
+ fails "Date#parse with '.' separator can handle negative year numbers"
73
+ fails "Date#parse with '.' separator can parse a 'DD mmm YYYY' string into a Date object"
74
+ fails "Date#parse with '.' separator can parse a 'mmm DD YYYY' string into a Date object"
75
+ fails "Date#parse with '.' separator can parse a 'YYYY mmm DD' string into a Date object"
76
+ fails "Date#parse with '.' separator can parse a mmm-YYYY string into a Date object"
77
+ fails "Date#parse with '.' separator can parse a month name and day into a Date object"
78
+ fails "Date#parse with '.' separator can parse a month name, day and year into a Date object"
79
+ fails "Date#parse with '.' separator can parse a year, day and month name into a Date object"
80
+ fails "Date#parse with '.' separator can parse a year, month name and day into a Date object"
81
+ fails "Date#parse with '/' separator can handle negative year numbers"
82
+ fails "Date#parse with '/' separator can parse a 'DD mmm YYYY' string into a Date object"
83
+ fails "Date#parse with '/' separator can parse a 'mmm DD YYYY' string into a Date object"
84
+ fails "Date#parse with '/' separator can parse a 'YYYY mmm DD' string into a Date object"
85
+ fails "Date#parse with '/' separator can parse a mmm-YYYY string into a Date object"
86
+ fails "Date#parse with '/' separator can parse a month name and day into a Date object"
87
+ fails "Date#parse with '/' separator can parse a month name, day and year into a Date object"
88
+ fails "Date#parse with '/' separator can parse a year, day and month name into a Date object"
89
+ fails "Date#parse with '/' separator can parse a year, month name and day into a Date object"
90
+ fails "Date#parse with '/' separator US-style parses a MMDDYY string into a Date object NOT using the year digits as 20XX"
91
+ fails "Date#parse with '/' separator US-style parses a MMDDYY string into a Date object using the year digits as 20XX"
92
+ fails "Date#parse with '/' separator US-style parses a MMDDYY string into a Date object"
93
+ fails "Date#parse with '/' separator US-style parses a MMDDYYYY string into a Date object"
94
+ fails "Date#parse with '/' separator US-style parses a YYYYMMDD string into a Date object"
95
+ fails "Date#parse(.) parses DD.MM.YYYY into a Date object"
96
+ fails "Date#parse(.) parses YY.MM.DD into a Date object using the year 20YY"
97
+ fails "Date#parse(.) parses YY.MM.DD using the year digits as 20YY when given true as additional argument"
98
+ fails "Date#parse(.) parses YYYY.MM.DD into a Date object"
99
+ fails "Date#prev_year returns the day of the reform if date falls within calendar reform"
100
+ fails "Date#step steps backward in time"
101
+ fails "Date#step steps forward in time"
4
102
  fails "Date#strftime should be able to print the commercial year with leading zeroes"
5
103
  fails "Date#strftime should be able to print the commercial year with only two digits"
6
- fails "Date#strftime should be able to print the year day with leading zeroes"
104
+ fails "Date#strftime should be able to print the julian day with leading zeroes"
7
105
  fails "Date#strftime should be able to show a full notation"
8
- fails "Date#strftime should be able to show the commercial week"
9
- fails "Date#strftime should be able to show the timezone of the date with a : separator"
10
- fails "Date#strftime should be able to show the timezone of the date with a : separator"
11
- fails "Date#strftime should be able to show the commercial week"
12
106
  fails "Date#strftime should be able to show the commercial week day"
13
- fails "Date#strftime should be able to show the week number with the week starting on sunday and monday"
107
+ fails "Date#strftime should be able to show the commercial week"
14
108
  fails "Date#strftime should be able to show the number of seconds since the unix epoch"
15
-
16
- fails "Date#strftime should be able to print the julian day with leading zeroes"
17
- fails "Date#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)"
109
+ fails "Date#strftime should be able to show the timezone of the date with a : separator"
18
110
  fails "Date#strftime should be able to show the timezone with a : separator"
111
+ fails "Date#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)"
19
112
  fails "Date#strftime shows the number of milliseconds since epoch"
113
+ fails "Date#strptime parses a century"
114
+ fails "Date#strptime parses a commercial week day"
115
+ fails "Date#strptime parses a commercial week"
116
+ fails "Date#strptime parses a commercial year with leading zeroes"
117
+ fails "Date#strptime parses a commercial year with only two digits"
118
+ fails "Date#strptime parses a date given as YYYY-MM-DD"
119
+ fails "Date#strptime parses a date given in full notation"
120
+ fails "Date#strptime parses a date given MM/DD/YY"
121
+ fails "Date#strptime parses a date with slashes"
122
+ fails "Date#strptime parses a full date"
123
+ fails "Date#strptime parses a full day name"
124
+ fails "Date#strptime parses a full month name"
125
+ fails "Date#strptime parses a month day with leading spaces"
126
+ fails "Date#strptime parses a month day with leading zeroes"
127
+ fails "Date#strptime parses a month with leading zeroes"
128
+ fails "Date#strptime parses a short day name"
129
+ fails "Date#strptime parses a short month name"
130
+ fails "Date#strptime parses a week day"
131
+ fails "Date#strptime parses a week number for a week starting on Monday"
132
+ fails "Date#strptime parses a week number for a week starting on Sunday"
133
+ fails "Date#strptime parses a year day with leading zeroes"
134
+ fails "Date#strptime parses a year in YY format"
135
+ fails "Date#strptime parses a year in YYYY format"
136
+ fails "Date#strptime returns January 1, 4713 BCE when given no arguments"
137
+ fails "Date#strptime uses the default format when not given a date format"
138
+ fails "Date#upto returns future dates for the default step value"
139
+ fails "Date#valid_civil? handles negative months and days"
140
+ fails "Date#valid_civil? returns false if it is not a valid civil date"
141
+ fails "Date#valid_civil? returns true if it is a valid civil date"
142
+ fails "Date#valid_commercial? handles negative week and day numbers"
143
+ fails "Date#valid_commercial? returns false it is not a valid commercial date"
144
+ fails "Date#valid_commercial? returns true if it is a valid commercial date"
145
+ fails "Date#valid_date? handles negative months and days"
146
+ fails "Date#valid_date? returns false if it is not a valid civil date"
147
+ fails "Date#valid_date? returns true if it is a valid civil date"
148
+ fails "Date#yday determines the year"
149
+ fails "Date.jd constructs a Date object if passed a Julian day"
150
+ fails "Date.jd constructs a Date object if passed a negative number"
151
+ fails "Date.jd returns a Date object representing Julian day 0 (-4712-01-01) if no arguments passed"
152
+ fails "Date.julian_leap? determines whether a year is a leap year in the Julian calendar"
153
+ fails "Date.julian_leap? determines whether a year is not a leap year in the Julian calendar"
154
+ fails "Date.new creates a Date for -4712 by default"
155
+ fails "Date.new creates a Date for different calendar reform dates"
156
+ fails "Date.new creates a date with arguments"
157
+ fails "Date.new doesn't create dates for invalid arguments"
158
+ fails "Date.ordinal constructs a Date object from an ordinal date"
159
+ fails "Date.valid_jd? returns false if passed nil"
160
+ fails "Date.valid_jd? returns true if passed any value other than nil"
161
+ fails "Date.valid_jd? returns true if passed false"
162
+ fails "Date.valid_ordinal? determines if the date is a valid ordinal date"
163
+ fails "Date.valid_ordinal? handles negative day numbers"
164
+ fails "Date::Infinity should be able to check whether Infinity is finite"
165
+ fails "Date::Infinity should be able to check whether Infinity is infinite"
166
+ fails "Date::Infinity should be able to check whether Infinity is not a number"
167
+ fails "Date::Infinity should be able to check whether Infinity is zero"
168
+ fails "Date::Infinity should be able to coerce a Date::Infinity object"
169
+ fails "Date::Infinity should be able to compare Infinity objects"
170
+ fails "Date::Infinity should be able to return plus Infinity for abs"
171
+ fails "Date::Infinity should be able to use -@ and +@ for Date::Infinity"
20
172
  end
@@ -1,78 +1,51 @@
1
1
  opal_filter "Enumerable" do
2
2
  fails "Enumerable#cycle passed a number n as an argument raises an ArgumentError if more arguments are passed"
3
-
4
- fails "Enumerable#grep can use $~ in the block when used with a Regexp"
5
-
6
- fails "Enumerable#inject returns nil when fails(legacy rubycon)"
7
- fails "Enumerable#inject without inject arguments(legacy rubycon)"
8
-
9
- fails "Enumerable#reduce returns nil when fails(legacy rubycon)"
10
- fails "Enumerable#reduce without inject arguments(legacy rubycon)"
11
-
12
- fails "Enumerable#chunk does not yield the object passed to #chunk if it is nil"
13
- fails "Enumerable#chunk yields an element and an object value-equal but not identical to the object passed to #chunk"
14
- fails "Enumerable#chunk raises a RuntimeError if the block returns a Symbol starting with an underscore other than :_alone or :_separator"
15
- fails "Enumerable#chunk does not return elements for which the block returns nil"
16
- fails "Enumerable#chunk does not return elements for which the block returns :_separator"
17
- fails "Enumerable#chunk returns elements for which the block returns :_alone in separate Arrays"
18
- fails "Enumerable#chunk returns elements of the Enumerable in an Array of Arrays, [v, ary], where 'ary' contains the consecutive elements for which the block returned the value 'v'"
19
- fails "Enumerable#chunk yields the current element and the current chunk to the block"
20
- fails "Enumerable#chunk returns an Enumerator if given a block"
21
- fails "Enumerable#chunk raises an ArgumentError if called without a block"
22
- fails "Enumerable#chunk with [initial_state] yields an element and an object value-equal but not identical to the object passed to #chunk"
23
- fails "Enumerable#chunk with [initial_state] does not yield the object passed to #chunk if it is nil"
24
-
25
3
  fails "Enumerable#each_cons gathers whole arrays as elements when each yields multiple"
26
- fails "Enumerable#each_cons returns an enumerator if no block"
27
- fails "Enumerable#each_cons yields only as much as needed"
28
- fails "Enumerable#each_cons works when n is >= full length"
29
- fails "Enumerable#each_cons tries to convert n to an Integer using #to_int"
30
- fails "Enumerable#each_cons raises an Argument Error if there is not a single parameter > 0"
31
4
  fails "Enumerable#each_cons passes element groups to the block"
32
-
5
+ fails "Enumerable#each_cons raises an ArgumentError if there is not a single parameter > 0"
6
+ fails "Enumerable#each_cons tries to convert n to an Integer using #to_int"
7
+ fails "Enumerable#each_cons when no block is given Enumerable with no size when no block is given returned Enumerator size returns nil"
8
+ fails "Enumerable#each_cons when no block is given Enumerable with size returned Enumerator size returns 0 when the argument is larger than self"
9
+ fails "Enumerable#each_cons when no block is given Enumerable with size returned Enumerator size returns 0 when the enum is empty"
10
+ fails "Enumerable#each_cons when no block is given Enumerable with size returned Enumerator size returns enum size - each_cons argument + 1"
11
+ fails "Enumerable#each_cons when no block is given returns an enumerator"
12
+ fails "Enumerable#each_cons works when n is >= full length"
13
+ fails "Enumerable#each_cons yields only as much as needed"
14
+ fails "Enumerable#each_entry Enumerable with no size when no block is given returned Enumerator size returns nil"
15
+ fails "Enumerable#each_entry Enumerable with size when no block is given returned Enumerator size returns the enumerable size"
33
16
  fails "Enumerable#each_entry passes extra arguments to #each"
34
17
  fails "Enumerable#each_entry passes through the values yielded by #each_with_index"
35
18
  fails "Enumerable#each_entry returns an enumerator if no block"
36
19
  fails "Enumerable#each_entry yields multiple arguments as an array"
37
-
38
- fails "Enumerable#minmax_by gathers whole arrays as elements when each yields multiple"
39
- fails "Enumerable#minmax_by is able to return the maximum for enums that contain nils"
40
- fails "Enumerable#minmax_by uses min/max.<=>(current) to determine order"
41
- fails "Enumerable#minmax_by returns the object that appears first in #each in case of a tie"
42
- fails "Enumerable#minmax_by returns the object for whom the value returned by block is the largest"
43
- fails "Enumerable#minmax_by returns nil if #each yields no objects"
44
- fails "Enumerable#minmax_by returns an enumerator if no block"
45
-
20
+ fails "Enumerable#first raises a RangeError when passed a Bignum"
46
21
  fails "Enumerable#minmax gathers whole arrays as elements when each yields multiple"
47
- fails "Enumerable#minmax returns the minimum when using a block rule"
22
+ fails "Enumerable#minmax min should return the minimum element"
48
23
  fails "Enumerable#minmax raises a NoMethodError for elements without #<=>"
49
24
  fails "Enumerable#minmax raises an ArgumentError when elements are incomparable"
25
+ fails "Enumerable#minmax returns the minimum when using a block rule"
50
26
  fails "Enumerable#minmax returns [nil, nil] for an empty Enumerable"
51
- fails "Enumerable#minmax min should return the minimum element"
52
-
27
+ fails "Enumerable#minmax_by Enumerable with no size when no block is given returned Enumerator size returns nil"
28
+ fails "Enumerable#minmax_by Enumerable with size when no block is given returned Enumerator size returns the enumerable size"
29
+ fails "Enumerable#minmax_by gathers whole arrays as elements when each yields multiple"
30
+ fails "Enumerable#minmax_by is able to return the maximum for enums that contain nils"
31
+ fails "Enumerable#minmax_by returns an enumerator if no block"
32
+ fails "Enumerable#minmax_by returns nil if #each yields no objects"
33
+ fails "Enumerable#minmax_by returns the object for whom the value returned by block is the largest"
34
+ fails "Enumerable#minmax_by returns the object that appears first in #each in case of a tie"
35
+ fails "Enumerable#minmax_by uses min/max.<=>(current) to determine order"
53
36
  fails "Enumerable#reverse_each gathers whole arrays as elements when each yields multiple"
54
-
55
- fails "Enumerable#sort gathers whole arrays as elements when each yields multiple"
56
- fails "Enumerable#sort raises an error if objects can't be compared"
57
37
  fails "Enumerable#sort compare values returned by block with 0"
58
- fails "Enumerable#sort sorts enumerables that contain nils"
59
- fails "Enumerable#sort raises a NoMethodError if elements do not define <=>"
60
- fails "Enumerable#sort yields elements to the provided block"
61
- fails "Enumerable#sort sorts by the natural order as defined by <=>"
62
-
38
+ fails "Enumerable#sort raises an error if objects can't be compared"
63
39
  fails "Enumerable#take_while calls the block with initial args when yielded with multiple arguments"
64
-
65
- fails "Enumerable#zip passes each element of the result array to a block and return nil if a block is given"
66
- fails "Enumerable#zip converts arguments to arrays using #to_ary"
67
- fails "Enumerable#zip converts arguments to enums using #to_enum"
68
- fails "Enumerable#zip gathers whole arrays as elements when each yields multiple"
69
-
70
- fails "Enumerable#first raises a RangeError when passed a Bignum"
40
+ fails "Enumerable#to_h calls #to_ary on contents"
71
41
  fails "Enumerable#to_h converts empty enumerable to empty hash"
72
42
  fails "Enumerable#to_h converts yielded [key, value] pairs to a hash"
73
- fails "Enumerable#to_h uses the last value of a duplicated key"
74
- fails "Enumerable#to_h calls #to_ary on contents"
75
43
  fails "Enumerable#to_h forwards arguments to #each"
76
- fails "Enumerable#to_h raises TypeError if an element is not an array"
77
44
  fails "Enumerable#to_h raises ArgumentError if an element is not a [key, value] pair"
45
+ fails "Enumerable#to_h raises TypeError if an element is not an array"
46
+ fails "Enumerable#to_h uses the last value of a duplicated key"
47
+ fails "Enumerable#zip converts arguments to enums using #to_enum"
48
+ fails "Enumerable#zip gathers whole arrays as elements when each yields multiple"
49
+ fails "Enumerable#zip passes each element of the result array to a block and return nil if a block is given"
50
+ fails "Enumerator#size returns the result from size.call if the size respond to call "
78
51
  end
@@ -1,3 +1,45 @@
1
1
  opal_filter "Enumerator" do
2
+ fails "#enum_for exposes multi-arg yields as an array"
3
+ fails "#to_enum exposes multi-arg yields as an array"
2
4
  fails "Enumerator#each requires multiple arguments" # arity issue
5
+ fails "Enumerator#each_with_index passes on the given block's return value"
6
+ fails "Enumerator#each_with_index raises an ArgumentError if passed extra arguments"
7
+ fails "Enumerator#each_with_index returns the iterator's return value"
8
+ fails "Enumerator#each_with_index returns the object being enumerated when given a block"
9
+ fails "Enumerator#feed can be called for each iteration"
10
+ fails "Enumerator#feed causes yield to return the value if called during iteration"
11
+ fails "Enumerator#feed raises a TypeError if called more than once without advancing the enumerator"
12
+ fails "Enumerator#feed returns nil"
13
+ fails "Enumerator#feed sets the future return value of yield if called before advancing the iterator"
14
+ fails "Enumerator#feed sets the return value of Yielder#yield"
15
+ fails "Enumerator#initialize is a private method"
16
+ fails "Enumerator#initialize on frozen instance raises a RuntimeError"
17
+ fails "Enumerator#initialize returns self when given a block"
18
+ fails "Enumerator#initialize returns self when given an object"
19
+ fails "Enumerator#initialize sets size to nil if size is not given"
20
+ fails "Enumerator#initialize sets size to nil if the given size is nil"
21
+ fails "Enumerator#initialize sets size to the given size if the given size is a Fixnum"
22
+ fails "Enumerator#initialize sets size to the given size if the given size is a Proc"
23
+ fails "Enumerator#initialize sets size to the given size if the given size is Float::INFINITY"
24
+ fails "Enumerator#inject requires multiple arguments"
25
+ fails "Enumerator#next_values advances the position of the current element"
26
+ fails "Enumerator#next_values advances the position of the enumerator each time when called multiple times"
27
+ fails "Enumerator#next_values raises StopIteration if called on a finished enumerator"
28
+ fails "Enumerator#next_values returns an array with only nil if yield is called with nil"
29
+ fails "Enumerator#next_values returns an empty array if yield is called without arguments"
30
+ fails "Enumerator#next_values returns the next element in self"
31
+ fails "Enumerator#next_values works in concert with #rewind"
32
+ fails "Enumerator#peek can be called repeatedly without advancing the position of the current element"
33
+ fails "Enumerator#peek does not advance the position of the current element"
34
+ fails "Enumerator#peek raises StopIteration if called on a finished enumerator"
35
+ fails "Enumerator#peek returns the next element in self"
36
+ fails "Enumerator#peek works in concert with #rewind"
37
+ fails "Enumerator#peek_values can be called repeatedly without advancing the position of the current element"
38
+ fails "Enumerator#peek_values does not advance the position of the current element"
39
+ fails "Enumerator#peek_values raises StopIteration if called on a finished enumerator"
40
+ fails "Enumerator#peek_values returns an array with only nil if yield is called with nil"
41
+ fails "Enumerator#peek_values returns an empty array if yield is called without arguments"
42
+ fails "Enumerator#peek_values returns the next element in self"
43
+ fails "Enumerator#peek_values works in concert with #rewind"
44
+ fails "Enumerator#size returns returning value from size.call if set size is a Proc"
3
45
  end
@@ -1,12 +1,68 @@
1
1
  opal_filter "Exception" do
2
- fails "Exception#message calls #to_s on self"
3
-
4
- fails "Exception.new returns the exception when it has a custom constructor"
5
-
6
- fails "Exception#to_s returns the self's name if no message is set"
7
- fails "Exception#to_s calls #to_s on the message"
8
-
9
- fails "Exception#inspect returns the class name when #to_s returns an empty string"
10
- fails "Exception#inspect includes #to_s when the result is non-empty"
11
- fails "Exception#inspect returns '#<Exception: Exception>' when no message given"
2
+ fails "ArgumentError gives its own class name as message if it has no message"
3
+ fails "Errno::EAGAIN is the same class as Errno::EWOULDBLOCK if they represent the same errno value"
4
+ fails "Errno::EINVAL.new accepts an optional custom message and location"
5
+ fails "Errno::EINVAL.new accepts an optional custom message"
6
+ fails "Errno::EINVAL.new can be called with no arguments"
7
+ fails "Errno::EMFILE can be subclassed"
8
+ fails "Exception is a superclass of EncodingError"
9
+ fails "Exception is a superclass of Interrupt"
10
+ fails "Exception is a superclass of SecurityError"
11
+ fails "Exception is a superclass of SystemStackError"
12
+ fails "Exception#== returns false if the two exceptions differ only in their backtrace"
13
+ fails "Exception#== returns false if the two exceptions differ only in their message"
14
+ fails "Exception#== returns false if the two exceptions inherit from Exception but have different classes"
15
+ fails "Exception#== returns true if both exceptions have the same class, no message, and no backtrace"
16
+ fails "Exception#== returns true if both exceptions have the same class, the same message, and no backtrace"
17
+ fails "Exception#== returns true if both exceptions have the same class, the same message, and the same backtrace"
18
+ fails "Exception#== returns true if one exception is the dup'd copy of the other"
19
+ fails "Exception#== returns true if the two objects subclass Exception and have the same message and backtrace"
20
+ fails "Exception#backtrace contains lines of the same format for each prior position in the stack"
21
+ fails "Exception#backtrace includes the filename of the location immediately prior to where self raised in the second element"
22
+ fails "Exception#backtrace includes the filename of the location where self raised in the first element"
23
+ fails "Exception#backtrace includes the line number of the location immediately prior to where self raised in the second element"
24
+ fails "Exception#backtrace includes the line number of the location where self raised in the first element"
25
+ fails "Exception#backtrace includes the name of the method from where self raised in the first element"
26
+ fails "Exception#backtrace returns an Array"
27
+ fails "Exception#backtrace returns nil if no backtrace was set"
28
+ fails "Exception#backtrace sets each element to a String"
29
+ fails "Exception#set_backtrace accepts a String"
30
+ fails "Exception#set_backtrace accepts an Array of Strings"
31
+ fails "Exception#set_backtrace accepts an empty Array"
32
+ fails "Exception#set_backtrace accepts nil"
33
+ fails "Exception#set_backtrace allows the user to set the backtrace from a rescued exception"
34
+ fails "Exception#set_backtrace raises a TypeError when passed a Symbol"
35
+ fails "Exception#set_backtrace raises a TypeError when the argument is a nested array"
36
+ fails "Exception#set_backtrace raises a TypeError when the Array contains a Symbol"
37
+ fails "Exception#set_backtrace raises a TypeError when the array contains nil"
38
+ fails "IOError is a superclass of EOFError"
39
+ fails "NameError.new NameError.new should take optional name argument"
40
+ fails "NoMethodError#args returns an array with the same elements as passed to the method"
41
+ fails "NoMethodError#args returns an empty array if the caller method had no arguments"
42
+ fails "NoMethodError#message for an protected method match /protected method/"
43
+ fails "NoMethodError#message for private method match /private method/"
44
+ fails "NoMethodError.new allows passing method args"
45
+ fails "rescueing SignalException raises a SignalException when sent a signal"
46
+ fails "SignalException.new raises an exception for an optional argument with a signal name"
47
+ fails "SignalException.new raises an exception with an invalid signal name"
48
+ fails "SignalException.new raises an exception with an invalid signal number"
49
+ fails "SignalException.new takes a signal name with SIG prefix as the first argument"
50
+ fails "SignalException.new takes a signal name without SIG prefix as the first argument"
51
+ fails "SignalException.new takes a signal number as the first argument"
52
+ fails "SignalException.new takes a signal symbol with SIG prefix as the first argument"
53
+ fails "SignalException.new takes a signal symbol without SIG prefix as the first argument"
54
+ fails "SignalException.new takes an optional message argument with a signal number"
55
+ fails "StandardError is a superclass of ZeroDivisionError"
56
+ fails "StopIteration#result returns the method-returned-object from an Enumerator"
57
+ fails "SystemCallError can be subclassed"
58
+ fails "SystemCallError#errno returns nil when no errno given"
59
+ fails "SystemCallError#errno returns the errno given as optional argument to new"
60
+ fails "SystemCallError#message returns the default message when no message is given"
61
+ fails "SystemCallError.new accepts an optional custom message preceding the errno"
62
+ fails "SystemCallError.new accepts an optional third argument specifying the location"
63
+ fails "SystemCallError.new accepts single Fixnum argument as errno"
64
+ fails "SystemCallError.new constructs the appropriate Errno class"
65
+ fails "SystemCallError.new requires at least one argument"
66
+ fails "SystemCallError.new returns an arity of -1 for the initialize method"
67
+ fails "SystemStackError is a subclass of Exception"
12
68
  end