opal 0.8.1 → 0.9.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.gitmodules +3 -3
  4. data/.jshintrc +17 -20
  5. data/.travis.yml +22 -11
  6. data/CHANGELOG.md +51 -1
  7. data/CODE_OF_CONDUCT.md +15 -0
  8. data/CONTRIBUTING.md +125 -9
  9. data/Gemfile +1 -1
  10. data/Guardfile +2 -2
  11. data/README.md +95 -29
  12. data/Rakefile +1 -1
  13. data/benchmark/benchmarks +103 -0
  14. data/benchmark/bm_array_flatten.rb +9 -0
  15. data/benchmark/bm_array_intersection_numbers.rb +7 -0
  16. data/benchmark/bm_array_intersection_objects.rb +7 -0
  17. data/benchmark/bm_array_intersection_strings.rb +7 -0
  18. data/benchmark/bm_array_join_ary.rb +9 -0
  19. data/benchmark/bm_array_minus_numbers.rb +7 -0
  20. data/benchmark/bm_array_minus_objects.rb +7 -0
  21. data/benchmark/bm_array_minus_strings.rb +7 -0
  22. data/benchmark/bm_array_union_numbers.rb +7 -0
  23. data/benchmark/bm_array_union_objects.rb +7 -0
  24. data/benchmark/bm_array_union_strings.rb +7 -0
  25. data/benchmark/bm_array_uniq_bang_numbers.rb +5 -0
  26. data/benchmark/bm_array_uniq_bang_objects.rb +5 -0
  27. data/benchmark/bm_array_uniq_bang_strings.rb +5 -0
  28. data/benchmark/bm_array_uniq_numbers.rb +5 -0
  29. data/benchmark/bm_array_uniq_objects.rb +5 -0
  30. data/benchmark/bm_array_uniq_strings.rb +5 -0
  31. data/benchmark/bm_dispatch_bind_table.rb +57 -0
  32. data/benchmark/bm_dispatch_code_gen.rb +65 -0
  33. data/benchmark/bm_dispatch_code_gen_if.rb +64 -0
  34. data/benchmark/bm_dispatch_hardcoded.rb +44 -0
  35. data/benchmark/bm_dispatch_send.rb +38 -0
  36. data/benchmark/bm_dispatch_send_table.rb +57 -0
  37. data/benchmark/bm_hash_assoc_object.rb +11 -0
  38. data/benchmark/bm_hash_assoc_string.rb +9 -0
  39. data/benchmark/bm_hash_clone_object.rb +9 -0
  40. data/benchmark/bm_hash_clone_string.rb +9 -0
  41. data/benchmark/bm_hash_delete_object.rb +11 -0
  42. data/benchmark/bm_hash_delete_string.rb +9 -0
  43. data/benchmark/bm_hash_each_key_object.rb +9 -0
  44. data/benchmark/bm_hash_each_key_string.rb +9 -0
  45. data/benchmark/bm_hash_each_object.rb +9 -0
  46. data/benchmark/bm_hash_each_string.rb +9 -0
  47. data/benchmark/bm_hash_each_value_object.rb +9 -0
  48. data/benchmark/bm_hash_each_value_string.rb +9 -0
  49. data/benchmark/bm_hash_element_reference_object.rb +11 -0
  50. data/benchmark/bm_hash_element_reference_string.rb +9 -0
  51. data/benchmark/bm_hash_element_set_object.rb +5 -0
  52. data/benchmark/bm_hash_element_set_string.rb +5 -0
  53. data/benchmark/bm_hash_equal_value_object.rb +14 -0
  54. data/benchmark/bm_hash_equal_value_string.rb +11 -0
  55. data/benchmark/bm_hash_fetch_object.rb +11 -0
  56. data/benchmark/bm_hash_fetch_string.rb +9 -0
  57. data/benchmark/bm_hash_flatten_object.rb +9 -0
  58. data/benchmark/bm_hash_flatten_string.rb +9 -0
  59. data/benchmark/bm_hash_has_key_object.rb +11 -0
  60. data/benchmark/bm_hash_has_key_string.rb +9 -0
  61. data/benchmark/bm_hash_has_value_object.rb +9 -0
  62. data/benchmark/bm_hash_has_value_string.rb +9 -0
  63. data/benchmark/bm_hash_hash_object.rb +9 -0
  64. data/benchmark/bm_hash_hash_string.rb +9 -0
  65. data/benchmark/bm_hash_inspect_object.rb +9 -0
  66. data/benchmark/bm_hash_inspect_string.rb +9 -0
  67. data/benchmark/bm_hash_invert_object.rb +9 -0
  68. data/benchmark/bm_hash_invert_string.rb +9 -0
  69. data/benchmark/bm_hash_keep_if_object.rb +9 -0
  70. data/benchmark/bm_hash_keep_if_string.rb +9 -0
  71. data/benchmark/bm_hash_key_object.rb +9 -0
  72. data/benchmark/bm_hash_key_string.rb +9 -0
  73. data/benchmark/bm_hash_keys_object.rb +9 -0
  74. data/benchmark/bm_hash_keys_string.rb +9 -0
  75. data/benchmark/bm_hash_literal_mixed_large.rb +3 -0
  76. data/benchmark/bm_hash_literal_mixed_small.rb +3 -0
  77. data/benchmark/bm_hash_literal_object_large.rb +4 -0
  78. data/benchmark/bm_hash_literal_object_small.rb +3 -0
  79. data/benchmark/bm_hash_literal_string_large.rb +4 -0
  80. data/benchmark/bm_hash_literal_string_small.rb +3 -0
  81. data/benchmark/bm_hash_merge_object.rb +22 -0
  82. data/benchmark/bm_hash_merge_string.rb +18 -0
  83. data/benchmark/bm_hash_rassoc_object.rb +9 -0
  84. data/benchmark/bm_hash_rassoc_string.rb +9 -0
  85. data/benchmark/bm_hash_rehash_object.rb +9 -0
  86. data/benchmark/bm_hash_rehash_string.rb +9 -0
  87. data/benchmark/bm_hash_reject_bang_object.rb +9 -0
  88. data/benchmark/bm_hash_reject_bang_string.rb +9 -0
  89. data/benchmark/bm_hash_reject_object.rb +9 -0
  90. data/benchmark/bm_hash_reject_string.rb +9 -0
  91. data/benchmark/bm_hash_replace_object.rb +18 -0
  92. data/benchmark/bm_hash_replace_string.rb +14 -0
  93. data/benchmark/bm_hash_select_bang_object.rb +9 -0
  94. data/benchmark/bm_hash_select_bang_string.rb +9 -0
  95. data/benchmark/bm_hash_select_object.rb +9 -0
  96. data/benchmark/bm_hash_select_string.rb +9 -0
  97. data/benchmark/bm_hash_shift_object.rb +10 -0
  98. data/benchmark/bm_hash_shift_string.rb +10 -0
  99. data/benchmark/bm_hash_to_a_object.rb +9 -0
  100. data/benchmark/bm_hash_to_a_string.rb +9 -0
  101. data/benchmark/bm_hash_to_h_object.rb +10 -0
  102. data/benchmark/bm_hash_to_h_string.rb +10 -0
  103. data/benchmark/bm_hash_values_object.rb +9 -0
  104. data/benchmark/bm_hash_values_string.rb +9 -0
  105. data/benchmark/run.rb +48 -0
  106. data/bin/opal-mspec +1 -1
  107. data/bin/opal-repl +4 -4
  108. data/docs/compiled_ruby.md +214 -56
  109. data/docs/configuring_gems.md +2 -2
  110. data/docs/faq.md +2 -2
  111. data/docs/getting_started.md +19 -2
  112. data/docs/jquery.md +5 -5
  113. data/docs/opal_parser.md +53 -0
  114. data/docs/unsupported_features.md +2 -2
  115. data/docs/upgrading.md +22 -0
  116. data/docs/using_sprockets.md +15 -0
  117. data/examples/rack/config.ru +13 -0
  118. data/examples/sinatra/config.ru +4 -5
  119. data/lib/mspec/opal/runner.rb +54 -11
  120. data/lib/opal.rb +1 -1
  121. data/lib/opal/builder.rb +1 -1
  122. data/lib/opal/builder_processors.rb +1 -1
  123. data/lib/opal/cli.rb +17 -13
  124. data/lib/opal/cli_options.rb +1 -1
  125. data/lib/opal/compiler.rb +12 -0
  126. data/lib/opal/config.rb +4 -0
  127. data/lib/opal/nodes/arglist.rb +5 -7
  128. data/lib/opal/nodes/call.rb +6 -1
  129. data/lib/opal/nodes/call_special.rb +74 -0
  130. data/lib/opal/nodes/def.rb +35 -28
  131. data/lib/opal/nodes/definitions.rb +3 -5
  132. data/lib/opal/nodes/for.rb +13 -0
  133. data/lib/opal/nodes/helpers.rb +15 -1
  134. data/lib/opal/nodes/if.rb +5 -5
  135. data/lib/opal/nodes/iter.rb +6 -1
  136. data/lib/opal/nodes/literal.rb +1 -1
  137. data/lib/opal/nodes/logic.rb +2 -2
  138. data/lib/opal/nodes/masgn.rb +1 -2
  139. data/lib/opal/nodes/module.rb +2 -1
  140. data/lib/opal/nodes/rescue.rb +10 -1
  141. data/lib/opal/nodes/scope.rb +8 -2
  142. data/lib/opal/nodes/singleton_class.rb +1 -1
  143. data/lib/opal/nodes/top.rb +11 -0
  144. data/lib/opal/nodes/variables.rb +4 -4
  145. data/lib/opal/parser.rb +21 -3
  146. data/lib/opal/parser/grammar.rb +3115 -2961
  147. data/lib/opal/parser/grammar.y +29 -6
  148. data/lib/opal/parser/lexer.rb +18 -8
  149. data/lib/opal/sprockets.rb +85 -0
  150. data/lib/opal/sprockets/processor.rb +11 -35
  151. data/lib/opal/sprockets/server.rb +3 -15
  152. data/lib/opal/version.rb +2 -2
  153. data/opal.gemspec +4 -4
  154. data/opal/README.md +9 -0
  155. data/opal/corelib/array.rb +433 -181
  156. data/opal/corelib/basic_object.rb +48 -4
  157. data/opal/corelib/boolean.rb +15 -6
  158. data/opal/corelib/class.rb +6 -5
  159. data/opal/corelib/comparable.rb +12 -0
  160. data/opal/corelib/complex.rb +282 -0
  161. data/opal/corelib/constants.rb +9 -0
  162. data/opal/corelib/enumerable.rb +83 -34
  163. data/opal/corelib/enumerator.rb +3 -1
  164. data/opal/corelib/error.rb +49 -10
  165. data/opal/corelib/file.rb +1 -0
  166. data/opal/corelib/hash.rb +353 -577
  167. data/opal/corelib/helpers.rb +20 -0
  168. data/opal/corelib/kernel.rb +114 -59
  169. data/opal/corelib/math.rb +470 -0
  170. data/opal/corelib/method.rb +11 -2
  171. data/opal/corelib/module.rb +96 -96
  172. data/opal/corelib/{nil_class.rb → nil.rb} +20 -1
  173. data/opal/corelib/number.rb +751 -0
  174. data/opal/corelib/numeric.rb +77 -437
  175. data/opal/corelib/proc.rb +81 -1
  176. data/opal/corelib/process.rb +27 -0
  177. data/opal/corelib/rational.rb +358 -0
  178. data/opal/corelib/regexp.rb +156 -27
  179. data/opal/corelib/runtime.js +724 -335
  180. data/opal/corelib/string.rb +93 -104
  181. data/opal/corelib/string/encoding.rb +177 -0
  182. data/opal/corelib/string/inheritance.rb +2 -0
  183. data/opal/corelib/struct.rb +105 -18
  184. data/opal/corelib/time.rb +267 -146
  185. data/opal/corelib/unsupported.rb +216 -0
  186. data/opal/corelib/variables.rb +0 -6
  187. data/opal/opal.rb +8 -22
  188. data/opal/opal/base.rb +9 -0
  189. data/opal/opal/mini.rb +17 -0
  190. data/spec/README.md +1 -1
  191. data/spec/filters/bugs/array.rb +38 -136
  192. data/spec/filters/bugs/{basic_object.rb → basicobject.rb} +14 -15
  193. data/spec/filters/bugs/class.rb +6 -12
  194. data/spec/filters/bugs/complex.rb +3 -0
  195. data/spec/filters/bugs/date.rb +162 -10
  196. data/spec/filters/bugs/enumerable.rb +31 -58
  197. data/spec/filters/bugs/enumerator.rb +42 -0
  198. data/spec/filters/bugs/exception.rb +66 -10
  199. data/spec/filters/bugs/float.rb +17 -0
  200. data/spec/filters/bugs/hash.rb +11 -97
  201. data/spec/filters/bugs/inheritance.rb +5 -0
  202. data/spec/filters/bugs/integer.rb +28 -0
  203. data/spec/filters/bugs/kernel.rb +304 -12
  204. data/spec/filters/bugs/language.rb +133 -399
  205. data/spec/filters/bugs/language_opal.rb +88 -0
  206. data/spec/filters/bugs/module.rb +203 -62
  207. data/spec/filters/bugs/numeric.rb +32 -0
  208. data/spec/filters/bugs/proc.rb +39 -0
  209. data/spec/filters/bugs/range.rb +148 -0
  210. data/spec/filters/bugs/regexp.rb +168 -0
  211. data/spec/filters/bugs/set.rb +46 -3
  212. data/spec/filters/bugs/singleton.rb +1 -2
  213. data/spec/filters/bugs/string.rb +59 -90
  214. data/spec/filters/bugs/strscan.rb +80 -0
  215. data/spec/filters/bugs/struct.rb +10 -20
  216. data/spec/filters/bugs/time.rb +17 -184
  217. data/spec/filters/bugs/unboundmethod.rb +22 -0
  218. data/spec/filters/unsupported/array.rb +163 -0
  219. data/spec/filters/unsupported/basicobject.rb +14 -0
  220. data/spec/filters/unsupported/bignum.rb +46 -0
  221. data/spec/filters/unsupported/class.rb +4 -0
  222. data/spec/filters/unsupported/delegator.rb +5 -0
  223. data/spec/filters/unsupported/enumerable.rb +11 -0
  224. data/spec/filters/unsupported/enumerator.rb +8 -9
  225. data/spec/filters/unsupported/fixnum.rb +14 -0
  226. data/spec/filters/unsupported/float.rb +41 -7
  227. data/spec/filters/unsupported/freeze.rb +45 -0
  228. data/spec/filters/unsupported/hash.rb +50 -0
  229. data/spec/filters/unsupported/integer.rb +3 -0
  230. data/spec/filters/unsupported/kernel.rb +31 -0
  231. data/spec/filters/unsupported/language.rb +17 -0
  232. data/spec/filters/unsupported/matchdata.rb +30 -0
  233. data/spec/filters/unsupported/math.rb +3 -0
  234. data/spec/filters/unsupported/module.rb +5 -3
  235. data/spec/filters/unsupported/pathname.rb +3 -0
  236. data/spec/filters/unsupported/privacy.rb +136 -0
  237. data/spec/filters/unsupported/proc.rb +3 -0
  238. data/spec/filters/unsupported/regexp.rb +59 -0
  239. data/spec/filters/unsupported/set.rb +4 -0
  240. data/spec/filters/unsupported/{marshal.rb → singleton.rb} +4 -2
  241. data/spec/filters/unsupported/{mutable_strings.rb → string.rb} +456 -336
  242. data/spec/filters/unsupported/struct.rb +3 -0
  243. data/spec/filters/unsupported/symbol.rb +5 -0
  244. data/spec/filters/unsupported/taint.rb +16 -0
  245. data/spec/filters/unsupported/thread.rb +5 -0
  246. data/spec/filters/unsupported/time.rb +197 -16
  247. data/spec/lib/cli_spec.rb +14 -4
  248. data/spec/lib/compiler_spec.rb +9 -1
  249. data/spec/lib/parser/call_spec.rb +18 -0
  250. data/spec/lib/parser/not_spec.rb +2 -8
  251. data/spec/lib/sprockets_spec.rb +24 -0
  252. data/spec/opal/core/array/intersection_spec.rb +38 -0
  253. data/spec/opal/core/array/minus_spec.rb +38 -0
  254. data/spec/opal/core/array/union_spec.rb +38 -0
  255. data/spec/opal/core/array/uniq_spec.rb +49 -0
  256. data/spec/opal/core/exception_spec.rb +7 -0
  257. data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
  258. data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
  259. data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
  260. data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
  261. data/spec/opal/core/hash/internals_spec.rb +332 -0
  262. data/spec/opal/core/helpers_spec.rb +14 -0
  263. data/spec/opal/core/kernel/freeze_spec.rb +1 -1
  264. data/spec/opal/core/kernel/raise_spec.rb +13 -0
  265. data/spec/opal/core/kernel/require_tree_spec.rb +9 -0
  266. data/spec/opal/core/language/class_spec.rb +55 -0
  267. data/spec/opal/core/language/fixtures/send.rb +1 -0
  268. data/spec/opal/core/language/keyword_arguments_spec.rb +11 -0
  269. data/spec/opal/core/language/send_spec.rb +5 -0
  270. data/spec/opal/core/method/to_proc_spec.rb +28 -0
  271. data/spec/opal/core/module/name_spec.rb +0 -17
  272. data/spec/opal/core/runtime/bridged_classes_spec.rb +2 -2
  273. data/spec/opal/core/runtime/eval_spec.rb +1 -1
  274. data/spec/opal/core/runtime/method_missing_spec.rb +6 -0
  275. data/spec/opal/core/runtime_spec.rb +51 -0
  276. data/spec/opal/stdlib/js_spec.rb +66 -0
  277. data/spec/opal/stdlib/native/hash_spec.rb +36 -0
  278. data/spec/rubyspecs +152 -273
  279. data/spec/spec_helper.rb +10 -11
  280. data/stdlib/base64.rb +9 -9
  281. data/stdlib/benchmark.rb +551 -4
  282. data/stdlib/console.rb +94 -0
  283. data/stdlib/date.rb +1 -1
  284. data/stdlib/encoding.rb +1 -170
  285. data/stdlib/js.rb +56 -0
  286. data/stdlib/json.rb +9 -14
  287. data/stdlib/math.rb +1 -370
  288. data/stdlib/native.rb +133 -63
  289. data/stdlib/nodejs/file.rb +5 -0
  290. data/stdlib/nodejs/fileutils.rb +13 -6
  291. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/README.md +1 -1
  292. data/stdlib/opal-parser.rb +1 -2
  293. data/stdlib/ostruct.rb +65 -6
  294. data/stdlib/pp.rb +2 -4
  295. data/stdlib/rbconfig.rb +1 -3
  296. data/stdlib/strscan.rb +164 -28
  297. data/tasks/benchmarking.rake +88 -0
  298. data/tasks/testing.rake +181 -55
  299. data/{lib/mspec/opal/special_calls.rb → tasks/testing/mspec_special_calls.rb} +1 -1
  300. data/{lib/mspec/opal/sprockets.js → tasks/testing/phantomjs1-sprockets.js} +17 -6
  301. data/test/opal/test_keyword.rb +590 -0
  302. data/vendored-minitest/minitest.rb +2 -2
  303. data/vendored-minitest/test/unit.rb +5 -0
  304. metadata +229 -62
  305. data/benchmarks/operators.rb +0 -11
  306. data/benchmarks/prova.js.rb +0 -13
  307. data/docs/libraries.md +0 -36
  308. data/lib/mspec/opal/new.html.erb +0 -1
  309. data/lib/mspec/opal/rake_task.rb +0 -248
  310. data/opal/corelib/match_data.rb +0 -128
  311. data/spec/filters/bugs/math.rb +0 -95
  312. data/spec/filters/bugs/nil.rb +0 -7
  313. data/spec/filters/bugs/opal.rb +0 -9
  314. data/spec/filters/bugs/regular_expressions.rb +0 -41
  315. data/spec/filters/bugs/stringscanner.rb +0 -33
  316. data/spec/filters/unsupported/encoding.rb +0 -102
  317. data/spec/filters/unsupported/frozen.rb +0 -92
  318. data/spec/filters/unsupported/hash_compare_by_identity.rb +0 -16
  319. data/spec/filters/unsupported/integer_size.rb +0 -59
  320. data/spec/filters/unsupported/method_added.rb +0 -10
  321. data/spec/filters/unsupported/private_constants.rb +0 -30
  322. data/spec/filters/unsupported/private_methods.rb +0 -55
  323. data/spec/filters/unsupported/random.rb +0 -4
  324. data/spec/filters/unsupported/rational_numbers.rb +0 -4
  325. data/spec/filters/unsupported/regular_expressions.rb +0 -137
  326. data/spec/filters/unsupported/ruby_exe.rb +0 -5
  327. data/spec/filters/unsupported/symbols.rb +0 -17
  328. data/spec/filters/unsupported/tainted.rb +0 -180
  329. data/spec/filters/unsupported/trusted.rb +0 -88
  330. data/stdlib/process.rb +0 -10
  331. data/tasks/documenting.rake +0 -37
