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
@@ -0,0 +1,88 @@
1
+ opal_filter "language (opal)" do
2
+ fails "A block allows for a leading space before the arguments"
3
+ fails "A block taking nested |a, ((b, c), d)| assigns nil to the arguments when yielded no values"
4
+ fails "A block taking nested |a, ((b, c), d)| destructures a single multi-level Array value yielded"
5
+ fails "A block taking nested |a, ((b, c), d)| destructures separate yielded values"
6
+ fails "A block taking nested |a, (b, (c, d))| assigns nil to the arguments when yielded no values"
7
+ fails "A block taking nested |a, (b, (c, d))| destructures a single multi-level Array value yielded"
8
+ fails "A block taking nested |a, (b, (c, d))| destructures separate yielded values"
9
+ fails "A block taking |(a, b), c| arguments assigns nil to the arguments when yielded no values"
10
+ fails "A block taking |(a, b), c| arguments calls #to_ary to convert a single yielded object to an Array"
11
+ fails "A block taking |(a, b), c| arguments destructures a single one-level Array value yielded"
12
+ fails "A block taking |(a, b), c| arguments does not call #to_ary if the object does not respond to #to_ary"
13
+ fails "A block taking |(a, b), c| arguments does not call #to_ary if the single yielded object is an Array"
14
+ fails "A block taking |(a, b), c| arguments raises an TypeError if #to_ary does not return an Array"
15
+ fails "A block taking |(a, b)| arguments calls #to_ary to convert a single yielded object to an Array"
16
+ fails "A block taking |(a, b)| arguments raises an TypeError if #to_ary does not return an Array"
17
+ fails "A block taking |*| arguments does not call #to_ary if the object does not respond to #to_ary"
18
+ fails "A block taking |*| arguments does not raise an exception when no values are yielded"
19
+ fails "A block taking |*| arguments does not raise an exception when values are yielded"
20
+ fails "A block taking |a, *b| arguments calls #to_ary to convert a single yielded object to an Array"
21
+ fails "A block taking |a, *b| arguments raises an TypeError if #to_ary does not return an Array"
22
+ fails "A block taking |a, b| arguments calls #to_ary to convert a single yielded object to an Array"
23
+ fails "A block taking |a, b| arguments raises an TypeError if #to_ary does not return an Array"
24
+ fails "A block taking |a, | arguments assgins the argument a single value yielded"
25
+ fails "A block taking |a, | arguments assigns nil to the argument when no values are yielded"
26
+ fails "A block taking |a, | arguments assigns nil to the argument when passed an empty Array"
27
+ fails "A block taking |a, | arguments assigns the argument the first element of the Array when passed a single Array"
28
+ fails "A block taking |a, | arguments assigns the argument the first of several values yielded when it is an Array"
29
+ fails "A block taking |a, | arguments assigns the argument the first value yielded"
30
+ fails "A block taking |a, | arguments calls #to_ary to convert a single yielded object to an Array"
31
+ fails "A block taking |a, | arguments does not call #to_ary if the object does not respond to #to_ary"
32
+ fails "A block taking |a, | arguments does not call #to_ary if the single yielded object is an Array"
33
+ fails "A block taking |a, | arguments raises an TypeError if #to_ary does not return an Array"
34
+ fails "A Proc taking zero arguments raises an ArgumentErro if a value is passed"
35
+ fails "A Proc taking |(a, b)| arguments calls #to_ary to convert a single passed object to an Array"
36
+ fails "A Proc taking |(a, b)| arguments destructures a single Array value yielded"
37
+ fails "A Proc taking |(a, b)| arguments raises an ArgumentError when passed no values"
38
+ fails "A Proc taking |(a, b)| arguments raises an TypeError if #to_ary does not return an Array"
39
+ fails "A Proc taking |*| arguments does not call #to_ary to convert a single passed object to an Array"
40
+ fails "A Proc taking |*| arguments does not raise an exception when passed multiple values"
41
+ fails "A Proc taking |*| arguments does not raise an exception when passed no values"
42
+ fails "A Proc taking |a, *b| arguments raises an ArgumentError if passed no values"
43
+ fails "A Proc taking |a, b| arguments does not call #to_ary to convert a single passed object to an Array"
44
+ fails "A Proc taking |a, b| arguments raises an ArgumentError if passed no values"
45
+ fails "A Proc taking |a, b| arguments raises an ArgumentError if passed one value"
46
+ fails "A Proc taking |a, | arguments assigns the argument the value passed"
47
+ fails "A Proc taking |a, | arguments does not call #to_ary to convert a single passed object to an Array"
48
+ fails "A Proc taking |a, | arguments does not destructure when passed a single Array"
49
+ fails "A Proc taking |a, | arguments raises an ArgumentError when passed more than one value"
50
+ fails "A Proc taking |a, | arguments raises an ArgumentError when passed no values"
51
+ fails "A Proc taking |a| arguments raises an ArgumentError if no value is passed"
52
+ fails "A Proc taking || arguments raises an ArgumentError if a value is passed"
53
+ fails "An instance method with keyword arguments when there is a single keyword argument raises an argument error when an unknown keyword argument is provided"
54
+ fails "Assigning multiple values allows complex parallel assignment"
55
+ fails "Assigning multiple values calls #to_ary on RHS arg if the corresponding LHS var is a splat"
56
+ fails "Assigning multiple values returns the rhs values used for assignment as an array"
57
+ fails "Basic multiple assignment with a single RHS value does not call #to_a on an Array subclass instance"
58
+ fails "Basic multiple assignment with a single RHS value does not call #to_ary on an Array subclass instance"
59
+ fails "Basic multiple assignment with a splatted single RHS value does not call #to_a on an Array instance"
60
+ fails "Basic multiple assignment with a splatted single RHS value does not call #to_a on an Array subclass instance"
61
+ fails "Conditional operator assignment 'obj.meth op= expr' may not assign at all, depending on the truthiness of lhs"
62
+ fails "Conditional operator assignment 'obj[idx] op= expr' is equivalent to 'obj[idx] op obj[idx] = expr'"
63
+ fails "Conditional operator assignment 'obj[idx] op= expr' may not assign at all, depending on the truthiness of lhs"
64
+ fails "Conditional operator assignment 'obj[idx] op= expr' uses short-circuit arg evaluation"
65
+ fails "Conditional operator assignment 'var op= expr' may not assign at all, depending on the truthiness of lhs"
66
+ fails "Invoking a method raises a SyntaxError with both a literal block and an object as block"
67
+ fails "Invoking a method with an object as a block uses 'to_proc' for coercion"
68
+ fails "Invoking a method with manditory and optional arguments raises an ArgumentError if too many values are passed"
69
+ fails "Invoking a method with optional arguments raises ArgumentError if extra arguments are passed"
70
+ fails "Invoking a private getter method does not permit self as a receiver"
71
+ fails "Module#const_defined? should not search parent scopes of classes and modules if inherit is false"
72
+ fails "Module#const_get should not search parent scopes of classes and modules if inherit is false"
73
+ fails "Module#method_defined? converts the given name to a string using to_str"
74
+ fails "Module#method_defined? raises a TypeError when the given object is not a string/symbol/fixnum"
75
+ fails "Module#method_defined? returns true if a public or private method with the given name is defined in self, self's ancestors or one of self's included modules"
76
+ fails "Multiple assignment has the proper return value"
77
+ fails "Multiple assignment, array-style returns an array of all rhs values"
78
+ fails "Multiple assignments with grouping A group on the lhs is considered one position and treats its corresponding rhs position like an Array"
79
+ fails "Multiple assignments with grouping supports multiple levels of nested groupings"
80
+ fails "Operator assignment 'obj[idx] op= expr' handles complex index (idx) arguments"
81
+ fails "Operator assignment 'obj[idx] op= expr' handles empty index (idx) arguments"
82
+ fails "Operator assignment 'obj[idx] op= expr' handles empty splat index (idx) arguments"
83
+ fails "Operator assignment 'obj[idx] op= expr' handles multiple splat index (idx) arguments"
84
+ fails "Operator assignment 'obj[idx] op= expr' handles single splat index (idx) arguments"
85
+ fails "Operator assignment 'obj[idx] op= expr' handles splat index (idx) arguments with normal arguments"
86
+ fails "Operator assignment 'obj[idx] op= expr' returns result of rhs not result of []="
87
+ fails "Unconditional operator assignment 'obj[idx] op= expr' is equivalent to 'obj[idx] = obj[idx] op expr'"
88
+ end
@@ -1,75 +1,216 @@
1
1
  opal_filter "Module" do
