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,46 @@
1
+ opal_filter "Bignum" do
2
+ fails "BasicObject#__id__ returns a different value for two Bignum literals"
3
+ fails "Complex#== with Numeric returns true when self's imaginary part is 0 and the real part and other have numerical equality"
4
+ fails "Complex#fdiv with an imaginary part sets the real part to self's real part fdiv'd with the argument"
5
+ fails "Complex#fdiv with no imaginary part sets the real part to self's real part fdiv'd with the argument"
6
+ fails "Complex#rect raises an ArgumentError if given any arguments"
7
+ fails "Complex#rect returns a two-element Array"
8
+ fails "Complex#rect returns an Array"
9
+ fails "Complex#rect returns the imaginary part of self as the last element"
10
+ fails "Complex#rect returns the real part of self as the first element"
11
+ fails "Fixnum#& returns self bitwise AND a Bignum"
12
+ fails "Fixnum#& returns self bitwise AND other"
13
+ fails "Fixnum#* overflows to Bignum when the result does not fit in Fixnum"
14
+ fails "Fixnum#** can raise -1 to a Bignum safely"
15
+ fails "Fixnum#/ coerces fixnum and return self divided by other"
16
+ fails "Fixnum#^ returns self bitwise EXCLUSIVE OR a Bignum"
17
+ fails "Fixnum#^ returns self bitwise EXCLUSIVE OR other"
18
+ fails "Fixnum#| returns self bitwise OR other"
19
+ fails "Float#fdiv performs floating-point division between self and a Bignum"
20
+ fails "Float#numerator converts self to a Rational object then returns its numerator"
21
+ fails "Float#quo performs floating-point division between self and a Bignum"
22
+ fails "Float#round returns rounded values for big values"
23
+ fails "Integer#gcd accepts a Bignum argument"
24
+ fails "Integer#gcd works if self is a Bignum"
25
+ fails "Integer#gcdlcm accepts a Bignum argument"
26
+ fails "Integer#gcdlcm works if self is a Bignum"
27
+ fails "Integer#lcm accepts a Bignum argument"
28
+ fails "Integer#lcm works if self is a Bignum"
29
+ fails "Integer#odd? returns true when self is an odd number"
30
+ fails "Integer#rationalize returns a Rational object"
31
+ fails "Integer#rationalize uses 1 as the denominator"
32
+ fails "Integer#rationalize uses self as the numerator"
33
+ fails "Integer#round returns itself rounded if passed a negative value"
34
+ fails "Integer#to_r works even if self is a Bignum"
35
+ fails "Numeric#denominator returns 1"
36
+ fails "Numeric#numerator converts self to a Rational object then returns its numerator"
37
+ fails "Numeric#quo raises a ZeroDivisionError when the given Integer is 0"
38
+ fails "Rational#** when passed Bignum raises ZeroDivisionError when self is Rational(0) and the exponent is negative"
39
+ fails "Rational#** when passed Bignum returns 0.0 when self is < -1 and the exponent is negative"
40
+ fails "Rational#** when passed Bignum returns 0.0 when self is > 1 and the exponent is negative"
41
+ fails "Rational#** when passed Bignum returns positive Infinity when self < -1"
42
+ fails "Rational#** when passed Bignum returns positive Infinity when self is > 1"
43
+ fails "Rational#** when passed Bignum returns Rational(-1) when self is Rational(-1) and the exponent is positive and odd"
44
+ fails "Rational#** when passed Bignum returns Rational(1) when self is Rational(-1) and the exponent is positive and even"
45
+ fails "Rational#round with a precision > 0 doesn't fail when rounding to an absurdly large positive precision"
46
+ end
@@ -0,0 +1,4 @@
1
+ opal_filter "Class" do
2
+ fails "Class#initialize is private"
3
+ fails "Class.inherited is called when marked as a public class method"
4
+ end
@@ -0,0 +1,5 @@
1
+ opal_filter "Delegator" do
2
+ fails "SimpleDelegator.new doesn't forward private method calls even via send or __send__"
3
+ fails "SimpleDelegator.new doesn't forward private method calls"
4
+ fails "SimpleDelegator.new forwards protected method calls"
5
+ end
@@ -0,0 +1,11 @@
1
+ opal_filter "Enumerable" do
2
+ fails "Enumerable#chunk does not return elements for which the block returns :_separator"
3
+ fails "Enumerable#chunk raises a RuntimeError if the block returns a Symbol starting with an underscore other than :_alone or :_separator"
4
+ fails "Enumerable#chunk with [initial_state] yields an element and an object value-equal but not identical to the object passed to #chunk"
5
+ fails "Enumerable#entries returns a tainted array if self is tainted"
6
+ fails "Enumerable#entries returns an untrusted array if self is untrusted"
7
+ fails "Enumerable#group_by returns a tainted hash if self is tainted"
8
+ fails "Enumerable#group_by returns an untrusted hash if self is untrusted"
9
+ fails "Enumerable#to_a returns a tainted array if self is tainted"
10
+ fails "Enumerable#to_a returns an untrusted array if self is untrusted"
11
+ end
@@ -1,14 +1,13 @@
1
- opal_filter "Enumerator as generator" do
2
- fails "Enumerator#next returns the next element of the enumeration"
3
- fails "Enumerator#next raises a StopIteration exception at the end of the stream"
1
+ opal_filter "Enumerator" do
4
2
  fails "Enumerator#next cannot be called again until the enumerator is rewound"