@@ -1,29 +1,19 @@
1
1
  opal_filter "Struct" do
2
- fails "Struct#== returns true if the other has all the same fields"
3
- fails "Struct#== handles recursive structures by returning false if a difference can be found"
4
-
5
- fails "Struct#eql? returns false if any corresponding elements are not #eql?"
6
- fails "Struct#eql? handles recursive structures by returning false if a difference can be found"
7
-
8
2
  fails "Struct#hash returns the same fixnum for structs with the same content"
9
- fails "Struct#hash returns the same value if structs are #eql?"
10
- fails "Struct#hash returns the same hash for recursive structs"
11
-
12
- fails "Struct#members does not override the instance accessor method"
13
-
14
3
  fails "Struct#initialize can be overriden"
15
-
16
4
  fails "Struct#inspect returns a string representation of some kind"
17
-
18
5
  fails "Struct#instance_variables returns an array with one name if an instance variable is added"
19
6
  fails "Struct#instance_variables returns an empty array if only attributes are defined"
20
-
21
- fails "Struct.new fails with too many arguments"
7
+ fails "Struct#members does not override the instance accessor method"
8
+ fails "Struct.new calls to_str on its first argument (constant name)"
22
9
  fails "Struct.new creates a constant in subclass' namespace"
23
- fails "Struct.new raises a TypeError if object is not a Symbol"
24
- fails "Struct.new raises a TypeError if object doesn't respond to to_sym"
25
- fails "Struct.new fails with invalid constant name as first argument"
26
- fails "Struct.new does not create a constant with symbol as first argument"
27
10
  fails "Struct.new creates a new anonymous class with nil first argument"