2
- fails "passed { |a, b = 1| } creates a method that raises an ArgumentError when passed zero arguments"
3
- fails "passed { |a, b = 1| } creates a method that raises an ArgumentError when passed three arguments"
4
- fails "Module#define_method passed { } creates a method that raises an ArgumentError when passed one argument"
5
- fails "Module#define_method calls #method_added after the method is added to the Module"
6
- fails "Module#define_method passed { } creates a method that raises an ArgumentError when passed two arguments"
7
- fails "Module#define_method passed { || } creates a method that raises an ArgumentError when passed one argument"
8
- fails "Module#define_method passed { || } creates a method that raises an ArgumentError when passed two arguments"
9
- fails "Module#define_method passed { |a| } creates a method that raises an ArgumentError when passed zero arguments"
10
- fails "Module#define_method passed { |a| } creates a method that raises an ArgumentError when passed zero arguments and a block"
11
- fails "Module#define_method passed { |a| } creates a method that raises an ArgumentError when passed two arguments"
12
- fails "Module#define_method passed { |a, *b| } creates a method that raises an ArgumentError when passed zero arguments"
13
- fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed zero arguments"
14
- fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed one argument"
15
- fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed one argument and a block"
16
- fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed three arguments"
17
- fails "Module#define_method passed { |a, b, *c| } creates a method that raises an ArgumentError when passed zero arguments"
18
- fails "Module#define_method passed { |a, b, *c| } creates a method that raises an ArgumentError when passed one argument"
19
- fails "Module#define_method passed { |a, b, *c| } creates a method that raises an ArgumentError when passed one argument and a block"
20
- fails "Module#define_method does not change the arity check style of the original proc"
21
- fails "A class definition has no class variables"
22
- fails "A class definition allows the declaration of class variables in the body"
23
- fails "A class definition allows the declaration of class variables in a class method"
24
- fails "A class definition allows the declaration of class variables in an instance method"
25
-
26
- fails "Module#method_defined? converts the given name to a string using to_str"
27
- fails "Module#method_defined? raises a TypeError when the given object is not a string/symbol/fixnum"
28
- fails "Module#method_defined? does not search Object or Kernel when called on a module"
29
- fails "Module#method_defined? returns true if a public or private method with the given name is defined in self, self's ancestors or one of self's included modules"
30
-
31
- fails "Module#const_defined? should not search parent scopes of classes and modules if inherit is false"
32
- fails "Module#const_get should not search parent scopes of classes and modules if inherit is false"
33
- fails "Module#const_get raises a NameError with the not found constant symbol"
2
+ fails "Module#< raises a TypeError if the argument is not a class/module"
3
+ fails "Module#< returns nil if self is not related to the given module"
4
+ fails "Module#< returns true if self is a subclass of or includes the given module"
5
+ fails "Module#<= raises a TypeError if the argument is not a class/module"
6
+ fails "Module#<= returns nil if self is not related to the given module"
7
+ fails "Module#<= returns true if self is a subclass of, the same as or includes the given module"
8
+ fails "Module#<=> returns +1 if self is a superclas of or included by the given module"
9
+ fails "Module#<=> returns -1 if self is a subclass of or includes the given module"
10
+ fails "Module#=== returns true when the given Object's class includes self or when the given Object is extended by self"
11
+ fails "Module#> raises a TypeError if the argument is not a class/module"
12
+ fails "Module#> returns false if self is a subclass of or includes the given module"
13
+ fails "Module#> returns false if self is the same as the given module"
14
+ fails "Module#> returns nil if self is not related to the given module"
15
+ fails "Module#> returns true if self is a superclass of or included by the given module"
16
+ fails "Module#>= raises a TypeError if the argument is not a class/module"
17
+ fails "Module#>= returns false if self is a subclass of or includes the given module"
18
+ fails "Module#>= returns nil if self is not related to the given module"
19
+ fails "Module#>= returns true if self is a superclass of, the same as or included by given module"
20
+ fails "Module#alias_method accesses a method defined on Object from Kernel"
21
+ fails "Module#alias_method can call a method with super aliased twice"
22
+ fails "Module#alias_method fails if origin method not found"
23
+ fails "Module#alias_method preserves the arguments information of the original methods"
24
+ fails "Module#alias_method raises a TypeError when the given name can't be converted using to_str"
25
+ fails "Module#alias_method retains method visibility"
26
+ fails "Module#ancestors returns only modules and classes"
27
+ fails "Module#ancestors when called on a singleton class includes the singleton classes of ancestors"
28
+ fails "Module#append_features copies own tainted status to the given module"
29
+ fails "Module#append_features copies own untrusted status to the given module"
30
+ fails "Module#append_features on Class raises a TypeError if calling after rebinded to Class"
31
+ fails "Module#append_features raises an ArgumentError on a cyclic include"
32
+ fails "Module#attr applies current visibility to methods created"
33
+ fails "Module#attr converts non string/symbol/fixnum names to strings using to_str"
34
+ fails "Module#attr creates a getter but no setter for all given attribute names"
35
+ fails "Module#attr creates a getter for the given attribute name"
36
+ fails "Module#attr raises a TypeError when the given names can't be converted to strings using to_str"
37
+ fails "Module#attr_accessor allows creating an attr_accessor on an immediate class"
38
+ fails "Module#attr_accessor applies current visibility to methods created"
39
+ fails "Module#attr_accessor converts non string/symbol/fixnum names to strings using to_str"
40
+ fails "Module#attr_accessor raises a TypeError when the given names can't be converted to strings using to_str"
41
+ fails "Module#attr_reader allows for adding an attr_reader to an immediate"
42
+ fails "Module#attr_reader applies current visibility to methods created"
43
+ fails "Module#attr_reader converts non string/symbol/fixnum names to strings using to_str"
44
+ fails "Module#attr_reader raises a TypeError when the given names can't be converted to strings using to_str"
45
+ fails "Module#attr_writer allows for adding an attr_writer to an immediate"
46
+ fails "Module#attr_writer applies current visibility to methods created"
47
+ fails "Module#attr_writer converts non string/symbol/fixnum names to strings using to_str"
48
+ fails "Module#attr_writer raises a TypeError when the given names can't be converted to strings using to_str"
49
+ fails "Module#class_eval adds methods respecting the lexical constant scope"
50
+ fails "Module#class_eval converts a non-string filename to a string using to_str"
51
+ fails "Module#class_eval converts non string eval-string to string using to_str"
52
+ fails "Module#class_eval defines constants in the receiver's scope"
53
+ fails "Module#class_eval evaluates a given string in the context of self"
54
+ fails "Module#class_eval raises a TypeError when the given eval-string can't be converted to string using to_str"
55
+ fails "Module#class_eval raises a TypeError when the given filename can't be converted to string using to_str"
56
+ fails "Module#class_eval resolves constants in the caller scope ignoring send"
57
+ fails "Module#class_eval resolves constants in the caller scope"
58
+ fails "Module#class_eval resolves constants in the receiver's scope"
59
+ fails "Module#class_eval uses the optional filename and lineno parameters for error messages"
60
+ fails "Module#class_exec defines method in the receiver's scope"
61
+ fails "Module#class_exec passes arguments to the block"
62
+ fails "Module#class_exec raises a LocalJumpError when no block is given"
63
+ fails "Module#class_variables does not return class variables defined in extended modules"
64
+ fails "Module#class_variables returns an Array of Symbols of class variable names defined in a metaclass"
65
+ fails "Module#class_variables returns an Array with names of class variables defined in metaclasses"
66
+ fails "Module#class_variables returns an Array with the names of class variables of self"
67
+ fails "Module#class_variable_defined? converts a non string/symbol/fixnum name to string using to_str"
68
+ fails "Module#class_variable_defined? raises a TypeError when the given names can't be converted to strings using to_str"
69
+ fails "Module#class_variable_defined? returns false if a class variables with the given name is defined in an extended module"
70
+ fails "Module#class_variable_defined? returns false if the class variable is not defined in a metaclass"
71
+ fails "Module#class_variable_defined? returns true if a class variable with the given name is defined in self"
72
+ fails "Module#class_variable_defined? returns true if a class variable with the given name is defined in the metaclass"
73
+ fails "Module#class_variable_defined? returns true if a class variables with the given name is defined in an included module"
74
+ fails "Module#class_variable_defined? returns true if the class variable is defined in a metaclass"
75
+ fails "Module#class_variable_get returns the value of a class variable with the given name defined in an included module"
76
+ fails "Module#class_variable_set sets the value of a class variable with the given name defined in an included module"
77
+ fails "Module#constants doesn't returns inherited constants when passed false"
78
+ fails "Module#constants doesn't returns inherited constants when passed nil"
79
+ fails "Module#constants includes names of constants defined after a module is included"
80
+ fails "Module#constants returns all constants including inherited when passed some object"
81
+ fails "Module#constants returns all constants including inherited when passed true"
82
+ fails "Module#constants returns an array of Symbol names of all constants defined in the module and all included modules"
83
+ fails "Module#constants returns only public constants"
84
+ fails "Module#const_get accepts a toplevel scope qualifier"
34
85
  fails "Module#const_get calls #to_str to convert the given name to a String"