5
-
3
+ fails "Enumerator#next raises a StopIteration exception at the end of the stream"
4
+ fails "Enumerator#next returns the next element of the enumeration"
5
+ fails "Enumerator#rewind calls the enclosed object's rewind method if one exists"
6
+ fails "Enumerator#rewind clears a pending #feed value"
7
+ fails "Enumerator#rewind does nothing if the object doesn't have a #rewind method"
8
+ fails "Enumerator#rewind has no effect if called multiple, consecutive times"
9
+ fails "Enumerator#rewind has no effect on a new enumerator"
6
10
  fails "Enumerator#rewind resets the enumerator to its initial state"
7
11
  fails "Enumerator#rewind returns self"
8
- fails "Enumerator#rewind has no effect on a new enumerator"
9
- fails "Enumerator#rewind has no effect if called multiple, consecutive times"
10
- fails "Enumerator#rewind does nothing if the object doesn't have a #rewind method"
11
12
  fails "Enumerator#rewind works with peek to reset the position"
12
- fails "Enumerator#rewind calls the enclosed object's rewind method if one exists"
13
- fails "Enumerator#rewind clears a pending #feed value"
14
13
  end
@@ -0,0 +1,14 @@
1
+ opal_filter "Fixnum" do
2
+ fails "Fixnum#+ overflows to Bignum when the result does not fit in Fixnum"
3
+ fails "Fixnum#- returns a Bignum only if the result is too large to be a Fixnum"
4
+ fails "Fixnum#<< with n << m returns -1 when n < 0, m < 0 and n > -(2**-m)"
5
+ fails "Fixnum#<< with n << m returns 0 when m < 0 and m is a Bignum"
6
+ fails "Fixnum#<< with n << m returns 0 when n > 0, m < 0 and n < 2**-m"
7
+ fails "Fixnum#<< with n << m returns a Bignum == fixnum_max * 2 when fixnum_max << 1 and n > 0"
8
+ fails "Fixnum#<< with n << m returns a Bignum == fixnum_min * 2 when fixnum_min << 1 and n < 0"
9
+ fails "Fixnum#>> with n >> m returns -1 when n < 0, m > 0 and n > -(2**m)"
10
+ fails "Fixnum#>> with n >> m returns 0 when m is a Bignum"
11
+ fails "Fixnum#>> with n >> m returns 0 when n > 0, m > 0 and n < 2**m"
12
+ fails "Fixnum#>> with n >> m returns a Bignum == fixnum_max * 2 when fixnum_max >> -1 and n > 0"
13
+ fails "Fixnum#>> with n >> m returns a Bignum == fixnum_min * 2 when fixnum_min >> -1 and n < 0"
14
+ end
@@ -1,9 +1,43 @@
1
1
  opal_filter "Float" do