28
- fails "Struct.new calls to_str on its first argument (constant name)"
11
+ fails "Struct.new does not create a constant with symbol as first argument"
12
+ fails "Struct.new fails with invalid constant name as first argument"
13
+ fails "Struct.new fails with too many arguments"
14
+ fails "Struct.new raises a TypeError if object doesn't respond to to_sym"
15
+ fails "Struct.new raises a TypeError if object is not a Symbol"
16
+ fails "Struct.new on subclasses fails with too many arguments"
17
+ fails "Struct.new on subclasses creates a constant in subclass' namespace"
18
+ fails "Struct.new with a block passes same struct class to the block"
29
19
  end
@@ -1,196 +1,29 @@
1
1
  opal_filter "Time" do
2
- fails "Time.at passed [Time, Integer] raises a TypeError"
3
- fails "Time.at passed [Integer, String] raises a TypeError"
4
- fails "Time.at passed [Integer, nil] raises a TypeError"
5
- fails "Time.at with a second argument that responds to #to_r coerces using #to_r"
6
- fails "Time.at with a second argument that responds to #to_int coerces using #to_int"
7
- fails "Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Float microseconds since 1971-01-01 00:00:00 UTC"
8
- fails "Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Integer microseconds since 1970-01-01 00:00:00 UTC"
9
- fails "Time.at passed non-Time, non-Numeric with an argument that responds to #to_r coerces using #to_r"
10
- fails "Time.at passed non-Time, non-Numeric with an argument that responds to #to_int coerces using #to_int"
11
- fails "Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Float microseconds since 1970-01-01 00:00:00 UTC"
12
- fails "Time.at passed non-Time, non-Numeric raises a TypeError with a nil argument"
13
- fails "Time.at passed non-Time, non-Numeric raises a TypeError with a String argument"
14
- fails "Time.at passed Time returns a subclass instance"
15
- fails "Time.at passed Time returns a UTC time if the argument is UTC"
16
- fails "Time.at passed Time creates a new time object with the value given by time"
17
- fails "Time.at passed Numeric returns a subclass instance on a Time subclass"
18
- fails "Time.at passed Numeric returns a Time object representing the given number of Float seconds since 1970-01-01 00:00:00 UTC"
19
- fails "Time.at passed Numeric returns a Time object representing the given number of Integer seconds since 1970-01-01 00:00:00 UTC"
20
-
21
- fails "Time#day returns the day of the month for a UTC Time"
22
-
23
- fails "Time#getgm returns a new time which is the utc representation of time"
24
-
25
- fails "Time.gm ignores fractional seconds if a passed fractional number of microseconds"
26
- fails "Time.gm ignores fractional seconds if a passed whole number of microseconds"
27
- fails "Time.gm handles fractional microseconds as a Rational"
28
- fails "Time.gm handles fractional microseconds as a Float"
29
- fails "Time.gm handles microseconds"
30
- fails "Time.gm handles float arguments"
31
- fails "Time.gm handles string arguments"
32
- fails "Time.gm handles years from 0 as such"
33
- fails "Time.gm returns subclass instances"
34
- fails "Time.gm raises ArgumentError when given 11 arguments"
35
- fails "Time.gm raises ArgumentError when given 9 arguments"
36
- fails "Time.gm handles fractional seconds as a Rational"
37
- fails "Time.gm handles fractional seconds as a Float"
38
- fails "Time.gm coerces the second with #to_int"
39
- fails "Time.gm coerces the minute with #to_int"
40
- fails "Time.gm coerces the hour with #to_int"
41
- fails "Time.gm coerces the day with #to_int"
42
- fails "Time.gm coerces the month with #to_int"
43
- fails "Time.gm coerces the month with #to_str"
44
- fails "Time.gm handles a String month given as a short month name"
45
- fails "Time.gm coerces the year with #to_int"
46
- fails "Time.gm accepts nil month, day, hour, minute, and second"
47
- fails "Time.gm creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)"
48
- fails "Time.gm creates a time based on given values, interpreted as UTC (GMT)"
49
-
50
- fails "Time#gmt_offset given negative offset returns a negative offset"
51
- fails "Time#gmt_offset given positive offset returns a positive offset"
52
- fails "Time#gmt_offset returns offset as Rational"
53
- fails "Time#gmt_offset returns the correct offset for New Zealand around daylight savings time change"
54
- fails "Time#gmt_offset returns the correct offset for Hawaii around daylight savings time change"
55
- fails "Time#gmt_offset returns the correct offset for US Eastern time zone around daylight savings time change"
56
- fails "Time#gmt_offset returns the offset in seconds between the timezone of time and UTC"
57
-
58
- fails "Time#hour returns the hour of the day for a UTC Time"
59
-
60
- fails "Time#inspect formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
61
- fails "Time#inspect formats the UTC time following the pattern 'yyyy-MM-dd HH:mm:ss UTC'"
2
+ fails "Time#getlocal raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
62
3
  fails "Time#inspect formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