35
- fails "Module#const_get raises a TypeError if conversion to a String by calling #to_str fails"
36
86
  fails "Module#const_get does not search the singleton class of a Class or Module"
37
- fails "Module#const_get raises a NameError if the constant is defined in the receiver's supperclass and the inherit flag is false"
38
- fails "Module#const_get accepts a toplevel scope qualifier"
39
87
  fails "Module#const_get raises a NameError if a Symbol is a scoped constant name"
88
+ fails "Module#const_get raises a NameError if the constant is defined in the receiver's supperclass and the inherit flag is false"
89
+ fails "Module#const_get raises a NameError with the not found constant symbol"
90
+ fails "Module#const_get raises a TypeError if conversion to a String by calling #to_str fails"
40
91
  fails "Module#const_get with dynamically assigned constants searches a module included in the immediate class before the superclass"
41
92
  fails "Module#const_get with dynamically assigned constants searches a module included in the superclass"
42
93
  fails "Module#const_get with dynamically assigned constants searches the superclass chain"
43
-
44
- fails "Module#class_variable_set sets the value of a class variable with the given name defined in an included module"
45
- fails "Module#class_variable_get returns the value of a class variable with the given name defined in an included module"
46
-
47
- fails "Module#module_function as a toggle (no arguments) in a Module body functions normally if both toggle and definitions inside a eval"
48
- fails "Module#module_function as a toggle (no arguments) in a Module body does not affect definitions when inside an eval even if the definitions are outside of it"
49
-
50
- fails "Module#module_function is a private method"
51
- fails "Module#module_function on Class raises a TypeError if calling after rebinded to Class"
52
- fails "Module#module_function with specific method names makes the instance methods private"
53
- fails "Module#module_function with specific method names makes the new Module methods public"
54
- fails "Module#module_function with specific method names tries to convert the given names to strings using to_str"
55
- fails "Module#module_function with specific method names raises a TypeError when the given names can't be converted to string using to_str"
56
- fails "Module#module_function with specific method names can make accessible private methods"
57
- fails "Module#module_function as a toggle (no arguments) in a Module body does not affect module_evaled method definitions also if outside the eval itself"
58
- fails "Module#module_function as a toggle (no arguments) in a Module body has no effect if inside a module_eval if the definitions are outside of it"
59
- fails "Module#module_function with specific method names creates an independent copy of the method, not a redirect"
60
-
94
+ fails "Module#const_missing raises NameError and does not include toplevel Object"
95
+ fails "Module#define_method does not change the arity check style of the original proc"
96
+ fails "Module#define_method passed { } creates a method that raises an ArgumentError when passed one argument"
97
+ fails "Module#define_method passed { } creates a method that raises an ArgumentError when passed two arguments"
98
+ fails "Module#define_method passed { |a, *b| } creates a method that raises an ArgumentError when passed zero arguments"
99
+ fails "Module#define_method passed { |a, b, *c| } creates a method that raises an ArgumentError when passed one argument and a block"
100
+ fails "Module#define_method passed { |a, b, *c| } creates a method that raises an ArgumentError when passed one argument"
101
+ fails "Module#define_method passed { |a, b, *c| } creates a method that raises an ArgumentError when passed zero arguments"
102
+ fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed one argument and a block"
103
+ fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed one argument"
104
+ fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed three arguments"
105
+ fails "Module#define_method passed { |a, b| } creates a method that raises an ArgumentError when passed zero arguments"
106
+ fails "Module#define_method passed { |a| } creates a method that raises an ArgumentError when passed two arguments"
107
+ fails "Module#define_method passed { |a| } creates a method that raises an ArgumentError when passed zero arguments and a block"
108
+ fails "Module#define_method passed { |a| } creates a method that raises an ArgumentError when passed zero arguments"
109
+ fails "Module#define_method passed { || } creates a method that raises an ArgumentError when passed one argument"
110
+ fails "Module#define_method passed { || } creates a method that raises an ArgumentError when passed two arguments"
111
+ fails "Module#define_method raises a TypeError when a Method from a singleton class is defined on another class"
112
+ fails "Module#define_method raises a TypeError when a Method from one class is defined on an unrelated class"
113
+ fails "Module#define_method raises a TypeError when an UnboundMethod from a child class is defined on a parent class"
114
+ fails "Module#define_method raises a TypeError when an UnboundMethod from one class is defined on an unrelated class"
115
+ fails "Module#extend_object does not copy own tainted status to the given object"
116
+ fails "Module#extend_object does not copy own untrusted status to the given object"
117
+ fails "Module#extend_object extends the given object with its constants and methods by default"
118
+ fails "Module#extend_object is called when #extend is called on an object"
119
+ fails "Module#extend_object on Class raises a TypeError if calling after rebinded to Class"
61
120
  fails "Module#include adds all ancestor modules when a previously included module is included again"