2
- fails "Array#inspect represents a recursive element with '[...]'"
3
- fails "Array#to_s represents a recursive element with '[...]'"
4
- fails "Array#eql? returns false if any corresponding elements are not #eql?"
5
- fails "Set#eql? returns true when the passed argument is a Set and contains the same elements"
6
-
7
- fails "Kernel#Float raises a TypeError if #to_f returns an Integer"
8
- fails "Kernel.Float raises a TypeError if #to_f returns an Integer"
2
+ fails "BasicObject#__id__ returns a different value for two Float literals"
3
+ fails "Complex#/ with Fixnum raises a ZeroDivisionError when given zero"
4
+ fails "Complex#eql? returns false when the imaginary parts are of different classes"
5
+ fails "Complex#eql? returns false when the real parts are of different classes"
6
+ fails "Complex#quo with Fixnum raises a ZeroDivisionError when given zero"
7
+ fails "Complex#rationalize raises RangeError if self has 0.0 imaginary part"
8
+ fails "Complex#to_f when the imaginary part is Float 0.0 raises RangeError"
9
+ fails "Complex#to_i when the imaginary part is Float 0.0 raises RangeError"
10
+ fails "Complex#to_r when the imaginary part is Float 0.0 raises RangeError"
11
+ fails "Complex#to_s returns 1+0.0i for Complex(1, 0.0)"
12
+ fails "Complex#to_s returns 1-0.0i for Complex(1, -0.0)"
13
+ fails "Fixnum#% raises a ZeroDivisionError when the given argument is 0 and a Float"
14
+ fails "Fixnum#% raises a ZeroDivisionError when the given argument is 0"
15
+ fails "Fixnum#& raises a TypeError when passed a Float"
16
+ fails "Fixnum#/ raises a ZeroDivisionError if the given argument is zero and not a Float"
17
+ fails "Fixnum#/ returns self divided by the given argument"
18
+ fails "Fixnum#/ supports dividing negative numbers"
19
+ fails "Fixnum#coerce when given a String returns an array containing two Floats"
20
+ fails "Fixnum#div coerces self and the given argument to Floats and returns self divided by other as Fixnum"
21
+ fails "Fixnum#divmod raises a TypeError when given a non-Integer"
22
+ fails "Fixnum#^ raises a TypeError when passed a Float"
23
+ fails "Fixnum#| raises a TypeError when passed a Float"
24
+ fails "Float constant MAX_10_EXP is 308"
25
+ fails "Float constant MAX_EXP is 1024"
26
+ fails "Float constant MIN is 2.2250738585072e-308"
27
+ fails "Float constant MIN_10_EXP is -308"
28
+ fails "Float constant MIN_EXP is -1021"
29
+ fails "Float#coerce returns [other, self] both as Floats"
30
+ fails "Float#eql? returns false if other is not a Float"
31
+ fails "Float#to_s emits '-' for -0.0"
32
+ fails "Float#to_s emits a trailing '.0' for a whole number"
33
+ fails "Float#to_s emits a trailing '.0' for the mantissa in e format"
34
+ fails "Float#to_s returns '0.0' for 0.0"
35
+ fails "Math.gamma returns approximately (n-1)! given n for n between 24 and 30" # precision error
36
+ fails "Rational#% returns a Float value when the argument is Float"
37
+ fails "Rational#** raises ZeroDivisionError for Rational(0, 1) passed a negative Integer"
38
+ fails "Rational#** when passed Integer returns the Rational value of self raised to the passed argument"
39
+ fails "Rational#/ when passed an Integer raises a ZeroDivisionError when passed 0"
40
+ fails "Rational#coerce returns the passed argument, self as Float, when given a Float"
41
+ fails "Rational#divmod when passed an Integer returns the quotient as Integer and the remainder as Rational"
42
+ fails "Struct#eql? returns false if any corresponding elements are not #eql?" # Rubyspec uses 1.eql?(1.0) which always returns true in compiled JS
9
43
  end