63
-
64
- fails "Time.local ignores fractional seconds if a passed fractional number of microseconds"
65
- fails "Time.local ignores fractional seconds if a passed whole number of microseconds"
66
- fails "Time.local handles fractional microseconds as a Rational"
67
- fails "Time.local handles fractional microseconds as a Float"
68
- fails "Time.local handles microseconds"
69
- fails "Time.local returns subclass instances"
70
- fails "Time.local handles fractional seconds as a Rational"
71
- fails "Time.local handles fractional seconds as a Float"
72
- fails "Time.local coerces the month with #to_str"
73
- fails "Time.local handles a String month given as a short month name"
74
- fails "Time.local handles years from 0 as such"
75
- fails "Time.local creates the correct time just after dst change"
76
- fails "Time.local creates the correct time just before dst change"
77
- fails "Time.local creates a time based on given C-style gmtime arguments, interpreted in the local time zone"
78
- fails "Time.local respects rare old timezones"
79
- fails "Time.local creates a time based on given values, interpreted in the local time zone"
80
-
81
- fails "Time#- returns a time with the same fixed offset as self"
82
- fails "Time#- maintains subseconds precision"
83
- fails "Time#- maintains nanoseconds precision"
84
- fails "Time#- maintains microseconds precision"
85
- fails "Time#- maintains precision"
86
- fails "Time#- tracks nanoseconds"
87
- fails "Time#- tracks microseconds"
88
- fails "Time#- tracks microseconds"
89
- fails "Time#- accepts arguments that can be coerced into Rational"
90
- fails "Time#- understands negative subtractions"
91
-
92
- fails "Time#mday returns the day of the month for a UTC Time"
93
-
94
- fails "Time#mon returns the month of the year for a UTC Time"
95
-
96
- fails "Time#month returns the month of the year for a UTC Time"
97
-
98
- fails "Time.mktime respects rare old timezones"
99
- fails "Time.mktime creates a time based on given values, interpreted in the local time zone"
100
- fails "Time.mktime creates the correct time just before dst change"
101
- fails "Time.mktime creates the correct time just after dst change"
102
- fails "Time.mktime handles fractional seconds as a Rational"
103
- fails "Time.mktime handles fractional seconds as a Float"
104
- fails "Time.mktime handles years from 0 as such"
105
- fails "Time.mktime creates a time based on given C-style gmtime arguments, interpreted in the local time zone"
106
- fails "Time.mktime coerces the month with #to_str"
107
- fails "Time.mktime handles a String day"
108
- fails "Time.mktime interprets all numerals as base 10"
109
- fails "Time.mktime handles a String month given as a short month name"
110
- fails "Time.mktime returns subclass instances"
111
-
112
- fails "Time#eql? returns false if self and other have differing fractional microseconds"
113
-
114
- fails "Time.inspect formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
115
- fails "Time.inspect formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
116
-
117
- fails "Time#+ maintains subseconds precision"
118
- fails "Time#+ maintains nanoseconds precision"
119
- fails "Time#+ maintains microseconds precision"
120
- fails "Time#+ maintains precision"
121
- fails "Time#+ tracks nanoseconds"
122
- fails "Time#+ tracks microseconds"
123
- fails "Time#+ returns a time with the same fixed offset as self"
124
- fails "Time#+ accepts arguments that can be coerced into Rational"
125
- fails "Time#+ increments the time by the specified amount as rational numbers"
126
- fails "Time#+ adds a negative Float"
127
- fails "Time#+ is a commutative operator"
128
-
129
- fails "Time#strftime supports week of year format with %U and %W"
130
-
131
- fails "Time#to_s formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
132
- fails "Time#to_s formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
133
- fails "Time#to_s formats the UTC time following the pattern 'yyyy-MM-dd HH:mm:ss UTC'"
134
-
135
- fails "Time#utc returns the utc representation of time"
136
- fails "Time.utc ignores fractional seconds if a passed fractional number of microseconds"
137
- fails "Time.utc ignores fractional seconds if a passed whole number of microseconds"
138
- fails "Time.utc handles fractional microseconds as a Rational"
139
- fails "Time.utc handles fractional microseconds as a Float"
140
- fails "Time.utc handles microseconds"
141
- fails "Time.utc handles float arguments"
142
- fails "Time.utc handles string arguments"
143
- fails "Time.utc returns subclass instances"
144
- fails "Time.utc raises ArgumentError when given 11 arguments"
145
- fails "Time.utc raises ArgumentError when given 9 arguments"
146
- fails "Time.utc handles fractional seconds as a Rational"
147
- fails "Time.utc handles fractional seconds as a Float"
148
- fails "Time.utc handles years from 0 as such"
149
- fails "Time.utc coerces the second with #to_int"
150
- fails "Time.utc coerces the minute with #to_int"
151
- fails "Time.utc coerces the hour with #to_int"
152
- fails "Time.utc coerces the day with #to_int"
153
- fails "Time.utc coerces the month with #to_int"
154
- fails "Time.utc coerces the month with #to_str"
155
- fails "Time.utc handles a String month given as a short month name"
156
- fails "Time.utc coerces the year with #to_int"
157
- fails "Time.utc accepts nil month, day, hour, minute, and second"
158
- fails "Time.utc creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)"
159
- fails "Time.utc creates a time based on given values, interpreted as UTC (GMT)"
160
-
161
- fails "Time#utc_offset given negative offset returns a negative offset"
162
- fails "Time#utc_offset given positive offset returns a positive offset"
163
- fails "Time#utc_offset returns offset as Rational"
164
- fails "Time#utc_offset returns the correct offset for New Zealand around daylight savings time change"
165
- fails "Time#utc_offset returns the correct offset for Hawaii around daylight savings time change"
166
- fails "Time#utc_offset returns the correct offset for US Eastern time zone around daylight savings time change"
167
- fails "Time#utc_offset returns the offset in seconds between the timezone of time and UTC"
168
-
169
- fails "Time#wday returns an integer representing the day of the week, 0..6, with Sunday being 0"
170
-
171
- fails "Time#year returns the four digit year for a UTC Time as an Integer"
172
-
173
- # The following specs fail under certain TZ / DST conditions
174
- fails "Time.utc accepts various year ranges"
175
- fails "Time.gm accepts various year ranges"
176
- fails "Time#yday returns an integer representing the day of the year, 1..366"
177
-
178
- fails "Time#- returns a time with nanoseconds precision between two time objects"
179
- fails "Time#strftime with %L formats the milliseconds of a second"
180
-
4
+ fails "Time#inspect formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
5
+ fails "Time#localtime raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
6
+ fails "Time#round copies own timezone to the returning value"
7
+ fails "Time#round defaults to rounding to 0 places"
8
+ fails "Time#round returns an instance of Time, even if #round is called on a subclass"
9
+ fails "Time#round rounds to 0 decimal places with an explicit argument"
10
+ fails "Time#round rounds to 7 decimal places with an explicit argument"
11
+ fails "Time#strftime rounds an offset to the nearest second when formatting with %z"
181
12
  fails "Time#strftime should be able to print the commercial year with leading zeroes"