62
- fails "Module#include raises a TypeError when the argument is not a Module"
63
- fails "Module#include imports instance methods to modules and classes"
64
- fails "Module#include doesn't include module if it is included in a super class"
65
- fails "Module#include recursively includes new mixins"
66
- fails "Module#include preserves ancestor order"
67
121
  fails "Module#include detects cyclic includes"
122
+ fails "Module#include does not override existing constants in modules and classes"
123
+ fails "Module#include doesn't include module if it is included in a super class"
68
124
  fails "Module#include ignores modules it has already included via module mutual inclusion"
69
- fails "Module#include? returns true if the given module is included by self or one of it's ancestors"
125
+ fails "Module#include preserves ancestor order"
126
+ fails "Module#include raises a TypeError when the argument is not a Module"
127
+ fails "Module#include recursively includes new mixins"
70
128
  fails "Module#include? raises a TypeError when no module was given"
71
-
129
+ fails "Module#include? returns true if the given module is included by self or one of it's ancestors"
130
+ fails "Module#included_modules returns a list of modules included in self"
131
+ fails "Module#initialize is called on subclasses"
132
+ fails "Module#instance_method gives UnboundMethod method name, Module defined in and Module extracted from"
133
+ fails "Module#instance_method raises a NameError if the method has been undefined"
134
+ fails "Module#instance_method raises a TypeError if not passed a symbol"
135
+ fails "Module#instance_method raises a TypeError if the given name is not a string/symbol"
136
+ fails "Module#instance_method sets the NameError#name attribute to the name of the missing method"
137
+ fails "Module#method_defined? converts the given name to a string using to_str"
138
+ fails "Module#method_defined? raises a TypeError when the given object is not a string/symbol/fixnum"
139
+ fails "Module#method_defined? returns true if a public or private method with the given name is defined in self, self's ancestors or one of self's included modules"
140
+ fails "Module#module_eval adds methods respecting the lexical constant scope"
141
+ fails "Module#module_eval converts a non-string filename to a string using to_str"
142
+ fails "Module#module_eval converts non string eval-string to string using to_str"
143
+ fails "Module#module_eval defines constants in the receiver's scope"
144
+ fails "Module#module_eval evaluates a given string in the context of self"
145
+ fails "Module#module_eval raises a TypeError when the given eval-string can't be converted to string using to_str"
146
+ fails "Module#module_eval raises a TypeError when the given filename can't be converted to string using to_str"
147
+ fails "Module#module_eval resolves constants in the caller scope ignoring send"
148
+ fails "Module#module_eval resolves constants in the caller scope"
149
+ fails "Module#module_eval resolves constants in the receiver's scope"
150
+ fails "Module#module_eval uses the optional filename and lineno parameters for error messages"
151
+ fails "Module#module_exec defines method in the receiver's scope"
152
+ fails "Module#module_exec passes arguments to the block"
153
+ fails "Module#module_exec raises a LocalJumpError when no block is given"
154
+ fails "Module#module_function as a toggle (no arguments) in a Module body affects evaled method definitions also even when outside the eval itself"
155
+ fails "Module#module_function as a toggle (no arguments) in a Module body does not affect module_evaled method definitions also if outside the eval itself"
72
156
  fails "Module#module_function as a toggle (no arguments) in a Module body doesn't affect definitions when inside an eval even if the definitions are outside of it"