@@ -0,0 +1,45 @@
1
+ opal_filter "freezing" do
2
+ fails "Array#delete returns nil on a frozen array if a modification does not take place"
3
+ fails "Array#dup does not copy frozen status from the original"
4
+ fails "Array#rotate does not mutate the receiver"
5
+ fails "Array#rotate! raises a RuntimeError on a frozen array"
6
+ fails "Array#select! on frozen objects returns an Enumerator if no block is given"
7
+ fails "Array#sort does not freezes self during being sorted"
8
+ fails "Enumerable#sort doesn't raise an error if #to_a returns a frozen Array"
9
+ fails "Hash#== compares keys with matching hash codes via eql?"
10
+ fails "Hash#delete_if returns an Enumerator if called on a frozen instance"
11
+ fails "Hash#each returns an Enumerator if called on a frozen instance"
12
+ fails "Hash#each_key returns an Enumerator if called on a frozen instance"
13
+ fails "Hash#each_pair returns an Enumerator if called on a frozen instance"
14
+ fails "Hash#each_value returns an Enumerator if called on a frozen instance"
15
+ fails "Hash#eql? compares keys with matching hash codes via eql?"
16
+ fails "Hash#keep_if returns an Enumerator if called on a frozen instance"
17
+ fails "Hash#reject returns an Enumerator if called on a frozen instance"
18
+ fails "Hash#select returns an Enumerator if called on a frozen instance"
19
+ fails "Hash#select! returns an Enumerator if called on a frozen instance"
20
+ fails "Hash#store doesn't duplicate and freeze already frozen string keys"
21
+ fails "Hash#[]= doesn't duplicate and freeze already frozen string keys"
22
+ fails "Kernel#clone copies frozen state from the original"
23
+ fails "Kernel#freeze on a Symbol has no effect since it is already frozen"
24
+ fails "Kernel#freeze prevents self from being further modified"
25
+ fails "Kernel#freeze returns self"
26
+ fails "Kernel#frozen? on a Symbol returns true"
27
+ fails "Kernel#frozen? on true, false and nil returns false"
28
+ fails "Kernel#frozen? returns true if self is frozen"
29
+ fails "MatchData#string returns a frozen copy of the match string"
30
+ fails "Module#alias_method raises RuntimeError if frozen"
31
+ fails "Module#append_features when other is frozen raises a RuntimeError before appending self"
32
+ fails "Module#extend_object when given a frozen object raises a RuntimeError before extending the object"
33
+ fails "Module#remove_method on frozen instance does not raise exceptions when no arguments given"
34
+ fails "Module#remove_method on frozen instance raises a RuntimeError when passed a missing name"
35
+ fails "Module#remove_method on frozen instance raises a RuntimeError when passed a name"
36
+ fails "Module#remove_method on frozen instance raises a TypeError when passed a not name"
37
+ fails "Module#undef_method on frozen instance does not raise exceptions when no arguments given"
38
+ fails "Module#undef_method on frozen instance raises a RuntimeError when passed a missing name"
39
+ fails "Module#undef_method on frozen instance raises a RuntimeError when passed a name"
40
+ fails "Module#undef_method on frozen instance raises a TypeError when passed a not name"
41
+ fails "OpenStruct#method_missing when called with a method name ending in '=' raises a TypeError when self is frozen"
42
+ fails "String#clone copies frozen state"
43
+ fails "String#initialize with no arguments does not raise an exception when frozen"
44
+ fails "StringScanner#initialize returns an instance of StringScanner"
45
+ end
@@ -0,0 +1,50 @@
1
+ opal_filter "Hash" do
2
+ fails "Hash#assoc only returns the first matching key-value pair for identity hashes"
3
+ fails "Hash#clear raises a RuntimeError if called on a frozen instance"
4
+ fails "Hash#compare_by_identity causes future comparisons on the receiver to be made by identity"
5
+ fails "Hash#compare_by_identity does not copy string keys"
6
+ fails "Hash#compare_by_identity perists over #dups"
7
+ fails "Hash#compare_by_identity persists over #clones"
8
+ fails "Hash#compare_by_identity raises a RuntimeError on frozen hashes"
9
+ fails "Hash#compare_by_identity regards #clone'd objects as having different identities"
10
+ fails "Hash#compare_by_identity regards #dup'd objects as having different identities"
11
+ fails "Hash#compare_by_identity regards references to the same object as having the same identity"
12
+ fails "Hash#compare_by_identity returns self"
13
+ fails "Hash#compare_by_identity uses #equal? semantics, but doesn't actually call #equal? to determine identity"
14
+ fails "Hash#compare_by_identity uses the semantics of BasicObject#equal? to determine key identity"
15
+ fails "Hash#compare_by_identity? returns false by default"
16
+ fails "Hash#compare_by_identity? returns true once #compare_by_identity has been invoked on self"
17
+ fails "Hash#compare_by_identity? returns true when called multiple times on the same ident hash"
18
+ fails "Hash#default= raises a RuntimeError if called on a frozen instance"
19
+ fails "Hash#default_proc= raises a RuntimeError if self is frozen"
20
+ fails "Hash#delete raises a RuntimeError if called on a frozen instance"
21
+ fails "Hash#delete_if raises a RuntimeError if called on a frozen instance"
22
+ fails "Hash#initialize is private"
23
+ fails "Hash#initialize raises a RuntimeError if called on a frozen instance"
24
+ fails "Hash#inspect returns a tainted string if self is tainted and not empty"
25
+ fails "Hash#inspect returns an untrusted string if self is untrusted and not empty"
26
+ fails "Hash#keep_if raises a RuntimeError if called on a frozen instance"
27
+ fails "Hash#merge! checks frozen status before coercing an object with #to_hash"
28
+ fails "Hash#merge! raises a RuntimeError on a frozen instance that is modified"
29
+ fails "Hash#merge! raises a RuntimeError on a frozen instance that would not be modified"
30
+ fails "Hash#rehash raises a RuntimeError if called on a frozen instance"
31
+ fails "Hash#reject! raises a RuntimeError if called on a frozen instance that is modified"
32
+ fails "Hash#reject! raises a RuntimeError if called on a frozen instance that would not be modified"
33
+ fails "Hash#reject! returns an Enumerator if called on a frozen instance"
34
+ fails "Hash#replace raises a RuntimeError if called on a frozen instance that is modified"
35
+ fails "Hash#replace raises a RuntimeError if called on a frozen instance that would not be modified"
36
+ fails "Hash#select! raises a RuntimeError if called on a frozen instance that would not be modified"
37
+ fails "Hash#select! raises a RuntimeError if called on an empty frozen instance"
38
+ fails "Hash#shift raises a RuntimeError if called on a frozen instance"
39
+ fails "Hash#store duplicates and freezes string keys"
40
+ fails "Hash#store raises a RuntimeError if called on a frozen instance"
41
+ fails "Hash#to_a returns a tainted array if self is tainted"
42
+ fails "Hash#to_a returns an untrusted array if self is untrusted"
43
+ fails "Hash#to_s returns a tainted string if self is tainted and not empty"
44
+ fails "Hash#to_s returns an untrusted string if self is untrusted and not empty"
45
+ fails "Hash#update checks frozen status before coercing an object with #to_hash"
46
+ fails "Hash#update raises a RuntimeError on a frozen instance that is modified"
47
+ fails "Hash#update raises a RuntimeError on a frozen instance that would not be modified"
48
+ fails "Hash#[]= duplicates and freezes string keys"
49
+ fails "Hash#[]= raises a RuntimeError if called on a frozen instance"
50
+ end
@@ -0,0 +1,3 @@
1
+ opal_filter "Integer" do
2
+ fails "Integer#even? returns true for a Bignum when it is an even number"
3
+ end
@@ -0,0 +1,31 @@
1
+ opal_filter "Kernel" do
2
+ fails "Kernel has private instance method Array()"
3
+ fails "Kernel has private instance method Hash()"
4
+ fails "Kernel#Float is a private method"
5
+ fails "Kernel#Float raises a TypeError if #to_f returns an Integer"
6
+ fails "Kernel#Integer calls to_i on Rationals"
7
+ fails "Kernel#Integer is a private method"
8
+ fails "Kernel#Integer returns a Fixnum or Bignum object"
9
+ fails "Kernel#String is a private method"
10
+ fails "Kernel#eql? is a public instance method"
11
+ fails "Kernel#format is a private method"
12
+ fails "Kernel#sleep accepts a Rational"
13
+ fails "Kernel#sleep is a private method"
14
+ fails "Kernel#sleep pauses execution indefinitely if not given a duration"
15
+ fails "Kernel#sprintf is a private method"
16
+ fails "Kernel#to_s returns a tainted result if self is tainted"
17
+ fails "Kernel#to_s returns an untrusted result if self is untrusted"
18
+ fails "Kernel#warn is a private method"
19
+ fails "Kernel.Float raises a TypeError if #to_f returns an Integer"
20
+ fails "Kernel.Integer calls to_i on Rationals"
21
+ fails "Kernel.Integer returns a Fixnum or Bignum object"
22
+ fails "Kernel#clone preserves tainted state from the original"
23
+ fails "Kernel#clone preserves untrusted state from the original"
24
+ fails "Kernel#clone raises a TypeError for Symbol"
25
+ fails "Kernel#dup does not copy frozen state from the original"
26
+ fails "Kernel#dup preserves tainted state from the original"
27
+ fails "Kernel#dup preserves untrusted state from the original"
28
+ fails "Kernel#dup raises a TypeError for Symbol"
29
+ fails "Kernel.fail is a private method"
30
+ fails "Kernel#raise is a private method"
31
+ end
@@ -0,0 +1,17 @@
1
+ opal_filter "language" do
2
+ fails "Magic comment can be after the shebang"
3
+ fails "Magic comment can take Emacs style"
4
+ fails "Magic comment can take vim style"
5
+ fails "Magic comment determines __ENCODING__"
6
+ fails "Magic comment is case-insensitive"
7
+ fails "Magic comment must be at the first line"
8
+ fails "Magic comment must be the first token of the line"
9
+ fails "The defined? keyword for pseudo-variables returns 'expression' for __ENCODING__"
10
+ fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private"
11
+ fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is protected"
12
+ fails "The private keyword changes the visibility of the existing method in the subclass"
13
+ fails "The private keyword changes visibility of previously called method"
14
+ fails "The private keyword changes visiblity of previously called methods with same send/call site"
15
+ fails "The private keyword is overridden when a new class is opened"
16
+ fails "The private keyword marks following methods as being private"
17
+ end
@@ -0,0 +1,30 @@
1
+ opal_filter "MatchData" do
2
+ fails "MatchData#begin returns nil when the nth match isn't found"
3
+ fails "MatchData#begin returns the offset for multi byte strings"
4
+ fails "MatchData#begin returns the offset of the start of the nth element"
5
+ fails "MatchData#end returns nil when the nth match isn't found"
6
+ fails "MatchData#end returns the offset for multi byte strings"
7
+ fails "MatchData#end returns the offset of the end of the nth element"
8
+ fails "MatchData#names equals Regexp#names"
9
+ fails "MatchData#names returns an Array"
10
+ fails "MatchData#names returns each name only once"
11
+ fails "MatchData#names returns the names of the named capture groups"
12
+ fails "MatchData#names returns [] if there were no named captures"
13
+ fails "MatchData#names sets each element to a String"
14
+ fails "MatchData#offset returns a two element array with the begin and end of the nth match"
15
+ fails "MatchData#offset returns the offset for multi byte strings"
16
+ fails "MatchData#offset returns [nil, nil] when the nth match isn't found"
17
+ fails "MatchData#post_match keeps taint status from the source string"
18
+ fails "MatchData#post_match keeps untrusted status from the source string"
19
+ fails "MatchData#pre_match keeps taint status from the source string"
20
+ fails "MatchData#pre_match keeps untrusted status from the source string"
21
+ fails "MatchData#regexp returns the pattern used in the match"
22
+ fails "MatchData#[Symbol] raises an IndexError if there is no named match corresponding to the String"
23
+ fails "MatchData#[Symbol] raises an IndexError if there is no named match corresponding to the Symbol"
24
+ fails "MatchData#[Symbol] returns matches in the String's encoding"
25
+ fails "MatchData#[Symbol] returns nil on non-matching named matches"
26
+ fails "MatchData#[Symbol] returns the corresponding named match when given a String"
27
+ fails "MatchData#[Symbol] returns the corresponding named match when given a Symbol"
28
+ fails "MatchData#[Symbol] returns the last match when multiple named matches exist with the same name"
29
+ fails "MatchData#[Symbol] returns the matching version of multiple corresponding named match"
30
+ end
@@ -0,0 +1,3 @@
1
+ opal_filter "Math" do
2
+ fails "Math#atanh is a private instance method"
3
+ end
@@ -1,6 +1,8 @@
1
1
  opal_filter "Module" do