182
13
  fails "Time#strftime should be able to print the commercial year with only two digits"
183
14
  fails "Time#strftime should be able to print the julian day with leading zeroes"
184
- fails "Time#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)"
185
15
  fails "Time#strftime should be able to show the commercial week day"
186
- fails "Time#strftime should be able to show the timezone of the date with a : separator"
16
+ fails "Time#strftime should be able to show the commercial week"
187
17
  fails "Time#strftime should be able to show the number of seconds since the unix epoch"
188
18
  fails "Time#strftime should be able to show the timezone if available"
189
- fails "Time#strftime rounds an offset to the nearest second when formatting with %z"
190
- fails "Time#strftime with %N formats the nanoseconds of the second with %N"
191
- fails "Time#strftime with %N formats the milliseconds of the second with %3N"
19
+ fails "Time#strftime should be able to show the timezone of the date with a : separator"
20
+ fails "Time#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)"
192
21
  fails "Time#strftime with %N formats the microseconds of the second with %6N"
22
+ fails "Time#strftime with %N formats the milliseconds of the second with %3N"
193
23
  fails "Time#strftime with %N formats the nanoseconds of the second with %9N"
24
+ fails "Time#strftime with %N formats the nanoseconds of the second with %N"
194
25
  fails "Time#strftime with %N formats the picoseconds of the second with %12N"