73
- fails "Module#define_method raises a TypeError when an UnboundMethod from a child class is defined on a parent class"
74
- fails "Module#define_method raises a TypeError when an UnboundMethod from one class is defined on an unrelated class"
157
+ fails "Module#module_function as a toggle (no arguments) in a Module body functions normally if both toggle and definitions inside a eval"
158
+ fails "Module#module_function as a toggle (no arguments) in a Module body has no effect if inside a module_eval if the definitions are outside of it"
159
+ fails "Module#module_function on Class raises a TypeError if calling after rebinded to Class"
160
+ fails "Module#module_function with specific method names raises a TypeError when the given names can't be converted to string using to_str"
161
+ fails "Module#module_function with specific method names tries to convert the given names to strings using to_str"
162
+ fails "Module#prepend accepts no-arguments"
163
+ fails "Module#prepend adds the module in the subclass chains"
164
+ fails "Module#prepend allows wrapping methods"
165
+ fails "Module#prepend also prepends included modules"
166
+ fails "Module#prepend calls #prepend_features(self) in reversed order on each module"
167
+ fails "Module#prepend calls prepended after prepend_features"
168
+ fails "Module#prepend causes the prepended module's method to be aliased by alias_method"
169
+ fails "Module#prepend clears any caches"
170
+ fails "Module#prepend depends on prepend_features to add the module"
171
+ fails "Module#prepend detects cyclic prepends"
172
+ fails "Module#prepend does not import constants"
173
+ fails "Module#prepend does not import methods to modules and classes"
174
+ fails "Module#prepend imports instance methods"
175
+ fails "Module#prepend includes prepended modules in ancestors"
176
+ fails "Module#prepend inserts a later prepended module into the chain"
177
+ fails "Module#prepend is a public method"
178
+ fails "Module#prepend keeps the module in the chain when dupping an intermediate module"
179
+ fails "Module#prepend keeps the module in the chain when dupping the class"
180
+ fails "Module#prepend prepends multiple modules in the right order"
181
+ fails "Module#prepend raises a TypeError when the argument is not a Module"
182
+ fails "Module#prepend reports the prepended module as the method owner"
183
+ fails "Module#prepend reports the prepended module as the unbound method owner"
184
+ fails "Module#prepend returns the class it's included into"
185
+ fails "Module#prepend sees an instance of a prepended class as kind of the prepended module"
186
+ fails "Module#prepend supports super when the module is prepended into a singleton class"
187
+ fails "Module#prepend throws a NoMethodError when there is no more superclass"
188
+ fails "Module#prepend works with subclasses"
189
+ fails "Module#prepended is invoked when self is prepended to another module or class"
190
+ fails "Module#prepend_features copies own tainted status to the given module"
191
+ fails "Module#prepend_features copies own untrusted status to the given module"
192
+ fails "Module#prepend_features gets called when self is included in another module/class"
193
+ fails "Module#prepend_features on Class raises a TypeError if calling after rebinded to Class"
194
+ fails "Module#prepend_features raises an ArgumentError on a cyclic prepend"
195
+ fails "Module#remove_class_variable raises a NameError when an uninitialized class variable is given"
196
+ fails "Module#remove_class_variable raises a NameError when passed a symbol with no leading @"
197
+ fails "Module#remove_class_variable raises a NameError when passed a symbol with one leading @"
198
+ fails "Module#remove_class_variable removes a class variable defined in a metaclass"
199
+ fails "Module#remove_class_variable removes class variable"
200
+ fails "Module#remove_class_variable returns the value of removing class variable"
201
+ fails "Module#remove_const calls #to_str to convert the given name to a String"
202
+ fails "Module#remove_const raises a NameError and does not call #const_missing if the constant is not defined directly in the module"
203
+ fails "Module#remove_const raises a NameError and does not call #const_missing if the constant is not defined"
204
+ fails "Module#remove_const raises a NameError if the name contains non-alphabetic characters except '_'"
205
+ fails "Module#remove_const raises a NameError if the name does not start with a capital letter"
206
+ fails "Module#remove_const raises a NameError if the name starts with a non-alphabetic character"
207
+ fails "Module#remove_const raises a TypeError if conversion to a String by calling #to_str fails"
208
+ fails "Module.allocate returns a fully-formed instance of Module"
209
+ fails "Module.constants returns an array of Symbol names"
210
+ fails "Module.constants returns Module's constants when given a parameter"
211
+ fails "Module.new creates a new Module and passes it to the provided block"
212
+ fails "Module::Nesting returns the list of Modules nested at the point of call"
213
+ fails "Module::Nesting returns the nesting for module/class declaring the called method"
214
+ fails "passed { |a, b = 1| } creates a method that raises an ArgumentError when passed three arguments"
215
+ fails "passed { |a, b = 1| } creates a method that raises an ArgumentError when passed zero arguments"
75
216
  end