2
- fails "Module#define_method raises a RuntimeError if frozen"
2
+ fails "Module#class_variable_set raises a RuntimeError when self is frozen"
3
3
  fails "Module#define_method is private"
4
- fails "Module#define_method when name is :initialize passed a block sets visibility to private when method name is :initialize"
4
+ fails "Module#define_method raises a RuntimeError if frozen"
5
5
  fails "Module#define_method when name is :initialize given an UnboundMethod sets the visibility to private when method is named :initialize"
6
- end
6
+ fails "Module#define_method when name is :initialize passed a block sets visibility to private when method name is :initialize"
7
+ fails "Module#instance_methods makes a private Object instance method public in Kernel"
8
+ end
@@ -0,0 +1,3 @@
1
+ opal_filter "Pathname" do
2
+ fails "Pathname.new is tainted if path is tainted"
3
+ end
@@ -0,0 +1,136 @@
1
+ opal_filter "private" do
2
+ fails "BasicObject#initialize is a private instance method"
3
+ fails "BasicObject#method_missing for a Class raises a NoMethodError when an undefined method is called"
4
+ fails "BasicObject#method_missing is a private method"
5
+ fails "BasicObject#singleton_method_added is a private method"
6
+ fails "BasicObject#singleton_method_removed is a private method"
7
+ fails "BasicObject#singleton_method_undefined is a private method"
8
+ fails "Module#alias_method aliasing special methods keeps initialize private when aliasing"
9
+ fails "Module#alias_method aliasing special methods keeps initialize_clone private when aliasing"
10
+ fails "Module#alias_method aliasing special methods keeps initialize_copy private when aliasing"
11
+ fails "Module#alias_method aliasing special methods keeps initialize_dup private when aliasing"
12
+ fails "Module#alias_method aliasing special methods keeps respond_to_missing? private when aliasing"
13
+ fails "Module#alias_method is a private method"
14
+ fails "Module#append_features is a private method"
15
+ fails "Module#attr is a private method"
16
+ fails "Module#attr_accessor is a private method"
17
+ fails "Module#attr_reader is a private method"
18
+ fails "Module#attr_writer is a private method"
19
+ fails "Module#extended is private in its default implementation"
20
+ fails "Module#extend_object is a private method"
21
+ fails "Module#extend_object is called even when private"
22
+ fails "Module#included is private in its default implementation"
23
+ fails "Module#method_added is a private instance method"
24
+ fails "Module#method_removed is a private instance method"
25
+ fails "Module#method_undefined is a private instance method"
26
+ fails "Module#module_function is a private method"
27
+ fails "Module#module_function with specific method names can make accessible private methods"
28
+ fails "Module#module_function with specific method names makes the instance methods private"
29
+ fails "Module#prepended is a private method"
30
+ fails "Module#prepend_features is a private method"
31
+ fails "Module#private is a private method"
32
+ fails "Module#private makes a public Object instance method private in a new module"
33
+ fails "Module#private makes a public Object instance method private in Kernel"
34
+ fails "Module#private makes the target method uncallable from other types"
35
+ fails "Module#private raises a NameError when given an undefined name"
36
+ fails "Module#private returns self"
37
+ fails "Module#private without arguments affects evaled method definitions when itself is outside the eval"
38
+ fails "Module#private without arguments affects normally if itself and following method definitions are inside a eval"
39
+ fails "Module#private without arguments affects normally if itself and method definitions are inside a module_eval"
40
+ fails "Module#private without arguments continues setting visibility if the body encounters other visibility setters with arguments"
41
+ fails "Module#private without arguments does not affect method definitions when itself is inside an eval and method definitions are outside"
42
+ fails "Module#private without arguments does not affect module_evaled method definitions when itself is outside the eval"
43
+ fails "Module#private without arguments sets visibility to following method definitions"
44
+ fails "Module#private without arguments stops setting visibility if the body encounters other visibility setters without arguments"
45
+ fails "Module#private_class_method accepts more than one method at a time"
46
+ fails "Module#private_class_method makes a class method private"
47
+ fails "Module#private_class_method makes an existing class method private up the inheritance tree"
48
+ fails "Module#private_class_method makes an existing class method private"
49
+ fails "Module#private_class_method raises a NameError if class method doesn't exist"
50
+ fails "Module#private_class_method raises a NameError when the given name is an instance method"
51
+ fails "Module#private_class_method raises a NameError when the given name is not a method"
52
+ fails "Module#private_constant accepts multiple names"
53
+ fails "Module#private_constant accepts strings as constant names"
54
+ fails "Module#private_constant can only be passed constant names defined in the target (self) module"
55
+ fails "Module#private_instance_methods returns a list of private methods in module and its ancestors"
56
+ fails "Module#private_instance_methods when not passed an argument returns a unique list for a class including a module"
57
+ fails "Module#private_instance_methods when not passed an argument returns a unique list for a subclass"
58
+ fails "Module#private_instance_methods when passed false as a parameter, should return only methods defined in that module"
59
+ fails "Module#private_instance_methods when passed true returns a unique list for a class including a module"
60
+ fails "Module#private_instance_methods when passed true returns a unique list for a subclass"
61
+ fails "Module#private_method_defined? accepts symbols for the method name"
62
+ fails "Module#private_method_defined? calls #to_str to convert an Object"
63
+ fails "Module#private_method_defined? raises a TypeError if passed a Fixnum"
64
+ fails "Module#private_method_defined? raises a TypeError if passed an object that defines #to_sym"
65
+ fails "Module#private_method_defined? raises a TypeError if passed an object that does not defined #to_str"
66
+ fails "Module#private_method_defined? raises a TypeError if passed false"
67
+ fails "Module#private_method_defined? raises a TypeError if passed nil"
68
+ fails "Module#private_method_defined? returns true if the named private method is defined by module or its ancestors"
69
+ fails "Module#protected is a private method"
70
+ fails "Module#protected makes a public Object instance method protected in a new module"
71
+ fails "Module#protected makes a public Object instance method protected in Kernel"
72
+ fails "Module#protected makes an existing class method protected"
73
+ fails "Module#protected raises a NameError when given an undefined name"
74
+ fails "Module#protected returns self"
75
+ fails "Module#protected without arguments affects evaled method definitions when itself is outside the eval"
76
+ fails "Module#protected without arguments affects normally if itself and following method definitions are inside a eval"
77
+ fails "Module#protected without arguments affects normally if itself and method definitions are inside a module_eval"
78
+ fails "Module#protected without arguments continues setting visibility if the body encounters other visibility setters with arguments"
79
+ fails "Module#protected without arguments does not affect method definitions when itself is inside an eval and method definitions are outside"
80
+ fails "Module#protected without arguments does not affect module_evaled method definitions when itself is outside the eval"
81
+ fails "Module#protected without arguments sets visibility to following method definitions"
82
+ fails "Module#protected without arguments stops setting visibility if the body encounters other visibility setters without arguments"
83
+ fails "Module#protected_instance_methods default list should be the same as passing true as an argument"
84
+ fails "Module#protected_instance_methods returns a list of protected methods in module and its ancestors"
85
+ fails "Module#protected_instance_methods when not passed an argument returns a unique list for a class including a module"
86
+ fails "Module#protected_instance_methods when not passed an argument returns a unique list for a subclass"
87
+ fails "Module#protected_instance_methods when passed false as a parameter, should return only methods defined in that module"
88
+ fails "Module#protected_instance_methods when passed true returns a unique list for a class including a module"
89
+ fails "Module#protected_instance_methods when passed true returns a unique list for a subclass"
90
+ fails "Module#protected_method_defined? accepts symbols for the method name"
91
+ fails "Module#protected_method_defined? calls #to_str to convert an Object"
92
+ fails "Module#protected_method_defined? raises a TypeError if passed a Fixnum"
93
+ fails "Module#protected_method_defined? raises a TypeError if passed an object that defines #to_sym"
94
+ fails "Module#protected_method_defined? raises a TypeError if passed an object that does not defined #to_str"
95
+ fails "Module#protected_method_defined? raises a TypeError if passed false"
96
+ fails "Module#protected_method_defined? raises a TypeError if passed nil"
97
+ fails "Module#protected_method_defined? returns true if the named protected method is defined by module or its ancestors"
98
+ fails "Module#public is a private method"
99
+ fails "Module#public makes a private Object instance method public in a new module"
100
+ fails "Module#public makes a private Object instance method public in Kernel"
101
+ fails "Module#public raises a NameError when given an undefined name"
102
+ fails "Module#public returns self"
103
+ fails "Module#public without arguments affects evaled method definitions when itself is outside the eval"
104
+ fails "Module#public without arguments affects normally if itself and following method definitions are inside a eval"
105
+ fails "Module#public without arguments does not affect method definitions when itself is inside an eval and method definitions are outside"
106
+ fails "Module#public without arguments does not affect module_evaled method definitions when itself is outside the eval"
107
+ fails "Module#public without arguments stops setting visibility if the body encounters other visibility setters without arguments"
108
+ fails "Module#public_class_method accepts more than one method at a time"
109
+ fails "Module#public_class_method makes an existing class method public up the inheritance tree"
110
+ fails "Module#public_class_method makes an existing class method public"
111
+ fails "Module#public_class_method raises a NameError if class method doesn't exist"
112
+ fails "Module#public_class_method raises a NameError when the given name is an instance method"
113
+ fails "Module#public_class_method raises a NameError when the given name is not a method"
114
+ fails "Module#public_constant accepts multiple names"
115
+ fails "Module#public_constant accepts strings as constant names"
116
+ fails "Module#public_instance_method is a public method"
117
+ fails "Module#public_instance_method raises a TypeError when given a name is not Symbol or String"
118
+ fails "Module#public_instance_method requires an argument"
119
+ fails "Module#public_instance_method sets the NameError#name attribute to the name of the missing method"
120
+ fails "Module#public_instance_method when given a public method name accepts if the name is a Symbol or String"
121
+ fails "Module#public_instance_method when given a public method name returns an UnboundMethod corresponding to the defined Module"
122
+ fails "Module#public_instance_methods when passed false as a parameter, should return only methods defined in that module"
123
+ fails "Module#public_method_defined? calls #to_str to convert an Object"
124
+ fails "Module#public_method_defined? raises a TypeError if passed a Fixnum"
125
+ fails "Module#public_method_defined? raises a TypeError if passed an object that defines #to_sym"
126
+ fails "Module#public_method_defined? raises a TypeError if passed an object that does not defined #to_str"
127
+ fails "Module#public_method_defined? raises a TypeError if passed false"
128
+ fails "Module#public_method_defined? raises a TypeError if passed nil"
129
+ fails "Module#public_method_defined? returns false if method is not a public method"
130
+ fails "Module#remove_const is a private method"
131
+ fails "Module#remove_method is a private method"
132
+ fails "Module#undef_method is a private method"
133
+ fails "OpenStruct#initialize is private"
134
+ fails "OpenStruct#table is protected"
135
+ fails "OpenStruct#new_ostruct_member is protected"
136
+ end