195
- fails "Time#strftime should be able to show the commercial week"
26
+ fails "Time#to_f returns the float number of seconds + usecs since the epoch"
27
+ fails "Time#to_s formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
28
+ fails "Time#to_s formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
196
29
  end
@@ -0,0 +1,22 @@
1
+ opal_filter "UnboundMethod" do
2
+ fails "UnboundMethod#== returns true if both are aliases for a third method"
3
+ fails "UnboundMethod#== returns true if either is an alias for the other"
4
+ fails "UnboundMethod#== returns true if objects refer to the same method"
5
+ fails "UnboundMethod#== returns true if same method is extracted from the same subclass"
6
+ fails "UnboundMethod#bind Method returned for obj is equal to one directly returned by obj.method"
7
+ fails "UnboundMethod#bind raises TypeError if object is not kind_of? the Module the method defined in"
8
+ fails "UnboundMethod#bind will raise when binding a an object singleton's method to another object"
9
+ fails "UnboundMethod#clone returns a copy of the UnboundMethod"
10
+ fails "UnboundMethod#hash returns the same value for builtin methods that are eql?"
11
+ fails "UnboundMethod#hash returns the same value for user methods that are eql?"
12
+ fails "UnboundMethod#inspect the String shows the method name, Module defined in and Module extracted from"
13
+ fails "UnboundMethod#owner returns the class/module it was defined in"
14
+ fails "UnboundMethod#owner returns the new owner for aliased methods"
15
+ fails "UnboundMethod#source_location returns the last place the method was defined"
16
+ fails "UnboundMethod#source_location returns the location of the original method even if it was aliased"
17
+ fails "UnboundMethod#source_location sets the first value to the path of the file in which the method was defined"
18
+ fails "UnboundMethod#source_location sets the last value to a Fixnum representing the line on which the method was defined"
19
+ fails "UnboundMethod#source_location works for define_method methods"
20
+ fails "UnboundMethod#source_location works for define_singleton_method methods"
21
+ fails "UnboundMethod#to_s the String shows the method name, Module defined in and Module extracted from"
22
+ end
@@ -0,0 +1,163 @@
1
+ opal_filter "Array" do
2
+ fails "Array#* with a string with a tainted separator does not taint the result if the array has only one element"
3
+ fails "Array#* with a string with a tainted separator does not taint the result if the array is empty"
4
+ fails "Array#* with a string with a tainted separator taints the result if the array has two or more elements"
5
+ fails "Array#* with a string with an untrusted separator does not untrust the result if the array has only one element"
6
+ fails "Array#* with a string with an untrusted separator does not untrust the result if the array is empty"
7
+ fails "Array#* with a string with an untrusted separator untrusts the result if the array has two or more elements"
8
+ fails "Array#* with an integer copies the taint status of the original array even if the array is empty"
9
+ fails "Array#* with an integer copies the taint status of the original array even if the passed count is 0"
10
+ fails "Array#* with an integer copies the taint status of the original array if the passed count is not 0"
11
+ fails "Array#* with an integer copies the untrusted status of the original array even if the array is empty"
12
+ fails "Array#* with an integer copies the untrusted status of the original array even if the passed count is 0"
13
+ fails "Array#* with an integer copies the untrusted status of the original array if the passed count is not 0"
14
+ fails "Array#+ does not get infected even if an original array is tainted"
15
+ fails "Array#+ does not infected even if an original array is untrusted"
16
+ fails "Array#<< raises a RuntimeError on a frozen array"
17
+ fails "Array#clear keeps tainted status"
18
+ fails "Array#clear keeps untrusted status"
19
+ fails "Array#clear raises a RuntimeError on a frozen array"
20
+ fails "Array#clone copies frozen status from the original"
21
+ fails "Array#clone copies taint status from the original"
22
+ fails "Array#clone copies untrusted status from the original"
23
+ fails "Array#collect does not copy tainted status"
24
+ fails "Array#collect does not copy untrusted status"
25
+ fails "Array#collect! keeps tainted status"
26
+ fails "Array#collect! keeps untrusted status"
27
+ fails "Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty"
28
+ fails "Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator"
29
+ fails "Array#collect! when frozen raises a RuntimeError when empty"
30
+ fails "Array#collect! when frozen raises a RuntimeError"
31
+ fails "Array#compact does not keep tainted status even if all elements are removed"
32
+ fails "Array#compact does not keep untrusted status even if all elements are removed"
33
+ fails "Array#compact! keeps tainted status even if all elements are removed"
34
+ fails "Array#compact! keeps untrusted status even if all elements are removed"
35
+ fails "Array#compact! raises a RuntimeError on a frozen array"
36
+ fails "Array#concat is not infected by the other"
37
+ fails "Array#concat is not infected untrustedness by the other"
38
+ fails "Array#concat keeps tainted status"
39
+ fails "Array#concat keeps the tainted status of elements"
40
+ fails "Array#concat keeps the untrusted status of elements"
41
+ fails "Array#concat keeps untrusted status"
42
+ fails "Array#concat raises a RuntimeError when Array is frozen and modification occurs"
43
+ fails "Array#concat raises a RuntimeError when Array is frozen and no modification occurs"
44
+ fails "Array#delete keeps tainted status"
45
+ fails "Array#delete keeps untrusted status"
46
+ fails "Array#delete raises a RuntimeError on a frozen array"
47
+ fails "Array#delete_at keeps tainted status"
48
+ fails "Array#delete_at keeps untrusted status"
49
+ fails "Array#delete_at raises a RuntimeError on a frozen array"
50
+ fails "Array#delete_if keeps tainted status"
51
+ fails "Array#delete_if keeps untrusted status"
52
+ fails "Array#delete_if raises a RuntimeError on a frozen array"
53
+ fails "Array#delete_if raises a RuntimeError on an empty frozen array"
54
+ fails "Array#delete_if returns an Enumerator if no block given, and the array is frozen"
55
+ fails "Array#dup copies taint status from the original"
56
+ fails "Array#dup copies untrusted status from the original"
57
+ fails "Array#eql? returns false if any corresponding elements are not #eql?"
58
+ fails "Array#fill does not replicate the filler"
59
+ fails "Array#fill raises a RuntimeError on a frozen array"
60
+ fails "Array#fill raises a RuntimeError on an empty frozen array"
61
+ fails "Array#first raises a RangeError when count is a Bignum"
62
+ fails "Array#flatten returns a tainted array if self is tainted"
63
+ fails "Array#flatten returns an untrusted array if self is untrusted"
64
+ fails "Array#flatten! raises a RuntimeError on frozen arrays when the array is modified"
65
+ fails "Array#flatten! raises a RuntimeError on frozen arrays when the array would not be modified"
66
+ fails "Array#frozen? returns false for an array being sorted by #sort"
67
+ fails "Array#frozen? returns true if array is frozen"
68
+ fails "Array#hash returns the same fixnum for arrays with the same content"
69
+ fails "Array#initialize is private"
70
+ fails "Array#initialize raises a RuntimeError on frozen arrays"
71
+ fails "Array#insert raises a RuntimeError on frozen arrays when the array is modified"
72
+ fails "Array#insert raises a RuntimeError on frozen arrays when the array would not be modified"
73
+ fails "Array#inspect does not taint the result if the Array is tainted but empty"
74
+ fails "Array#inspect does not untrust the result if the Array is untrusted but empty"
75
+ fails "Array#inspect represents a recursive element with '[...]'"
76
+ fails "Array#inspect taints the result if an element is tainted"
77
+ fails "Array#inspect taints the result if the Array is non-empty and tainted"
78
+ fails "Array#inspect untrusts the result if an element is untrusted"
79
+ fails "Array#inspect untrusts the result if the Array is untrusted"
80
+ fails "Array#inspect with encoding raises if inspected result is not default external encoding"
81
+ fails "Array#inspect with encoding returns a US-ASCII string for an empty Array"
82
+ fails "Array#inspect with encoding use the default external encoding if it is ascii compatible"
83
+ fails "Array#inspect with encoding use US-ASCII encoding if the default external encoding is not ascii compatible"
84
+ fails "Array#join does not taint the result if the Array is tainted but empty"
85
+ fails "Array#join does not untrust the result if the Array is untrusted but empty"
86
+ fails "Array#join fails for arrays with incompatibly-encoded strings"
87
+ fails "Array#join returns a US-ASCII string for an empty Array"
88
+ fails "Array#join taints the result if the Array is tainted and non-empty"
89
+ fails "Array#join taints the result if the result of coercing an element is tainted"
90
+ fails "Array#join untrusts the result if the Array is untrusted and non-empty"
91
+ fails "Array#join untrusts the result if the result of coercing an element is untrusted"
92
+ fails "Array#join uses the first encoding when other strings are compatible"
93
+ fails "Array#join uses the widest common encoding when other strings are incompatible"
94
+ fails "Array#join with a tainted separator does not taint the result if the array has only one element"
95
+ fails "Array#join with a tainted separator does not taint the result if the array is empty"
96
+ fails "Array#join with a tainted separator taints the result if the array has two or more elements"
97
+ fails "Array#join with an untrusted separator does not untrust the result if the array has only one element"
98
+ fails "Array#join with an untrusted separator does not untrust the result if the array is empty"
99
+ fails "Array#join with an untrusted separator untrusts the result if the array has two or more elements"
100
+ fails "Array#keep_if on frozen objects returns an Enumerator if no block is given"
101
+ fails "Array#keep_if on frozen objects with falsy block keeps elements after any exception"
102
+ fails "Array#keep_if on frozen objects with falsy block raises a RuntimeError"
103
+ fails "Array#keep_if on frozen objects with truthy block keeps elements after any exception"
104
+ fails "Array#keep_if on frozen objects with truthy block raises a RuntimeError"
105
+ fails "Array#map does not copy tainted status"
106
+ fails "Array#map does not copy untrusted status"
107
+ fails "Array#map! keeps tainted status"
108
+ fails "Array#map! keeps untrusted status"
109
+ fails "Array#map! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty"
110
+ fails "Array#map! when frozen raises a RuntimeError when calling #each on the returned Enumerator"
111
+ fails "Array#map! when frozen raises a RuntimeError when empty"
112
+ fails "Array#map! when frozen raises a RuntimeError"
113
+ fails "Array#pop keeps taint status"
114
+ fails "Array#pop keeps untrusted status"
115
+ fails "Array#pop passed a number n as an argument keeps taint status"
116
+ fails "Array#pop passed a number n as an argument keeps untrusted status"
117
+ fails "Array#pop passed a number n as an argument raises a RuntimeError on a frozen array"
118
+ fails "Array#pop passed a number n as an argument returns a trusted array even if the array is untrusted"
119
+ fails "Array#pop passed a number n as an argument returns an untainted array even if the array is tainted"
120
+ fails "Array#pop raises a RuntimeError on a frozen array"
121
+ fails "Array#pop raises a RuntimeError on an empty frozen array"
122
+ fails "Array#push raises a RuntimeError on a frozen array"
123
+ fails "Array#reject! raises a RuntimeError on a frozen array"
124
+ fails "Array#reject! raises a RuntimeError on an empty frozen array"
125
+ fails "Array#reject! returns an Enumerator if no block given, and the array is frozen"
126
+ fails "Array#replace raises a RuntimeError on a frozen array"
127
+ fails "Array#reverse! raises a RuntimeError on a frozen array"
128
+ fails "Array#select! on frozen objects with falsy block keeps elements after any exception"
129
+ fails "Array#select! on frozen objects with falsy block raises a RuntimeError"
130
+ fails "Array#select! on frozen objects with truthy block keeps elements after any exception"
131
+ fails "Array#select! on frozen objects with truthy block raises a RuntimeError"
132
+ fails "Array#shift passed a number n as an argument keeps taint status"
133
+ fails "Array#shift passed a number n as an argument returns an untainted array even if the array is tainted"
134
+ fails "Array#shift raises a RuntimeError on a frozen array"
135
+ fails "Array#shift raises a RuntimeError on an empty frozen array"
136
+ fails "Array#shuffle! raises a RuntimeError on a frozen array"
137
+ fails "Array#slice raises a RangeError when the length is out of range of Fixnum"
138
+ fails "Array#slice raises a RangeError when the start index is out of range of Fixnum"
139
+ fails "Array#slice! raises a RuntimeError on a frozen array"
140
+ fails "Array#sort! raises a RuntimeError on a frozen array"
141
+ fails "Array#to_s does not taint the result if the Array is tainted but empty"
142
+ fails "Array#to_s does not untrust the result if the Array is untrusted but empty"
143
+ fails "Array#to_s represents a recursive element with '[...]'"
144
+ fails "Array#to_s taints the result if an element is tainted"
145
+ fails "Array#to_s taints the result if the Array is non-empty and tainted"
146
+ fails "Array#to_s untrusts the result if an element is untrusted"
147
+ fails "Array#to_s untrusts the result if the Array is untrusted"
148
+ fails "Array#to_s with encoding raises if inspected result is not default external encoding"
149
+ fails "Array#to_s with encoding returns a US-ASCII string for an empty Array"
150
+ fails "Array#to_s with encoding use the default external encoding if it is ascii compatible"
151
+ fails "Array#to_s with encoding use US-ASCII encoding if the default external encoding is not ascii compatible"
152
+ fails "Array#uniq compares elements with matching hash codes with #eql?" #RubySpec uses taint, which is not supported on Opal.
153
+ fails "Array#uniq uses eql? semantics" #RubySpec expects 1.0 and 1 to be seen as different, which is not supported on Opal.
154
+ fails "Array#uniq! doesn't yield to the block on a frozen array"
155
+ fails "Array#uniq! raises a RuntimeError on a frozen array when the array is modified"
156
+ fails "Array#uniq! raises a RuntimeError on a frozen array when the array would not be modified"
157
+ fails "Array#unshift raises a RuntimeError on a frozen array when the array is modified"
158
+ fails "Array#unshift raises a RuntimeError on a frozen array when the array would not be modified"
159
+ fails "Array#[] raises a RangeError when the length is out of range of Fixnum"
160
+ fails "Array#[] raises a RangeError when the start index is out of range of Fixnum"
161
+ fails "Array#[]= checks frozen before attempting to coerce arguments"
162
+ fails "Array#[]= raises a RuntimeError on a frozen array"
163
+ end
@@ -0,0 +1,14 @@
1
+ opal_filter "BasicObject" do
2
+ fails "BasicObject#method_missing for a Class raises a NoMethodError when a private method is called"
3
+ fails "BasicObject#method_missing for a Class raises a NoMethodError when a protected method is called"
4
+ fails "BasicObject#method_missing for a Class with #method_missing defined is called when an private method is called"
5
+ fails "BasicObject#method_missing for a Class with #method_missing defined is called when an protected method is called"
6
+ fails "BasicObject#method_missing for a Module raises a NoMethodError when a private method is called"
7
+ fails "BasicObject#method_missing for a Module raises a NoMethodError when a protected method is called"
8
+ fails "BasicObject#method_missing for a Module with #method_missing defined is called when a private method is called"
9
+ fails "BasicObject#method_missing for a Module with #method_missing defined is called when a protected method is called"
10
+ fails "BasicObject#method_missing for an instance raises a NoMethodError when a private method is called"
11
+ fails "BasicObject#method_missing for an instance raises a NoMethodError when a protected method is called"
12
+ fails "BasicObject#method_missing for an instance with #method_missing defined is called when an private method is called"
13
+ fails "BasicObject#method_missing for an instance with #method_missing defined is called when an protected method is called"
14
+ end