@@ -0,0 +1,32 @@
1
+ opal_filter "Numeric" do
2
+ fails "Numeric#remainder returns the result of calling self#% with other - other if self is greater than 0 and other is less than 0"
3
+ fails "Numeric#remainder returns the result of calling self#% with other - other if self is less than 0 and other is greater than 0"
4
+ fails "Numeric#remainder returns the result of calling self#% with other if self and other are greater than 0"
5
+ fails "Numeric#remainder returns the result of calling self#% with other if self and other are less than 0"
6
+ fails "Numeric#remainder returns the result of calling self#% with other if self is 0"
7
+ fails "Numeric#singleton_method_added raises a TypeError when trying to define a singleton method on a Numeric"
8
+ fails "Numeric#step Numeric#step with [-infinity, -step] does not yield when self is -infinity"
9
+ fails "Numeric#step Numeric#step with [-infinity, step] does not yield when self is -infinity"
10
+ fails "Numeric#step Numeric#step with [infinity, -step] does not yield when self is +infinity"
11
+ fails "Numeric#step Numeric#step with [infinity, -step] does not yield when self is -infinity"
12
+ fails "Numeric#step Numeric#step with [infinity, step] does not yield when self is infinity"
13
+ fails "Numeric#step Numeric#step with [stop, +Infinity] does not yield when stop is -Infinity"
14
+ fails "Numeric#step Numeric#step with [stop, +step] when self, stop or step is a Float is careful about not yielding a value greater than limit"
15
+ fails "Numeric#step Numeric#step with [stop, -infinity] does not yield when stop is Infinity"
16
+ fails "Numeric#step Numeric#step with [stop, -step] when self, stop or step is a Float is careful about not yielding a value smaller than limit"
17
+ fails "Numeric#step Numeric#step with [stop, step] when self and stop are Fixnums but step is a String raises an ArgumentError if given a block"
18
+ fails "Numeric#step when no block is given returned Enumerator size raises an ArgumentError when step is 0"
19
+ fails "Numeric#step when no block is given returned Enumerator size raises an ArgumentError when step is 0.0"
20
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop and step are Fixnums and step is negative returns 0 if value < limit"
21
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop and step are Fixnums and step is negative returns the difference between self and stop divided by the number of steps"
22
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop and step are Fixnums and step is positive returns 0 if value > limit"
23
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop and step are Fixnums and step is positive returns the difference between self and stop divided by the number of steps"
24
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop or step is a Float and step is negative returns 0 if value < limit"
25
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop or step is a Float and step is negative returns 1 if step is Float::INFINITY"
26
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop or step is a Float and step is negative returns the difference between self and stop divided by the number of steps"
27
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop or step is a Float and step is positive returns 0 if value > limit"
28
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop or step is a Float and step is positive returns 1 if step is Float::INFINITY"
29
+ fails "Numeric#step when no block is given returned Enumerator size when self, stop or step is a Float and step is positive returns the difference between self and stop divided by the number of steps"
30
+ fails "Numeric#step with [stop, step] decrements self using #+ until self < stop when step < 0"
31
+ fails "Numeric#step with [stop, step] increments self using #+ until self > stop when step > 0"
32
+ end
@@ -0,0 +1,39 @@
1
+ opal_filter "Proc" do
2
+ fails "Module#remove_method accepts multiple arguments"
3
+ fails "Module#undef_method requires multiple arguments"
4
+ fails "Proc as an implicit block pass argument remains the same object if re-vivified by the target method"
5
+ fails "Proc#=== on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on excess arguments when self is a lambda"
6
+ fails "Proc#=== on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on missing arguments when self is a lambda"
7
+ fails "Proc#binding returns a Binding instance"
8
+ fails "Proc#binding returns the binding associated with self"
9
+ fails "Proc#call on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on excess arguments when self is a lambda"
10
+ fails "Proc#call on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on missing arguments when self is a lambda"
11
+ fails "Proc#curry with arity argument returns Procs with arities of -1 regardless of the value of _arity_"
12
+ fails "Proc#inspect for a proc created with lambda returns a description including '(lambda)' and optionally including file and line number"
13
+ fails "Proc#inspect for a proc created with UnboundMethod#to_proc returns a description including '(lambda)' and optionally including file and line number"
14
+ fails "Proc#lambda? is preserved when passing a Proc with & to the lambda keyword"
15
+ fails "Proc#lambda? is preserved when passing a Proc with & to the proc keyword"
16
+ fails "Proc#source_location returns an Array"
17
+ fails "Proc#source_location returns the first line of a multi-line proc (i.e. the line containing 'proc do')"
18
+ fails "Proc#source_location returns the location of the proc's body; not necessarily the proc itself"
19
+ fails "Proc#source_location sets the first value to the path of the file in which the proc was defined"
20
+ fails "Proc#source_location sets the last value to a Fixnum representing the line on which the proc was defined"
21
+ fails "Proc#source_location works even if the proc was created on the same line"
22
+ fails "Proc#to_s for a proc created with lambda returns a description including '(lambda)' and optionally including file and line number"
23
+ fails "Proc#to_s for a proc created with UnboundMethod#to_proc returns a description including '(lambda)' and optionally including file and line number"
24
+ fails "Proc#yield on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on excess arguments when self is a lambda"
25
+ fails "Proc#yield on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on missing arguments when self is a lambda"
26
+ fails "Proc.allocate raises a TypeError"
27
+ fails "Proc.new with a block argument called indirectly from a subclass returns the passed proc created from a block"
28
+ fails "Proc.new with a block argument called indirectly from a subclass returns the passed proc created from a method"
29
+ fails "Proc.new with a block argument called indirectly from a subclass returns the passed proc created from a symbol"
30
+ fails "Proc.new with a block argument returns the passed proc created from a method"
31
+ fails "Proc.new with an associated block called on a subclass of Proc returns an instance of the subclass"
32
+ fails "Proc.new with an associated block called on a subclass of Proc that does not 'super' in 'initialize' still constructs a functional proc"
33
+ fails "Proc.new with an associated block called on a subclass of Proc using a reified block parameter returns an instance of the subclass"
34
+ fails "Proc.new with an associated block calls initialize on the Proc object"
35
+ fails "Proc.new with an associated block raises a LocalJumpError when context of the block no longer exists"
36
+ fails "Proc.new with an associated block returns a new Proc instance from the block passed to the containing method"
37
+ fails "Proc.new with an associated block returns a subclass of Proc"
38
+ fails "Proc.new without a block uses the implicit block from an enclosing method"
39
+ end
@@ -0,0 +1,148 @@
1
+ opal_filter "Range" do
2
+ fails "Range#bsearch raises a TypeError if the block returns a String"
3
+ fails "Range#bsearch raises a TypeError if the block returns an Object"
4
+ fails "Range#bsearch raises a TypeError if the Range has Object values"
5
+ fails "Range#bsearch raises a TypeError if the Range has String values"
6
+ fails "Range#bsearch returns an Enumerator when not passed a block"
7
+ fails "Range#bsearch when no block is given returned Enumerator size returns nil"
8
+ fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers accepts (+/-)Float::INFINITY from the block"
9
+ fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0"
10
+ fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0.0"
11
+ fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns nil if the block never returns zero"
12
+ fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns nil if the block returns greater than zero for every element"
13
+ fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns nil if the block returns less than zero for every element"
14
+ fails "Range#bsearch with Float values with a block returning true or false returns minimum element if the block returns true for every element"
15
+ fails "Range#bsearch with Float values with a block returning true or false returns nil if the block returns false for every element"
16
+ fails "Range#bsearch with Float values with a block returning true or false returns nil if the block returns nil for every element"
17
+ fails "Range#bsearch with Float values with a block returning true or false returns the smallest element for which block returns true"
18
+ fails "Range#bsearch with Integer values with a block returning negative, zero, positive numbers accepts (+/-)Float::INFINITY from the block"
19
+ fails "Range#bsearch with Integer values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0"
20
+ fails "Range#bsearch with Integer values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0.0"
21
+ fails "Range#bsearch with Integer values with a block returning negative, zero, positive numbers returns nil if the block never returns zero"
22
+ fails "Range#bsearch with Integer values with a block returning negative, zero, positive numbers returns nil if the block returns greater than zero for every element"
23
+ fails "Range#bsearch with Integer values with a block returning negative, zero, positive numbers returns nil if the block returns less than zero for every element"
24
+ fails "Range#bsearch with Integer values with a block returning true or false returns minimum element if the block returns true for every element"
25
+ fails "Range#bsearch with Integer values with a block returning true or false returns nil if the block returns false for every element"
26
+ fails "Range#bsearch with Integer values with a block returning true or false returns nil if the block returns nil for every element"
27
+ fails "Range#bsearch with Integer values with a block returning true or false returns the last element if the block returns true for the last element"
28
+ fails "Range#bsearch with Integer values with a block returning true or false returns the smallest element for which block returns true"
29
+ fails "Range#cover? compares values using <=>"
30
+ fails "Range#cover? returns false if range is empty"
31
+ fails "Range#cover? returns false if the range does not contain the argument"
32
+ fails "Range#cover? uses the range element's <=> to make the comparison"
33
+ fails "Range#each passes each element to the given block by using #succ"
34
+ fails "Range#each raises a TypeError if the first element does not respond to #succ"
35
+ fails "Range#each raises a TypeError if the first element is a Time object"
36
+ fails "Range#each when no block is given returned Enumerator size returns the enumerable size"
37
+ fails "Range#first calls #to_int to convert the argument"
38
+ fails "Range#first raises a TypeError if #to_int does not return an Integer"
39
+ fails "Range#first raises a TypeError when passed a String"
40
+ fails "Range#first raises a TypeError when passed nil"
41
+ fails "Range#first raises an ArgumentError when count is negative"
42
+ fails "Range#first returns all elements in the range when count exceeds the number of elements"
43
+ fails "Range#first returns an empty array for an empty Range"
44
+ fails "Range#first returns an empty array when passed zero"
45
+ fails "Range#first returns the specified number of elements from the beginning"
46
+ fails "Range#first truncates the value when passed a Float"
47
+ fails "Range#hash generates a Fixnum for the hash value"
48
+ fails "Range#hash generates the same hash values for Ranges with the same start, end and exclude_end? values"
49
+ fails "Range#include? compares values using <=>"
50
+ fails "Range#include? on string elements returns false if other is not matched by element.succ"
51
+ fails "Range#include? returns false if range is empty"
52
+ fails "Range#include? returns false if the range does not contain the argument"
53
+ fails "Range#include? with weird succ when excluded end value returns false if other is not matched by element.succ"
54
+ fails "Range#include? with weird succ when included end value returns false if other is equal as last element but not matched by element.succ"
55
+ fails "Range#include? with weird succ when included end value returns false if other is not matched by element.succ"
56
+ fails "Range#initialize is private"
57
+ fails "Range#initialize raises a NameError if called on an already initialized Range"
58
+ fails "Range#initialize raises an ArgumentError if passed with four or more arguments"
59
+ fails "Range#inspect ignores own untrusted status"
60
+ fails "Range#inspect returns a tainted string if either end is tainted"
61
+ fails "Range#inspect returns a untrusted string if either end is untrusted"
62
+ fails "Range#last calls #to_int to convert the argument"
63
+ fails "Range#last raises a TypeError if #to_int does not return an Integer"
64
+ fails "Range#last raises a TypeError when passed a String"
65
+ fails "Range#last raises a TypeError when passed nil"
66
+ fails "Range#last raises an ArgumentError when count is negative"
67
+ fails "Range#last returns all elements in the range when count exceeds the number of elements"
68
+ fails "Range#last returns an empty array for an empty Range"
69
+ fails "Range#last returns an empty array when passed zero"
70
+ fails "Range#last returns the specified number of elements from the end"
71
+ fails "Range#last truncates the value when passed a Float"
72
+ fails "Range#max given a block calls #> and #< on the return value of the block"
73
+ fails "Range#max raises TypeError when called on a Time...Time(excluded end point)"
74
+ fails "Range#max raises TypeError when called on an exclusive range and a non Integer value"
75
+ fails "Range#max returns nil when the endpoint equals the start point and the range is exclusive"
76
+ fails "Range#max returns nil when the endpoint is less than the start point in a Float range"
77
+ fails "Range#max returns nil when the endpoint is less than the start point"
78
+ fails "Range#max returns the maximum value in the range when called with no arguments"
79
+ fails "Range#member? compares values using <=>"
80
+ fails "Range#member? on string elements returns false if other is not matched by element.succ"
81
+ fails "Range#member? returns false if range is empty"
82
+ fails "Range#member? returns false if the range does not contain the argument"
83
+ fails "Range#member? with weird succ when excluded end value returns false if other is not matched by element.succ"
84
+ fails "Range#member? with weird succ when included end value returns false if other is equal as last element but not matched by element.succ"
85
+ fails "Range#member? with weird succ when included end value returns false if other is not matched by element.succ"
86
+ fails "Range#min given a block calls #> and #< on the return value of the block"
87
+ fails "Range#min returns nil when the endpoint equals the start point and the range is exclusive"
88
+ fails "Range#min returns nil when the start point is greater than the endpoint in a Float range"
89
+ fails "Range#min returns nil when the start point is greater than the endpoint"
90
+ fails "Range#step calls #to_int to coerce step to an Integer"
91
+ fails "Range#step coerces the argument to integer by invoking to_int"
92
+ fails "Range#step raises a TypeError if #to_int does not return an Integer"
93
+ fails "Range#step raises a TypeError if step does not respond to #to_int"
94
+ fails "Range#step raises a TypeError if the first element does not respond to #succ"
95
+ fails "Range#step raises an ArgumentError if step is 0"
96
+ fails "Range#step raises an ArgumentError if step is 0.0"
97
+ fails "Range#step raises an ArgumentError if step is negative"
98
+ fails "Range#step raises TypeError if step"
99
+ fails "Range#step returns an enumerator when no block is given"
100
+ fails "Range#step returns self"
101
+ fails "Range#step when no block is given returned Enumerator size raises a TypeError if #to_int does not return an Integer"
102
+ fails "Range#step when no block is given returned Enumerator size raises a TypeError if step does not respond to #to_int"
103
+ fails "Range#step when no block is given returned Enumerator size raises an ArgumentError if step is 0"
104
+ fails "Range#step when no block is given returned Enumerator size raises an ArgumentError if step is 0.0"
105
+ fails "Range#step when no block is given returned Enumerator size raises an ArgumentError if step is negative"
106
+ fails "Range#step when no block is given returned Enumerator size return nil and not raises a TypeError if the first element does not respond to #succ"
107
+ fails "Range#step when no block is given returned Enumerator size returns nil with begin and end are String"
108
+ fails "Range#step when no block is given returned Enumerator size returns the ceil of range size divided by the number of steps"
109
+ fails "Range#step when no block is given returned Enumerator size returns the correct number of steps when one of the arguments is a float"
110
+ fails "Range#step when no block is given returned Enumerator size returns the range size when there's no step_size"
111
+ fails "Range#step with exclusive end and Float values returns Float values of 'step * n + begin < end'"
112
+ fails "Range#step with exclusive end and Float values yields Float values incremented by 1 and less than end when not passed a step"
113
+ fails "Range#step with exclusive end and Float values yields Float values incremented by a Float step"
114
+ fails "Range#step with exclusive end and Float values yields Float values incremented by an Integer step"
115
+ fails "Range#step with exclusive end and Float, Integer values yields Float values incremented by 1 and less than end when not passed a step"
116
+ fails "Range#step with exclusive end and Float, Integer values yields Float values incremented by a Float step"
117
+ fails "Range#step with exclusive end and Float, Integer values yields Float values incremented by an Integer step"
118
+ fails "Range#step with exclusive end and Integer values yields Float values incremented by a Float step"
119
+ fails "Range#step with exclusive end and Integer values yields Integer values incremented by 1 and less than end when not passed a step"
120
+ fails "Range#step with exclusive end and Integer values yields Integer values incremented by an Integer step"
121
+ fails "Range#step with exclusive end and Integer, Float values yields an Float and then Float values incremented by a Float step"
122
+ fails "Range#step with exclusive end and Integer, Float values yields Float values incremented by 1 and less than end when not passed a step"
123
+ fails "Range#step with exclusive end and Integer, Float values yields Float values incremented by an Integer step"
124
+ fails "Range#step with exclusive end and String values raises a TypeError when passed a Float step"
125
+ fails "Range#step with exclusive end and String values yields String values incremented by #succ and less than or equal to end when not passed a step"
126
+ fails "Range#step with exclusive end and String values yields String values incremented by #succ called Integer step times"
127
+ fails "Range#step with inclusive end and Float values returns Float values of 'step * n + begin <= end'"
128
+ fails "Range#step with inclusive end and Float values yields Float values incremented by 1 and less than or equal to end when not passed a step"
129
+ fails "Range#step with inclusive end and Float values yields Float values incremented by a Float step"
130
+ fails "Range#step with inclusive end and Float values yields Float values incremented by an Integer step"
131
+ fails "Range#step with inclusive end and Float, Integer values yields Float values incremented by 1 and less than or equal to end when not passed a step"
132
+ fails "Range#step with inclusive end and Float, Integer values yields Float values incremented by a Float step"
133
+ fails "Range#step with inclusive end and Float, Integer values yields Float values incremented by an Integer step"
134
+ fails "Range#step with inclusive end and Integer values yields Float values incremented by a Float step"
135
+ fails "Range#step with inclusive end and Integer values yields Integer values incremented by 1 and less than or equal to end when not passed a step"
136
+ fails "Range#step with inclusive end and Integer values yields Integer values incremented by an Integer step"
137
+ fails "Range#step with inclusive end and Integer, Float values yields Float values incremented by 1 and less than or equal to end when not passed a step"
138
+ fails "Range#step with inclusive end and Integer, Float values yields Float values incremented by a Float step"
139
+ fails "Range#step with inclusive end and Integer, Float values yields Float values incremented by an Integer step"
140
+ fails "Range#step with inclusive end and String values calls #succ on begin and each element returned by #succ"
141
+ fails "Range#step with inclusive end and String values raises a TypeError when passed a Float step"
142
+ fails "Range#step with inclusive end and String values yields String values incremented by #succ and less than or equal to end when not passed a step"
143
+ fails "Range#step with inclusive end and String values yields String values incremented by #succ called Integer step times"
144
+ fails "Range#to_s ignores own untrusted status"
145
+ fails "Range#to_s provides a printable form of self"
146
+ fails "Range#to_s returns a tainted string if either end is tainted"
147
+ fails "Range#to_s returns a untrusted string if either end is untrusted"
148
+ end