opal 1.0.5 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (394) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +14 -12
  3. data/.gitattributes +1 -1
  4. data/.github/workflows/build.yml +15 -10
  5. data/.jshintrc +1 -1
  6. data/.overcommit.yml +35 -0
  7. data/.rubocop.yml +44 -7
  8. data/{.rubocop_todo.yml → .rubocop/todo.yml} +4 -5
  9. data/CHANGELOG.md +87 -2
  10. data/Gemfile +1 -2
  11. data/HACKING.md +2 -9
  12. data/README.md +20 -17
  13. data/UNRELEASED.md +108 -0
  14. data/benchmark-ips/bm_array_pop_1.rb +8 -0
  15. data/benchmark-ips/bm_array_shift.rb +7 -0
  16. data/benchmark-ips/class_shovel_vs_singleton_class.rb +16 -0
  17. data/bin/build-browser-source-map-support +5 -0
  18. data/bin/format-filters +54 -0
  19. data/bin/remove-filters +39 -0
  20. data/docs/roda-sprockets.md +86 -0
  21. data/docs/sinatra.md +5 -12
  22. data/examples/rack/Gemfile +1 -0
  23. data/examples/rack/app/application.rb +3 -0
  24. data/examples/rack/config.ru +5 -4
  25. data/exe/opal-repl +2 -83
  26. data/lib/opal/ast/builder.rb +1 -1
  27. data/lib/opal/builder.rb +2 -10
  28. data/lib/opal/builder_processors.rb +1 -1
  29. data/lib/opal/cli_runners.rb +27 -37
  30. data/lib/opal/cli_runners/applescript.rb +5 -44
  31. data/lib/opal/cli_runners/chrome.js +7 -35
  32. data/lib/opal/cli_runners/chrome.rb +75 -17
  33. data/lib/opal/cli_runners/compiler.rb +17 -0
  34. data/lib/opal/cli_runners/nashorn.rb +9 -43
  35. data/lib/opal/cli_runners/nodejs.rb +18 -47
  36. data/lib/opal/cli_runners/server.rb +18 -6
  37. data/lib/opal/cli_runners/source-map-support-browser.js +6445 -0
  38. data/lib/opal/cli_runners/source-map-support.js +639 -0
  39. data/lib/opal/cli_runners/system_runner.rb +45 -0
  40. data/lib/opal/compiler.rb +57 -29
  41. data/lib/opal/config.rb +0 -5
  42. data/lib/opal/erb.rb +1 -1
  43. data/lib/opal/magic_comments.rb +34 -0
  44. data/lib/opal/nodes/args/arity_check.rb +2 -1
  45. data/lib/opal/nodes/base.rb +1 -1
  46. data/lib/opal/nodes/call.rb +1 -4
  47. data/lib/opal/nodes/def.rb +2 -0
  48. data/lib/opal/nodes/iter.rb +1 -1
  49. data/lib/opal/nodes/literal.rb +19 -14
  50. data/lib/opal/nodes/logic.rb +5 -80
  51. data/lib/opal/nodes/masgn.rb +2 -0
  52. data/lib/opal/nodes/rescue.rb +1 -1
  53. data/lib/opal/nodes/super.rb +24 -10
  54. data/lib/opal/nodes/top.rb +5 -4
  55. data/lib/opal/parser/with_c_lexer.rb +2 -1
  56. data/lib/opal/parser/with_ruby_lexer.rb +1 -1
  57. data/lib/opal/path_reader.rb +2 -2
  58. data/lib/opal/paths.rb +8 -5
  59. data/lib/opal/repl.rb +103 -0
  60. data/lib/opal/rewriter.rb +4 -0
  61. data/lib/opal/rewriters/for_rewriter.rb +1 -1
  62. data/lib/opal/rewriters/js_reserved_words.rb +7 -7
  63. data/lib/opal/rewriters/numblocks.rb +31 -0
  64. data/lib/opal/rewriters/returnable_logic.rb +33 -0
  65. data/lib/opal/version.rb +1 -1
  66. data/opal.gemspec +25 -25
  67. data/opal/corelib/array.rb +160 -118
  68. data/opal/corelib/array/pack.rb +5 -3
  69. data/opal/corelib/basic_object.rb +4 -4
  70. data/opal/corelib/class.rb +2 -1
  71. data/opal/corelib/comparable.rb +49 -31
  72. data/opal/corelib/constants.rb +5 -5
  73. data/opal/corelib/enumerable.rb +108 -46
  74. data/opal/corelib/enumerator.rb +27 -12
  75. data/opal/corelib/file.rb +3 -1
  76. data/opal/corelib/hash.rb +6 -1
  77. data/opal/corelib/helpers.rb +8 -28
  78. data/opal/corelib/io.rb +12 -7
  79. data/opal/corelib/kernel.rb +45 -14
  80. data/opal/corelib/kernel/format.rb +3 -1
  81. data/opal/corelib/math.rb +8 -6
  82. data/opal/corelib/method.rb +8 -0
  83. data/opal/corelib/module.rb +17 -2
  84. data/opal/corelib/number.rb +3 -12
  85. data/opal/corelib/proc.rb +16 -0
  86. data/opal/corelib/random/mersenne_twister.rb +147 -0
  87. data/opal/corelib/range.rb +3 -13
  88. data/opal/corelib/regexp.rb +10 -6
  89. data/opal/corelib/runtime.js +208 -81
  90. data/opal/corelib/string.rb +55 -49
  91. data/opal/corelib/string/encoding.rb +109 -32
  92. data/opal/corelib/string/unpack.rb +2 -17
  93. data/opal/corelib/struct.rb +14 -1
  94. data/opal/corelib/time.rb +4 -0
  95. data/opal/opal.rb +1 -1
  96. data/opal/opal/mini.rb +1 -1
  97. data/package.json +1 -0
  98. data/spec/README.md +10 -0
  99. data/spec/filters/bugs/array.rb +76 -0
  100. data/spec/filters/bugs/base64.rb +10 -0
  101. data/spec/filters/bugs/basicobject.rb +12 -0
  102. data/spec/filters/bugs/bigdecimal.rb +248 -0
  103. data/spec/filters/bugs/class.rb +12 -0
  104. data/spec/filters/bugs/complex.rb +7 -0
  105. data/spec/filters/bugs/date.rb +104 -0
  106. data/spec/filters/bugs/encoding.rb +259 -0
  107. data/spec/filters/bugs/enumerable.rb +26 -0
  108. data/spec/filters/bugs/enumerator.rb +48 -0
  109. data/spec/filters/bugs/exception.rb +120 -0
  110. data/spec/filters/bugs/file.rb +48 -0
  111. data/spec/filters/bugs/float.rb +74 -0
  112. data/spec/filters/bugs/hash.rb +60 -0
  113. data/spec/filters/bugs/integer.rb +78 -0
  114. data/spec/filters/bugs/io.rb +9 -0
  115. data/spec/filters/bugs/kernel.rb +401 -0
  116. data/spec/filters/bugs/language.rb +451 -0
  117. data/spec/filters/bugs/marshal.rb +50 -0
  118. data/spec/filters/bugs/math.rb +4 -0
  119. data/spec/filters/bugs/method.rb +79 -0
  120. data/spec/filters/bugs/module.rb +281 -0
  121. data/spec/filters/bugs/nilclass.rb +4 -0
  122. data/spec/filters/bugs/numeric.rb +27 -0
  123. data/spec/filters/bugs/openstruct.rb +8 -0
  124. data/spec/filters/bugs/pack_unpack.rb +138 -0
  125. data/spec/filters/bugs/pathname.rb +9 -0
  126. data/spec/filters/bugs/proc.rb +80 -0
  127. data/spec/filters/bugs/random.rb +20 -0
  128. data/spec/filters/bugs/range.rb +139 -0
  129. data/spec/filters/bugs/rational.rb +12 -0
  130. data/spec/filters/bugs/regexp.rb +91 -0
  131. data/spec/filters/bugs/set.rb +51 -0
  132. data/spec/filters/bugs/singleton.rb +7 -0
  133. data/spec/filters/bugs/string.rb +341 -0
  134. data/spec/filters/bugs/stringscanner.rb +78 -0
  135. data/spec/filters/bugs/struct.rb +26 -0
  136. data/spec/filters/bugs/symbol.rb +7 -0
  137. data/spec/filters/bugs/time.rb +109 -0
  138. data/spec/filters/bugs/unboundmethod.rb +33 -0
  139. data/spec/filters/bugs/warnings.rb +30 -0
  140. data/spec/filters/unsupported/array.rb +168 -0
  141. data/spec/filters/unsupported/basicobject.rb +15 -0
  142. data/spec/filters/unsupported/bignum.rb +55 -0
  143. data/spec/filters/unsupported/class.rb +5 -0
  144. data/spec/filters/unsupported/delegator.rb +6 -0
  145. data/spec/filters/unsupported/enumerable.rb +12 -0
  146. data/spec/filters/unsupported/enumerator.rb +14 -0
  147. data/spec/filters/unsupported/file.rb +4 -0
  148. data/spec/filters/unsupported/fixnum.rb +15 -0
  149. data/spec/filters/unsupported/float.rb +47 -0
  150. data/spec/filters/unsupported/freeze.rb +259 -0
  151. data/spec/filters/unsupported/hash.rb +44 -0
  152. data/spec/filters/unsupported/integer.rb +101 -0
  153. data/spec/filters/unsupported/kernel.rb +35 -0
  154. data/spec/filters/unsupported/language.rb +25 -0
  155. data/spec/filters/unsupported/marshal.rb +44 -0
  156. data/spec/filters/unsupported/matchdata.rb +63 -0
  157. data/spec/filters/unsupported/math.rb +4 -0
  158. data/spec/filters/unsupported/pathname.rb +4 -0
  159. data/spec/filters/unsupported/privacy.rb +287 -0
  160. data/spec/filters/unsupported/proc.rb +4 -0
  161. data/spec/filters/unsupported/random.rb +5 -0
  162. data/spec/filters/unsupported/range.rb +8 -0
  163. data/spec/filters/unsupported/regexp.rb +70 -0
  164. data/spec/filters/unsupported/set.rb +5 -0
  165. data/spec/filters/unsupported/singleton.rb +7 -0
  166. data/spec/filters/unsupported/string.rb +687 -0
  167. data/spec/filters/unsupported/struct.rb +7 -0
  168. data/spec/filters/unsupported/symbol.rb +21 -0
  169. data/spec/filters/unsupported/taint.rb +162 -0
  170. data/spec/filters/unsupported/thread.rb +10 -0
  171. data/spec/filters/unsupported/time.rb +204 -0
  172. data/spec/filters/unsupported/usage_of_files.rb +262 -0
  173. data/spec/lib/builder_processors_spec.rb +44 -0
  174. data/spec/lib/builder_spec.rb +133 -0
  175. data/spec/lib/cli_runners/server_spec.rb +25 -0
  176. data/spec/lib/cli_runners_spec.rb +16 -0
  177. data/spec/lib/cli_spec.rb +256 -0
  178. data/spec/lib/compiler_spec.rb +693 -0
  179. data/spec/lib/config_spec.rb +112 -0
  180. data/spec/lib/dependency_resolver_spec.rb +43 -0
  181. data/spec/lib/deprecations_spec.rb +17 -0
  182. data/spec/lib/fixtures/complex_sprockets.js.rb.erb +4 -0
  183. data/spec/lib/fixtures/file_with_directives.js +2 -0
  184. data/spec/lib/fixtures/jst_file.js.jst +1 -0
  185. data/spec/lib/fixtures/no_requires.rb +1 -0
  186. data/spec/lib/fixtures/opal_file.rb +2 -0
  187. data/spec/lib/fixtures/require_tree_test.rb +3 -0
  188. data/spec/lib/fixtures/required_file.js +1 -0
  189. data/spec/lib/fixtures/required_tree_test/required_file1.rb +1 -0
  190. data/spec/lib/fixtures/required_tree_test/required_file2.rb +1 -0
  191. data/spec/lib/fixtures/requires.rb +7 -0
  192. data/spec/lib/fixtures/source_location_test.rb +7 -0
  193. data/spec/lib/fixtures/source_map.rb +1 -0
  194. data/spec/lib/fixtures/source_map/subfolder/other_file.rb +1 -0
  195. data/spec/lib/fixtures/sprockets_file.js.rb +3 -0
  196. data/spec/lib/fixtures/sprockets_require_tree_test.rb +3 -0
  197. data/spec/lib/path_reader_spec.rb +47 -0
  198. data/spec/lib/paths_spec.rb +18 -0
  199. data/spec/lib/repl_spec.rb +28 -0
  200. data/spec/lib/rewriters/base_spec.rb +68 -0
  201. data/spec/lib/rewriters/binary_operator_assignment_spec.rb +153 -0
  202. data/spec/lib/rewriters/block_to_iter_spec.rb +28 -0
  203. data/spec/lib/rewriters/dot_js_syntax_spec.rb +108 -0
  204. data/spec/lib/rewriters/explicit_writer_return_spec.rb +186 -0
  205. data/spec/lib/rewriters/for_rewriter_spec.rb +92 -0
  206. data/spec/lib/rewriters/hashes/key_duplicates_rewriter_spec.rb +47 -0
  207. data/spec/lib/rewriters/js_reserved_words_spec.rb +119 -0
  208. data/spec/lib/rewriters/logical_operator_assignment_spec.rb +202 -0
  209. data/spec/lib/rewriters/opal_engine_check_spec.rb +84 -0
  210. data/spec/lib/rewriters/returnable_logic_spec.rb +52 -0
  211. data/spec/lib/rewriters/rubyspec/filters_rewriter_spec.rb +59 -0
  212. data/spec/lib/simple_server_spec.rb +56 -0
  213. data/spec/lib/source_map/file_spec.rb +67 -0
  214. data/spec/lib/source_map/index_spec.rb +80 -0
  215. data/spec/lib/spec_helper.rb +105 -0
  216. data/spec/mspec-opal/formatters.rb +197 -0
  217. data/spec/mspec-opal/runner.rb +172 -0
  218. data/spec/opal/compiler/irb_spec.rb +44 -0
  219. data/spec/opal/compiler/unicode_spec.rb +10 -0
  220. data/spec/opal/core/array/dup_spec.rb +23 -0
  221. data/spec/opal/core/array/intersection_spec.rb +38 -0
  222. data/spec/opal/core/array/minus_spec.rb +38 -0
  223. data/spec/opal/core/array/union_spec.rb +38 -0
  224. data/spec/opal/core/array/uniq_spec.rb +49 -0
  225. data/spec/opal/core/class/inherited_spec.rb +18 -0
  226. data/spec/opal/core/enumerable/all_break_spec.rb +5 -0
  227. data/spec/opal/core/enumerable/any_break_spec.rb +5 -0
  228. data/spec/opal/core/enumerable/collect_break_spec.rb +13 -0
  229. data/spec/opal/core/enumerable/count_break_spec.rb +5 -0
  230. data/spec/opal/core/enumerable/detect_break_spec.rb +5 -0
  231. data/spec/opal/core/enumerable/drop_while_break_spec.rb +5 -0
  232. data/spec/opal/core/enumerable/each_slice_break_spec.rb +6 -0
  233. data/spec/opal/core/enumerable/each_with_index_break_spec.rb +5 -0
  234. data/spec/opal/core/enumerable/each_with_object_break_spec.rb +5 -0
  235. data/spec/opal/core/enumerable/find_all_break_spec.rb +5 -0
  236. data/spec/opal/core/enumerable/find_index_break_spec.rb +5 -0
  237. data/spec/opal/core/enumerable/grep_break_spec.rb +5 -0
  238. data/spec/opal/core/enumerable/max_break_spec.rb +5 -0
  239. data/spec/opal/core/enumerable/max_by_break_spec.rb +5 -0
  240. data/spec/opal/core/enumerable/min_break_spec.rb +5 -0
  241. data/spec/opal/core/enumerable/min_by_break_spec.rb +5 -0
  242. data/spec/opal/core/enumerable/none_break_spec.rb +5 -0
  243. data/spec/opal/core/enumerable/one_break_spec.rb +5 -0
  244. data/spec/opal/core/enumerable/reduce_break_spec.rb +5 -0
  245. data/spec/opal/core/enumerable/take_while_break_spec.rb +5 -0
  246. data/spec/opal/core/enumerator/with_index_spec.rb +6 -0
  247. data/spec/opal/core/exception_spec.rb +8 -0
  248. data/spec/opal/core/fixtures/require_tree_files/file 1.rb +1 -0
  249. data/spec/opal/core/fixtures/require_tree_files/file 2.rb +1 -0
  250. data/spec/opal/core/fixtures/require_tree_files/file 3.rb +1 -0
  251. data/spec/opal/core/fixtures/require_tree_files/file 4.rb +1 -0
  252. data/spec/opal/core/fixtures/require_tree_files/file 5.rb +1 -0
  253. data/spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb +1 -0
  254. data/spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb +1 -0
  255. data/spec/opal/core/fixtures/require_tree_files/other/other 1.rb +1 -0
  256. data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
  257. data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
  258. data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
  259. data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
  260. data/spec/opal/core/hash/internals_spec.rb +339 -0
  261. data/spec/opal/core/helpers_spec.rb +14 -0
  262. data/spec/opal/core/iterable_props_spec.rb +53 -0
  263. data/spec/opal/core/kernel/at_exit_spec.rb +70 -0
  264. data/spec/opal/core/kernel/freeze_spec.rb +15 -0
  265. data/spec/opal/core/kernel/instance_variables_spec.rb +110 -0
  266. data/spec/opal/core/kernel/methods_spec.rb +25 -0
  267. data/spec/opal/core/kernel/public_methods_spec.rb +25 -0
  268. data/spec/opal/core/kernel/require_tree_spec.rb +18 -0
  269. data/spec/opal/core/kernel/respond_to_spec.rb +15 -0
  270. data/spec/opal/core/language/DATA/characters_support_spec.rb +9 -0
  271. data/spec/opal/core/language/DATA/empty___END___spec.rb +7 -0
  272. data/spec/opal/core/language/DATA/multiple___END___spec.rb +10 -0
  273. data/spec/opal/core/language/arguments/mlhs_arg_spec.rb +18 -0
  274. data/spec/opal/core/language/keyword_arguments_spec.rb +9 -0
  275. data/spec/opal/core/language/numblocks_spec.rb +16 -0
  276. data/spec/opal/core/language/safe_navigator_spec.rb +7 -0
  277. data/spec/opal/core/language/while_spec.rb +31 -0
  278. data/spec/opal/core/language_spec.rb +29 -0
  279. data/spec/opal/core/marshal/dump_spec.rb +81 -0
  280. data/spec/opal/core/marshal/load_spec.rb +13 -0
  281. data/spec/opal/core/module_spec.rb +27 -0
  282. data/spec/opal/core/object_id_spec.rb +56 -0
  283. data/spec/opal/core/regexp/interpolation_spec.rb +40 -0
  284. data/spec/opal/core/regexp/match_spec.rb +78 -0
  285. data/spec/opal/core/runtime/bridged_classes_spec.rb +123 -0
  286. data/spec/opal/core/runtime/constants_spec.rb +16 -0
  287. data/spec/opal/core/runtime/eval_spec.rb +5 -0
  288. data/spec/opal/core/runtime/exit_spec.rb +29 -0
  289. data/spec/opal/core/runtime/is_a_spec.rb +48 -0
  290. data/spec/opal/core/runtime/loaded_spec.rb +20 -0
  291. data/spec/opal/core/runtime/main_methods_spec.rb +39 -0
  292. data/spec/opal/core/runtime/method_missing_spec.rb +68 -0
  293. data/spec/opal/core/runtime/rescue_spec.rb +37 -0
  294. data/spec/opal/core/runtime/string_spec.rb +25 -0
  295. data/spec/opal/core/runtime/truthy_spec.rb +61 -0
  296. data/spec/opal/core/runtime_spec.rb +58 -0
  297. data/spec/opal/core/string/each_byte_spec.rb +19 -0
  298. data/spec/opal/core/string/gsub_spec.rb +35 -0
  299. data/spec/opal/core/string/to_sym_spec.rb +9 -0
  300. data/spec/opal/core/string_spec.rb +28 -0
  301. data/spec/opal/core/struct/dup_spec.rb +11 -0
  302. data/spec/opal/core/time_spec.rb +68 -0
  303. data/spec/opal/stdlib/erb/erb_spec.rb +30 -0
  304. data/spec/opal/stdlib/erb/inline_block.opalerb +3 -0
  305. data/spec/opal/stdlib/erb/quoted.opalerb +1 -0
  306. data/spec/opal/stdlib/erb/simple.opalerb +1 -0
  307. data/spec/opal/stdlib/js_spec.rb +72 -0
  308. data/spec/opal/stdlib/json/ext_spec.rb +55 -0
  309. data/spec/opal/stdlib/json/parse_spec.rb +37 -0
  310. data/spec/opal/stdlib/logger/logger_spec.rb +308 -0
  311. data/spec/opal/stdlib/native/alias_native_spec.rb +27 -0
  312. data/spec/opal/stdlib/native/array_spec.rb +11 -0
  313. data/spec/opal/stdlib/native/date_spec.rb +12 -0
  314. data/spec/opal/stdlib/native/deprecated_include_spec.rb +8 -0
  315. data/spec/opal/stdlib/native/each_spec.rb +13 -0
  316. data/spec/opal/stdlib/native/element_reference_spec.rb +16 -0
  317. data/spec/opal/stdlib/native/exposure_spec.rb +33 -0
  318. data/spec/opal/stdlib/native/ext_spec.rb +19 -0
  319. data/spec/opal/stdlib/native/hash_spec.rb +67 -0
  320. data/spec/opal/stdlib/native/initialize_spec.rb +17 -0
  321. data/spec/opal/stdlib/native/method_missing_spec.rb +51 -0
  322. data/spec/opal/stdlib/native/native_alias_spec.rb +26 -0
  323. data/spec/opal/stdlib/native/native_class_spec.rb +18 -0
  324. data/spec/opal/stdlib/native/native_module_spec.rb +13 -0
  325. data/spec/opal/stdlib/native/native_reader_spec.rb +22 -0
  326. data/spec/opal/stdlib/native/native_writer_spec.rb +30 -0
  327. data/spec/opal/stdlib/native/new_spec.rb +92 -0
  328. data/spec/opal/stdlib/native/struct_spec.rb +12 -0
  329. data/spec/opal/stdlib/pp_spec.rb +5 -0
  330. data/spec/opal/stdlib/promise/always_spec.rb +49 -0
  331. data/spec/opal/stdlib/promise/error_spec.rb +15 -0
  332. data/spec/opal/stdlib/promise/rescue_spec.rb +53 -0
  333. data/spec/opal/stdlib/promise/then_spec.rb +79 -0
  334. data/spec/opal/stdlib/promise/trace_spec.rb +51 -0
  335. data/spec/opal/stdlib/promise/value_spec.rb +15 -0
  336. data/spec/opal/stdlib/promise/when_spec.rb +34 -0
  337. data/spec/opal/stdlib/source_map_spec.rb +8 -0
  338. data/spec/opal/stdlib/strscan/scan_spec.rb +11 -0
  339. data/spec/opal/stdlib/template/paths_spec.rb +10 -0
  340. data/spec/opal/stdlib/thread/mutex_spec.rb +40 -0
  341. data/spec/opal/stdlib/thread/thread_queue_spec.rb +32 -0
  342. data/spec/opal/stdlib/thread/thread_spec.rb +60 -0
  343. data/spec/ruby_specs +183 -0
  344. data/spec/spec_helper.rb +31 -0
  345. data/spec/support/guard_platform.rb +4 -0
  346. data/spec/support/match_helpers.rb +57 -0
  347. data/spec/support/mspec_rspec_adapter.rb +33 -0
  348. data/spec/support/rewriters_helper.rb +54 -0
  349. data/spec/support/source_map_helper.rb +190 -0
  350. data/stdlib/base64.rb +2 -2
  351. data/stdlib/bigdecimal.rb +15 -3
  352. data/stdlib/bigdecimal/bignumber.js.rb +1 -1
  353. data/stdlib/bigdecimal/util.rb +148 -0
  354. data/stdlib/delegate.rb +8 -0
  355. data/stdlib/nodejs/fileutils.rb +1 -1
  356. data/stdlib/nodejs/kernel.rb +0 -13
  357. data/stdlib/nodejs/stacktrace.rb +4 -179
  358. data/stdlib/ostruct.rb +5 -0
  359. data/stdlib/pp.rb +586 -19
  360. data/stdlib/prettyprint.rb +556 -0
  361. data/stdlib/rbconfig/sizeof.rb +2 -0
  362. data/stdlib/securerandom.rb +32 -0
  363. data/stdlib/set.rb +36 -0
  364. data/stdlib/strscan.rb +15 -0
  365. data/tasks/benchmarking.rake +1 -1
  366. data/tasks/releasing.rake +0 -3
  367. data/tasks/testing.rake +16 -11
  368. data/tasks/testing/mspec_special_calls.rb +1 -19
  369. data/test/nodejs/fixtures/cat.png +0 -0
  370. data/test/nodejs/fixtures/hello.rb +1 -0
  371. data/test/nodejs/fixtures/iso88591.txt +1 -0
  372. data/test/nodejs/fixtures/utf8.txt +1 -0
  373. data/test/nodejs/fixtures/win1258.txt +1 -0
  374. data/test/nodejs/test_dir.rb +39 -0
  375. data/test/nodejs/test_env.rb +62 -0
  376. data/test/nodejs/test_error.rb +29 -0
  377. data/test/nodejs/test_file.rb +206 -0
  378. data/test/nodejs/test_file_encoding.rb +20 -0
  379. data/test/nodejs/test_io.rb +18 -0
  380. data/test/nodejs/test_opal_builder.rb +12 -0
  381. data/test/nodejs/test_pathname.rb +16 -0
  382. data/test/opal/cat.png +0 -0
  383. data/test/opal/http_server.rb +52 -0
  384. data/test/opal/test_base64.rb +115 -0
  385. data/test/opal/test_keyword.rb +590 -0
  386. data/test/opal/test_matrix.rb +661 -0
  387. data/test/opal/test_openuri.rb +53 -0
  388. data/test/opal/unsupported_and_bugs.rb +39 -0
  389. data/yarn.lock +1114 -3
  390. metadata +889 -31
  391. data/lib/opal/nodes/runtime_helpers.rb +0 -51
  392. data/opal/corelib/random/MersenneTwister.js +0 -137
  393. data/opal/corelib/random/mersenne_twister.js.rb +0 -13
  394. data/stdlib/bigdecimal/kernel.rb +0 -5
@@ -0,0 +1,101 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "Integer" do
3
+ fails "Integer#% bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 to equal 9223372036854776000
4
+ fails "Integer#& bignum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (0 was returned)
5
+ fails "Integer#& bignum returns self bitwise AND other when both operands are negative" # Expected 0 to equal -13835058055282164000
6
+ fails "Integer#& bignum returns self bitwise AND other when one operand is negative" # Expected 0 to equal 18446744073709552000
7
+ fails "Integer#& bignum returns self bitwise AND other" # Expected 0 to equal 1
8
+ fails "Integer#& fixnum returns self bitwise AND a bignum" # Expected 0 to equal 18446744073709552000
9
+ fails "Integer#& fixnum returns self bitwise AND other" # Actually uses Bignums
10
+ fails "Integer#* bignum returns self multiplied by the given Integer" # Expected 8.507059173023462e+37 to equal 8.507059173023463e+37
11
+ fails "Integer#** fixnum can raise -1 to a bignum safely" # Expected 1 to have same value and type as -1
12
+ fails "Integer#- bignum returns self minus the given Integer" # Expected 0 to equal 272
13
+ fails "Integer#/ bignum raises a ZeroDivisionError if other is zero and not a Float" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
14
+ fails "Integer#/ bignum returns self divided by other" # Expected 10000000000 to equal 9999999999
15
+ fails "Integer#< bignum returns true if self is less than the given argument" # Expected false to equal true
16
+ fails "Integer#<< (with n << m) bignum calls #to_int to convert the argument to an Integer" # Expected 0 to equal 2.3611832414348226e+21
17
+ fails "Integer#<< (with n << m) bignum returns n shifted left m bits when n < 0, m > 0" # Expected 0 to equal -7.555786372591432e+22
18
+ fails "Integer#<< (with n << m) bignum returns n shifted left m bits when n > 0, m > 0" # Expected 0 to equal 2.3611832414348226e+21
19
+ fails "Integer#<< (with n << m) bignum returns n shifted right m bits when n < 0, m < 0" # Expected 0 to equal -36893488147419103000
20
+ fails "Integer#<< (with n << m) bignum returns n shifted right m bits when n > 0, m < 0" # Expected 0 to equal 73786976294838210000
21
+ fails "Integer#<< (with n << m) bignum returns n when n < 0, m == 0" # Expected 0 to equal -147573952589676410000
22
+ fails "Integer#<< (with n << m) bignum returns n when n > 0, m == 0" # Expected 0 to equal 147573952589676410000
23
+ fails "Integer#<< (with n << m) fixnum returns 0 when m < 0 and m is a Bignum" # Expected 3 to equal 0
24
+ fails "Integer#<< (with n << m) fixnum returns an Bignum == fixnum_max * 2 when fixnum_max << 1 and n > 0" # Expected 2147483646 (Number) to be an instance of Bignum
25
+ fails "Integer#<< (with n << m) fixnum returns an Bignum == fixnum_min * 2 when fixnum_min << 1 and n < 0" # Expected -2147483648 (Number) to be an instance of Bignum
26
+ fails "Integer#<= bignum returns false if compares with near float" # Expected true to equal false
27
+ fails "Integer#<=> bignum with a Bignum when other is negative returns -1 when self is negative and other is larger" # Expected 0 to equal -1
28
+ fails "Integer#<=> bignum with a Bignum when other is negative returns 1 when self is negative and other is smaller" # Expected 0 to equal 1
29
+ fails "Integer#<=> bignum with a Bignum when other is positive returns -1 when self is positive and other is larger" # Expected 0 to equal -1
30
+ fails "Integer#<=> bignum with a Bignum when other is positive returns 1 when other is smaller" # Expected 0 to equal 1
31
+ fails "Integer#<=> bignum with an Object returns -1 if the coerced value is larger" # Expected 0 to equal -1
32
+ fails "Integer#<=> bignum with an Object returns nil if #coerce does not return an Array" # Expected 0 to be nil
33
+ fails "Integer#== bignum returns the result of 'other == self' as a boolean" # Expected "woot" to equal true
34
+ fails "Integer#== bignum returns true if self has the same value as the given argument" # Expected true to equal false
35
+ fails "Integer#=== bignum returns the result of 'other == self' as a boolean" # Expected "woot" to equal true
36
+ fails "Integer#=== bignum returns true if self has the same value as the given argument" # Expected true to equal false
37
+ fails "Integer#> bignum returns true if self is greater than the given argument" # Expected false to equal true
38
+ fails "Integer#>= bignum returns true if self is greater than or equal to other" # Expected true to equal false
39
+ fails "Integer#>> (with n >> m) bignum calls #to_int to convert the argument to an Integer" # Expected 0 to equal 36893488147419103000
40
+ fails "Integer#>> (with n >> m) bignum respects twos complement signed shifting for very large values" # Expected 0 to equal 2.2204460502842888e+66
41
+ fails "Integer#>> (with n >> m) bignum respects twos complement signed shifting" # Expected 101376 to equal -2621440001220703000
42
+ fails "Integer#>> (with n >> m) bignum returns n shifted left m bits when n < 0, m < 0" # Expected 0 to equal -1.1805916207174113e+21
43
+ fails "Integer#>> (with n >> m) bignum returns n shifted left m bits when n > 0, m < 0" # Expected 0 to equal 590295810358705700000
44
+ fails "Integer#>> (with n >> m) bignum returns n shifted right m bits when n < 0, m > 0" # Expected 0 to equal -36893488147419103000
45
+ fails "Integer#>> (with n >> m) bignum returns n shifted right m bits when n > 0, m > 0" # Expected 0 to equal 73786976294838210000
46
+ fails "Integer#>> (with n >> m) bignum returns n when n < 0, m == 0" # Expected 0 to equal -147573952589676410000
47
+ fails "Integer#>> (with n >> m) bignum returns n when n > 0, m == 0" # Expected 0 to equal 147573952589676410000
48
+ fails "Integer#>> (with n >> m) fixnum returns 0 when m is a bignum" # Expected 3 to equal 0
49
+ fails "Integer#>> (with n >> m) fixnum returns an Bignum == fixnum_max * 2 when fixnum_max >> -1 and n > 0" # NameError: uninitialized constant Bignum
50
+ fails "Integer#>> (with n >> m) fixnum returns an Bignum == fixnum_min * 2 when fixnum_min >> -1 and n < 0" # NameError: uninitialized constant Bignum
51
+ fails "Integer#[] bignum returns the nth bit in the binary representation of self" # Expected 0 to equal 1
52
+ fails "Integer#[] bignum tries to convert the given argument to an Integer using #to_int" # Expected 0 to equal 1
53
+ fails "Integer#^ bignum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (14 was returned)
54
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when all bits are 1 and other value is negative" # Expected -1 to equal -9.903520314283042e+27
55
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when both operands are negative" # Expected 0 to equal 64563604257983430000
56
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other when one operand is negative" # Expected 0 to equal -64563604257983430000
57
+ fails "Integer#^ bignum returns self bitwise EXCLUSIVE OR other" # Expected 2 to equal 9223372036854776000
58
+ fails "Integer#^ fixnum returns self bitwise EXCLUSIVE OR a bignum" # Expected -1 to equal -18446744073709552000
59
+ fails "Integer#bit_length bignum returns the position of the leftmost 0 bit of a negative number" # NoMethodError: undefined method `bit_length` for -Infinity:Float
60
+ fails "Integer#bit_length bignum returns the position of the leftmost bit of a positive number" # Expected 1 to equal 1000
61
+ fails "Integer#coerce bignum coerces other to a Bignum and returns [other, self] when passed a Fixnum" # NameError: uninitialized constant Bignum
62
+ fails "Integer#coerce bignum raises a TypeError when not passed a Fixnum or Bignum" # ArgumentError: invalid value for Float(): "test"
63
+ fails "Integer#coerce bignum returns [other, self] when passed a Bignum" # NameError: uninitialized constant Bignum
64
+ fails "Integer#div bignum calls #coerce and #div if argument responds to #coerce" # Mock 'x' expected to receive div(main) exactly 1 times but received it 0 times
65
+ fails "Integer#div bignum looses precision if passed Float argument" # Expected 9223372036854776000 not to equal 9223372036854776000
66
+ fails "Integer#div bignum returns self divided by other" # Expected 10000000000 to equal 9999999999
67
+ fails "Integer#divmod bignum raises a TypeError when the given argument is not an Integer" # NoMethodError: undefined method `nan?' for main
68
+ fails "Integer#divmod bignum returns an Array containing quotient and modulus obtained from dividing self by the given argument" # Expected [2305843009213694000, 0] to equal [2305843009213694000, 3]
69
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a < 0, b < 0 and |a| < |b|" # Expected [1, 0] to equal [0, -9223372036854776000]
70
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a < 0, b > 0 and |a| < b" # Expected [-1, 0] to equal [-1, 1]
71
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a > 0, b < 0 and a < |b|" # Expected [-1, 0] to equal [-1, -1]
72
+ fails "Integer#divmod bignum with q = floor(x/y), a = q*b + r, returns [q,r] when a > 0, b < 0 and a > |b|" # Expected [-1, 0] to equal [-2, -9223372036854776000]
73
+ fails "Integer#even? fixnum returns true for a Bignum when it is an even number" # Expected true to be false
74
+ fails "Integer#even? returns true for a Bignum when it is an even number"
75
+ fails "Integer#modulo bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 to equal 9223372036854776000
76
+ fails "Integer#odd? bignum returns false if self is even and negative" # Expected true to be false
77
+ fails "Integer#odd? bignum returns true if self is odd and positive" # Expected false to be true
78
+ fails "Integer#pow one argument is passed bignum raises a TypeError when given a non-Integer" # NoMethodError: undefined method `pow' for 9223372036854776000
79
+ fails "Integer#pow one argument is passed bignum returns a complex number when negative and raised to a fractional power" # NoMethodError: undefined method `pow' for -9223372036854776000
80
+ fails "Integer#pow one argument is passed bignum returns self raised to other power" # NoMethodError: undefined method `pow' for 9223372036854776000
81
+ fails "Integer#pow one argument is passed bignum switch to a Float when the values is too big" # NoMethodError: undefined method `pow' for 9223372036854776000
82
+ fails "Integer#pow one argument is passed fixnum can raise -1 to a bignum safely" # NoMethodError: undefined method `pow' for -1
83
+ fails "Integer#pow one argument is passed fixnum can raise 1 to a bignum safely" # NoMethodError: undefined method `pow' for 1
84
+ fails "Integer#pow one argument is passed fixnum overflows the answer to a bignum transparently" # NoMethodError: undefined method `pow' for 2
85
+ fails "Integer#pow one argument is passed fixnum returns Float::INFINITY for 0 ** -1.0" # Depends on the difference between Integer and Float
86
+ fails "Integer#pow two arguments are passed ensures all arguments are integers" # Depends on the difference between Integer and Float
87
+ fails "Integer#pow two arguments are passed works well with bignums" # NoMethodError: undefined method `pow' for 2
88
+ fails "Integer#remainder bignum does raises ZeroDivisionError if other is zero and a Float" # NoMethodError: undefined method `remainder' for 9223372036854776000
89
+ fails "Integer#remainder bignum raises a ZeroDivisionError if other is zero and not a Float" # NoMethodError: undefined method `remainder' for 9223372036854776000
90
+ fails "Integer#remainder bignum returns the remainder of dividing self by other" # NoMethodError: undefined method `remainder' for 9223372036854776000
91
+ fails "Integer#size bignum returns the number of bytes required to hold the unsigned bignum data" # Expected 4 to equal 8
92
+ fails "Integer#| bignum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (9 was returned)
93
+ fails "Integer#| bignum returns self bitwise OR other when both operands are negative" # Expected 0 to equal -1
94
+ fails "Integer#| bignum returns self bitwise OR other when one operand is negative" # Expected 0 to equal -64563604257983430000
95
+ fails "Integer#| bignum returns self bitwise OR other" # Expected 2 to equal 9223372036854776000
96
+ fails "Integer#~ bignum returns self with each bit flipped" # Expected -1 to equal -9223372036854776000
97
+ fails "String#to_r does not treat a leading period without a numeric prefix as a decimal point" # Expected (8106479329266893/9007199254740992) not to equal (8106479329266893/9007199254740992)
98
+ fails "String#to_r ignores underscores between numbers" # Expected (-5228919960423629/274877906944) to equal (-190227/10)
99
+ fails "String#to_r understands a forward slash as separating the numerator from the denominator" # Expected (-896028675862255/140737488355328) to equal (-191/30)
100
+ fails "String#to_r understands decimal points" # Expected (1874623344892969/562949953421312) to equal (333/100)
101
+ end
@@ -0,0 +1,35 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "Kernel" do
3
+ fails "Kernel has private instance method Array()"
4
+ fails "Kernel has private instance method Hash()"
5
+ fails "Kernel#Float is a private method"
6
+ fails "Kernel#Float raises a TypeError if #to_f returns an Integer"
7
+ fails "Kernel#Integer calls to_i on Rationals"
8
+ fails "Kernel#Integer is a private method"
9
+ fails "Kernel#Integer returns a Fixnum or Bignum object"
10
+ fails "Kernel#String is a private method"
11
+ fails "Kernel#class returns the first non-singleton class" # TypeError: can't define singleton
12
+ fails "Kernel#clone preserves tainted state from the original"
13
+ fails "Kernel#clone preserves untrusted state from the original"
14
+ fails "Kernel#clone raises a TypeError for Symbol"
15
+ fails "Kernel#dup does not copy frozen state from the original"
16
+ fails "Kernel#dup preserves tainted state from the original"
17
+ fails "Kernel#dup preserves untrusted state from the original"
18
+ fails "Kernel#dup raises a TypeError for Symbol"
19
+ fails "Kernel#eql? is a public instance method"
20
+ fails "Kernel#fail is a private method"
21
+ fails "Kernel#format is a private method"
22
+ fails "Kernel#inspect returns an untrusted string if self is untrusted"
23
+ fails "Kernel#raise is a private method"
24
+ fails "Kernel#sleep accepts a Rational"
25
+ fails "Kernel#sleep is a private method"
26
+ fails "Kernel#sleep pauses execution indefinitely if not given a duration"
27
+ fails "Kernel#sprintf is a private method"
28
+ fails "Kernel#to_s returns a tainted result if self is tainted"
29
+ fails "Kernel#to_s returns an untrusted result if self is untrusted"
30
+ fails "Kernel#warn is a private method"
31
+ fails "Kernel.Float raises a TypeError if #to_f returns an Integer"
32
+ fails "Kernel.Integer calls to_i on Rationals"
33
+ fails "Kernel.Integer returns a Fixnum or Bignum object"
34
+ fails "Kernel.fail is a private method"
35
+ end
@@ -0,0 +1,25 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "language" do
3
+ fails "Magic comment can be after the shebang"
4
+ fails "Magic comment can take Emacs style"
5
+ fails "Magic comment can take vim style"
6
+ fails "Magic comment determines __ENCODING__"
7
+ fails "Magic comment is case-insensitive"
8
+ fails "Magic comment must be at the first line"
9
+ fails "Magic comment must be the first token of the line"
10
+ fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if the other file doesn't have the comment"
11
+ fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if they have different encodings"
12
+ fails "Ruby String literals with a magic frozen comment produce the same object each time"
13
+ fails "Ruby String literals with a magic frozen comment produce the same object for literals with the same content in different files"
14
+ fails "Ruby String literals with a magic frozen comment produce the same object for literals with the same content"
15
+ fails "The defined? keyword for pseudo-variables returns 'expression' for __ENCODING__"
16
+ fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private"
17
+ fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is protected"
18
+ fails "The private keyword changes the visibility of the existing method in the subclass"
19
+ fails "The private keyword changes visibility of previously called method"
20
+ fails "The private keyword changes visibility of previously called methods with same send/call site" # Expected NoMethodError but no exception was raised (2 was returned)
21
+ fails "The private keyword is overridden when a new class is opened"
22
+ fails "The private keyword marks following methods as being private"
23
+ fails "rescuing Interrupt raises an Interrupt when sent a signal SIGINT" # NoMethodError: undefined method `kill' for Process
24
+ fails "rescuing SignalException raises a SignalException when sent a signal" # NoMethodError: undefined method `kill' for Process
25
+ end
@@ -0,0 +1,44 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "Marshal" do
3
+ fails "Marshal.dump dumps subsequent appearances of a symbol as a link" # depends on Symbol-s
4
+ fails "Marshal.dump raises a TypeError if dumping a IO/File instance"
5
+ fails "Marshal.dump returns a tainted string if nested object is tainted"
6
+ fails "Marshal.dump returns a tainted string if object is tainted"
7
+ fails "Marshal.dump returns a trusted string if object is trusted"
8
+ fails "Marshal.dump returns an untainted string if object is untainted"
9
+ fails "Marshal.dump returns an untrusted string if nested object is untrusted"
10
+ fails "Marshal.dump returns an untrusted string if object is untrusted"
11
+ fails "Marshal.dump when passed an IO raises an Error when the IO-Object does not respond to #write"
12
+ fails "Marshal.dump when passed an IO returns the IO-Object"
13
+ fails "Marshal.dump when passed an IO writes the serialized data to the IO-Object"
14
+ fails "Marshal.dump with a Float dumps a Float" # depends on the string mutating, replaced with test in spec/opal
15
+ fails "Marshal.dump with a Regexp dumps a Regexp in another encoding"
16
+ fails "Marshal.dump with a Regexp dumps a Regexp with flags" # depends on string encoding, replaced with test in spec/opal
17
+ fails "Marshal.dump with a Regexp dumps a Regexp" # depends on utf-8 encoding which is not required, replaced with test in spec/opal
18
+ fails "Marshal.dump with a Regexp dumps a UTF-8 Regexp"
19
+ fails "Marshal.dump with a Regexp dumps a binary Regexp"
20
+ fails "Marshal.dump with a Regexp dumps an extended Regexp" # depends on string encoding, replaced with test in spec/opal
21
+ fails "Marshal.dump with a String dumps a String extended with a Module" # depends on string mutation
22
+ fails "Marshal.dump with a String dumps a String with instance variables" # depends on string mutation
23
+ fails "Marshal.dump with an object responding to #marshal_dump dumps the object returned by #marshal_dump" # depends on Symbol-s, replaced with test in spec/opal
24
+ fails "Marshal.load for a Hash preserves hash ivars when hash contains a string having ivar" # depends on String#instance_variable_set
25
+ fails "Marshal.load for a String loads a string having ivar with ref to self" # depends on string mutation
26
+ fails "Marshal.load for a String loads a string through StringIO stream"
27
+ fails "Marshal.load for a String loads a string with an ivar" # depends on string mutation
28
+ fails "Marshal.load for a wrapped C pointer loads"
29
+ fails "Marshal.load for a wrapped C pointer raises ArgumentError when the local class is a regular object"
30
+ fails "Marshal.load for a wrapped C pointer raises TypeError when the local class is missing _load_data"
31
+ fails "Marshal.load for an Array loads an array having ivar" # for some reason depends on String#instance_variable_set which is not supported. replaced with test in spec/opal
32
+ fails "Marshal.load loads a Random" # depends on the reading from the filesystem
33
+ fails "Marshal.load preserves taintedness of nested structure"
34
+ fails "Marshal.load raises EOFError on loading an empty file"
35
+ fails "Marshal.load raises a TypeError with bad Marshal version" # depends on String#[]=
36
+ fails "Marshal.load returns a trusted object if source is trusted"
37
+ fails "Marshal.load returns an untainted object if source is untainted"
38
+ fails "Marshal.load returns an untrusted object if source is untrusted"
39
+ fails "Marshal.load when source is tainted does not taint Bignums"
40
+ fails "Marshal.load when source is tainted does not taint Fixnums"
41
+ fails "Marshal.load when source is tainted does not taint Floats"
42
+ fails "Marshal.load when source is tainted does not taint Symbols"
43
+ fails "Marshal.load when source is tainted returns a tainted object"
44
+ end
@@ -0,0 +1,63 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "MatchData" do
3
+ fails "MatchData#[Symbol] raises an IndexError if there is no named match corresponding to the String"
4
+ fails "MatchData#[Symbol] raises an IndexError if there is no named match corresponding to the Symbol"
5
+ fails "MatchData#[Symbol] returns matches in the String's encoding"
6
+ fails "MatchData#[Symbol] returns nil on non-matching named matches"
7
+ fails "MatchData#[Symbol] returns the corresponding named match when given a String"
8
+ fails "MatchData#[Symbol] returns the corresponding named match when given a Symbol"
9
+ fails "MatchData#[Symbol] returns the last match when multiple named matches exist with the same name"
10
+ fails "MatchData#[Symbol] returns the matching version of multiple corresponding named match"
11
+ fails "MatchData#begin returns nil when the nth match isn't found"
12
+ fails "MatchData#begin returns the offset for multi byte strings with unicode regexp"
13
+ fails "MatchData#begin returns the offset for multi byte strings"
14
+ fails "MatchData#begin returns the offset of the start of the nth element"
15
+ fails "MatchData#begin when passed a String argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
16
+ fails "MatchData#begin when passed a String argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
17
+ fails "MatchData#begin when passed a String argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
18
+ fails "MatchData#begin when passed a String argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
19
+ fails "MatchData#begin when passed a Symbol argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
20
+ fails "MatchData#begin when passed a Symbol argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
21
+ fails "MatchData#begin when passed a Symbol argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
22
+ fails "MatchData#begin when passed a Symbol argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
23
+ fails "MatchData#begin when passed an integer argument returns nil when the nth match isn't found" # ArgumentError: MatchData#begin only supports 0th element
24
+ fails "MatchData#begin when passed an integer argument returns the character offset for multi-byte strings" # ArgumentError: MatchData#begin only supports 0th element
25
+ fails "MatchData#begin when passed an integer argument returns the character offset of the start of the nth element" # ArgumentError: MatchData#begin only supports 0th element
26
+ fails "MatchData#begin when passed an integer argument tries to convert the passed argument to an Integer using #to_int" # ArgumentError: MatchData#begin only supports 0th element
27
+ fails "MatchData#end returns nil when the nth match isn't found"
28
+ fails "MatchData#end returns the offset for multi byte strings with unicode regexp"
29
+ fails "MatchData#end returns the offset for multi byte strings"
30
+ fails "MatchData#end returns the offset of the end of the nth element"
31
+ fails "MatchData#end when passed a String argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
32
+ fails "MatchData#end when passed a String argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
33
+ fails "MatchData#end when passed a String argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
34
+ fails "MatchData#end when passed a String argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
35
+ fails "MatchData#end when passed a Symbol argument return the character offset of the start of the named capture" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
36
+ fails "MatchData#end when passed a Symbol argument returns the character offset for multi byte strings" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<b>\d+)(\d)"
37
+ fails "MatchData#end when passed a Symbol argument returns the character offset for multi-byte names" # Exception: named captures are not supported in javascript: "(?<æ>.)(.)(?<b>\d+)(\d)"
38
+ fails "MatchData#end when passed a Symbol argument returns the character offset for the farthest match when multiple named captures use the same name" # Exception: named captures are not supported in javascript: "(?<a>.)(.)(?<a>\d+)(\d)"
39
+ fails "MatchData#end when passed an integer argument returns nil when the nth match isn't found" # ArgumentError: MatchData#end only supports 0th element
40
+ fails "MatchData#end when passed an integer argument returns the character offset for multi-byte strings" # ArgumentError: MatchData#end only supports 0th element
41
+ fails "MatchData#end when passed an integer argument returns the character offset of the end of the nth element" # ArgumentError: MatchData#end only supports 0th element
42
+ fails "MatchData#end when passed an integer argument tries to convert the passed argument to an Integer using #to_int" # ArgumentError: MatchData#end only supports 0th element
43
+ fails "MatchData#named_captures prefers later captures" # Exception: named captures are not supported in javascript: "^(?<a>.)(?<b>.)(?<b>.)(?<a>.)$"
44
+ fails "MatchData#named_captures returns a Hash that has captured name and the matched string pairs" # Exception: named captures are not supported in javascript: "(?<a>.)(?<b>.)?"
45
+ fails "MatchData#named_captures returns the latest matched capture, even if a later one that does not match exists" # Exception: named captures are not supported in javascript: "^(?<a>.)(?<b>.)(?<b>.)(?<a>.)?$"
46
+ fails "MatchData#names equals Regexp#names"
47
+ fails "MatchData#names returns [] if there were no named captures"
48
+ fails "MatchData#names returns an Array"
49
+ fails "MatchData#names returns each name only once"
50
+ fails "MatchData#names returns the names of the named capture groups"
51
+ fails "MatchData#names sets each element to a String"
52
+ fails "MatchData#offset returns [nil, nil] when the nth match isn't found"
53
+ fails "MatchData#offset returns a two element array with the begin and end of the nth match"
54
+ fails "MatchData#offset returns the offset for multi byte strings with unicode regexp"
55
+ fails "MatchData#offset returns the offset for multi byte strings"
56
+ fails "MatchData#post_match keeps taint status from the source string"
57
+ fails "MatchData#post_match keeps untrusted status from the source string"
58
+ fails "MatchData#pre_match keeps taint status from the source string"
59
+ fails "MatchData#pre_match keeps untrusted status from the source string"
60
+ fails "MatchData#regexp returns the pattern used in the match"
61
+ fails "MatchData#values_at slices captures with the given names" # Exception: named captures are not supported in javascript: "(?<a>.)(?<b>.)(?<c>.)"
62
+ fails "MatchData#values_at takes names and indices" # Exception: named captures are not supported in javascript: "^(?<a>.)(?<b>.)$"
63
+ end
@@ -0,0 +1,4 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "Math" do
3
+ fails "Math#atanh is a private instance method"
4
+ end
@@ -0,0 +1,4 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "Pathname" do
3
+ fails "Pathname.new is tainted if path is tainted"
4
+ end
@@ -0,0 +1,287 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "private" do
3
+ fails "A method definition always resets the visibility to public for nested definitions at the toplevel" # Expected NoMethodError (/private/) but no exception was raised ("nested_method_in_toplevel_method" was returned)
4
+ fails "A method definition always resets the visibility to public for nested definitions in Class.new" # Expected NoMethodError (/private/) but no exception was raised ("new_def" was returned)
5
+ fails "BasicObject#initialize is a private instance method"
6
+ fails "BasicObject#method_missing for a Class raises a NoMethodError when an undefined method is called"
7
+ fails "BasicObject#method_missing is a private method"
8
+ fails "BasicObject#singleton_method_added is a private method"
9
+ fails "BasicObject#singleton_method_removed is a private method"
10
+ fails "BasicObject#singleton_method_undefined is a private method"
11
+ fails "Defining a 'respond_to_missing?' method sets the method's visibility to private"
12
+ fails "Defining a method at the top-level defines it on Object with private visibility by default"
13
+ fails "Defining an 'initialize' method sets the method's visibility to private"
14
+ fails "Defining an 'initialize_clone' method sets the method's visibility to private"
15
+ fails "Defining an 'initialize_copy' method sets the method's visibility to private"
16
+ fails "Defining an 'initialize_dup' method sets the method's visibility to private"
17
+ fails "Enumerator#initialize is a private method"
18
+ fails "Invoking a private getter method does not permit self as a receiver"
19
+ fails "Kernel#block_given? is a private method"
20
+ fails "Kernel#eval is a private method"
21
+ fails "Kernel#iterator? is a private method"
22
+ fails "Kernel#local_variables is a private method"
23
+ fails "Kernel#methods returns private singleton methods defined by obj.meth"
24
+ fails "Kernel#methods returns singleton methods defined in 'class << self' when it follows 'private'"
25
+ fails "Kernel#p is a private method"
26
+ fails "Kernel#print is a private method"
27
+ fails "Kernel#printf is a private method"
28
+ fails "Kernel#private_methods returns a list of the names of privately accessible methods in the object and its ancestors and mixed-in modules"
29
+ fails "Kernel#private_methods returns a list of the names of privately accessible methods in the object"
30
+ fails "Kernel#private_methods returns private methods mixed in to the metaclass"
31
+ fails "Kernel#private_methods when not passed an argument returns a unique list for a class including a module"
32
+ fails "Kernel#private_methods when not passed an argument returns a unique list for a subclass of a class that includes a module"
33
+ fails "Kernel#private_methods when not passed an argument returns a unique list for an object extended by a module"
34
+ fails "Kernel#private_methods when passed false returns a list of private methods in without its ancestors"
35
+ fails "Kernel#private_methods when passed nil returns a list of private methods in without its ancestors"
36
+ fails "Kernel#private_methods when passed true returns a unique list for a class including a module"
37
+ fails "Kernel#private_methods when passed true returns a unique list for a subclass of a class that includes a module"
38
+ fails "Kernel#private_methods when passed true returns a unique list for an object extended by a module"
39
+ fails "Kernel#protected_methods returns a list of the names of protected methods accessible in the object and from its ancestors and mixed-in modules"
40
+ fails "Kernel#protected_methods returns a list of the names of protected methods accessible in the object"
41
+ fails "Kernel#protected_methods returns methods mixed in to the metaclass"
42
+ fails "Kernel#protected_methods when not passed an argument returns a unique list for a class including a module"
43
+ fails "Kernel#protected_methods when not passed an argument returns a unique list for a subclass of a class that includes a module"
44
+ fails "Kernel#protected_methods when not passed an argument returns a unique list for an object extended by a module"
45
+ fails "Kernel#protected_methods when passed false returns a list of protected methods in without its ancestors"
46
+ fails "Kernel#protected_methods when passed nil returns a list of protected methods in without its ancestors"
47
+ fails "Kernel#protected_methods when passed true returns a unique list for a class including a module"
48
+ fails "Kernel#protected_methods when passed true returns a unique list for a subclass of a class that includes a module"
49
+ fails "Kernel#protected_methods when passed true returns a unique list for an object extended by a module"
50
+ fails "Kernel#public_send called from own public method raises a NoMethodError if the method is private"
51
+ fails "Kernel#public_send called from own public method raises a NoMethodError if the method is protected"
52
+ fails "Kernel#public_send raises a NoMethodError if the method is protected"
53
+ fails "Kernel#public_send raises a NoMethodError if the named method is an alias of a private method"
54
+ fails "Kernel#public_send raises a NoMethodError if the named method is an alias of a protected method"
55
+ fails "Kernel#public_send raises a NoMethodError if the named method is private"
56
+ fails "Kernel#puts is a private method"
57
+ fails "Kernel#respond_to? does not change method visibility when finding private method"
58
+ fails "Kernel#respond_to? returns false even if obj responds to the given private method (include_private = false)"
59
+ fails "Kernel#respond_to? returns false if obj responds to the given private method"
60
+ fails "Kernel#respond_to? returns false if obj responds to the given protected method (include_private = false)"
61
+ fails "Kernel#respond_to? returns false if obj responds to the given protected method"
62
+ fails "Kernel#respond_to_missing? is a private method"
63
+ fails "Kernel#respond_to_missing? is called when obj responds to the given private method, include_private = false"
64
+ fails "Kernel#respond_to_missing? is called when obj responds to the given protected method, include_private = false"
65
+ fails "Kernel#respond_to_missing? isn't called when obj responds to the given private method, include_private = true"
66
+ fails "Kernel#respond_to_missing? isn't called when obj responds to the given protected method, include_private = true"
67
+ fails "Kernel#respond_to_missing? isn't called when obj responds to the given public method, include_private = true"
68
+ fails "Kernel#singleton_methods when not passed an argument does not return private class methods for a class"
69
+ fails "Kernel#singleton_methods when not passed an argument does not return private inherited singleton methods for a class including a module"
70
+ fails "Kernel#singleton_methods when not passed an argument does not return private inherited singleton methods for a module including a module"
71
+ fails "Kernel#singleton_methods when not passed an argument does not return private inherited singleton methods for a subclass including a module"
72
+ fails "Kernel#singleton_methods when not passed an argument does not return private inherited singleton methods for a subclass of a class including a module"
73
+ fails "Kernel#singleton_methods when not passed an argument does not return private inherited singleton methods for a subclass of a class that includes a module, where the subclass also includes a module"
74
+ fails "Kernel#singleton_methods when not passed an argument does not return private inherited singleton methods for a subclass"
75
+ fails "Kernel#singleton_methods when not passed an argument does not return private module methods for a module"
76
+ fails "Kernel#singleton_methods when not passed an argument does not return private singleton methods for a class extended with a module"
77
+ fails "Kernel#singleton_methods when not passed an argument does not return private singleton methods for an object extended with a module"
78
+ fails "Kernel#singleton_methods when not passed an argument does not return private singleton methods for an object extended with two modules"
79
+ fails "Kernel#singleton_methods when not passed an argument does not return private singleton methods for an object extented with a module including a module"
80
+ fails "Kernel#singleton_methods when passed false does not return private class methods for a class"
81
+ fails "Kernel#singleton_methods when passed false does not return private inherited singleton methods for a class including a module"
82
+ fails "Kernel#singleton_methods when passed false does not return private inherited singleton methods for a module including a module"
83
+ fails "Kernel#singleton_methods when passed false does not return private inherited singleton methods for a subclass including a module"
84
+ fails "Kernel#singleton_methods when passed false does not return private inherited singleton methods for a subclass of a class including a module"
85
+ fails "Kernel#singleton_methods when passed false does not return private inherited singleton methods for a subclass of a class that includes a module, where the subclass also includes a module"
86
+ fails "Kernel#singleton_methods when passed false does not return private inherited singleton methods for a subclass"
87
+ fails "Kernel#singleton_methods when passed false does not return private module methods for a module"
88
+ fails "Kernel#singleton_methods when passed false does not return private singleton methods for a class extended with a module"
89
+ fails "Kernel#singleton_methods when passed false does not return private singleton methods for an object extended with a module"
90
+ fails "Kernel#singleton_methods when passed false does not return private singleton methods for an object extended with two modules"
91
+ fails "Kernel#singleton_methods when passed false does not return private singleton methods for an object extented with a module including a module"
92
+ fails "Kernel#singleton_methods when passed true does not return private class methods for a class"
93
+ fails "Kernel#singleton_methods when passed true does not return private inherited singleton methods for a class including a module"
94
+ fails "Kernel#singleton_methods when passed true does not return private inherited singleton methods for a module including a module"
95
+ fails "Kernel#singleton_methods when passed true does not return private inherited singleton methods for a subclass including a module"
96
+ fails "Kernel#singleton_methods when passed true does not return private inherited singleton methods for a subclass of a class including a module"
97
+ fails "Kernel#singleton_methods when passed true does not return private inherited singleton methods for a subclass of a class that includes a module, where the subclass also includes a module"
98
+ fails "Kernel#singleton_methods when passed true does not return private inherited singleton methods for a subclass"
99
+ fails "Kernel#singleton_methods when passed true does not return private module methods for a module"
100
+ fails "Kernel#singleton_methods when passed true does not return private singleton methods for a class extended with a module"
101
+ fails "Kernel#singleton_methods when passed true does not return private singleton methods for an object extended with a module"
102
+ fails "Kernel#singleton_methods when passed true does not return private singleton methods for an object extended with two modules"
103
+ fails "Kernel#singleton_methods when passed true does not return private singleton methods for an object extented with a module including a module"
104
+ fails "Kernel.global_variables is a private method"
105
+ fails "Kernel.lambda is a private method"
106
+ fails "Kernel.loop is a private method"
107
+ fails "Kernel.proc is a private method"
108
+ fails "Kernel.rand is a private method"
109
+ fails "Kernel.srand is a private method"
110
+ fails "Method#== missing methods calls respond_to_missing? with true to include private methods"
111
+ fails "Method#eql? missing methods calls respond_to_missing? with true to include private methods"
112
+ fails "Module#alias_method aliasing special methods keeps initialize private when aliasing"
113
+ fails "Module#alias_method aliasing special methods keeps initialize_clone private when aliasing"
114
+ fails "Module#alias_method aliasing special methods keeps initialize_copy private when aliasing"
115
+ fails "Module#alias_method aliasing special methods keeps initialize_dup private when aliasing"
116
+ fails "Module#alias_method aliasing special methods keeps respond_to_missing? private when aliasing"
117
+ fails "Module#alias_method is a private method"
118
+ fails "Module#append_features is a private method"
119
+ fails "Module#attr is a private method"
120
+ fails "Module#attr_accessor is a private method"
121
+ fails "Module#attr_reader is a private method"
122
+ fails "Module#attr_writer is a private method"
123
+ fails "Module#define_method is private"
124
+ fails "Module#define_method when given an UnboundMethod sets the new method's visibility to the current frame's visibility" # Expected NoMethodError but no exception was raised ("piggy" was returned)
125
+ fails "Module#define_method when name is :initialize given an UnboundMethod sets the visibility to private when method is named :initialize"
126
+ fails "Module#define_method when name is :initialize passed a block sets visibility to private when method name is :initialize"
127
+ fails "Module#define_method when name is not a special private name given an UnboundMethod and called from the target module sets the visibility of the method to the current visibility"
128
+ fails "Module#define_method when name is not a special private name given an UnboundMethod sets the visibility of the method to the current visibility"
129
+ fails "Module#define_method when name is not a special private name passed a block and called from the target module sets the visibility of the method to the current visibility"
130
+ fails "Module#extend_object is a private method"
131
+ fails "Module#extend_object is called even when private"
132
+ fails "Module#extended is private in its default implementation"
133
+ fails "Module#included is private in its default implementation"
134
+ fails "Module#instance_methods makes a private Object instance method public in Kernel"
135
+ fails "Module#method_added is a private instance method"
136
+ fails "Module#method_removed is a private instance method"
137
+ fails "Module#method_undefined is a private instance method"
138
+ fails "Module#module_function is a private method"
139
+ fails "Module#module_function with specific method names can make accessible private methods"
140
+ fails "Module#module_function with specific method names makes the instance methods private"
141
+ fails "Module#prepend_features is a private method"
142
+ fails "Module#prepended is a private method"
143
+ fails "Module#private is a private method"
144
+ fails "Module#private makes a public Object instance method private in Kernel"
145
+ fails "Module#private makes a public Object instance method private in a new module"
146
+ fails "Module#private makes the target method uncallable from other types"
147
+ fails "Module#private only makes the method private in the class it is called on" # Expected NameError but no exception was raised (2 was returned)
148
+ fails "Module#private raises a NameError when given an undefined name"
149
+ fails "Module#private returns self"
150
+ fails "Module#private without arguments affects evaled method definitions when itself is outside the eval"
151
+ fails "Module#private without arguments affects normally if itself and following method definitions are inside a eval"
152
+ fails "Module#private without arguments affects normally if itself and method definitions are inside a module_eval"
153
+ fails "Module#private without arguments continues setting visibility if the body encounters other visibility setters with arguments"
154
+ fails "Module#private without arguments does not affect method definitions when itself is inside an eval and method definitions are outside"
155
+ fails "Module#private without arguments does not affect module_evaled method definitions when itself is outside the eval"
156
+ fails "Module#private without arguments sets visibility to following method definitions"
157
+ fails "Module#private without arguments stops setting visibility if the body encounters other visibility setters without arguments"
158
+ fails "Module#private without arguments within a closure sets the visibility outside the closure"
159
+ fails "Module#private_class_method accepts more than one method at a time"
160
+ fails "Module#private_class_method makes a class method private"
161
+ fails "Module#private_class_method makes an existing class method private up the inheritance tree"
162
+ fails "Module#private_class_method makes an existing class method private"
163
+ fails "Module#private_class_method raises a NameError if class method doesn't exist"
164
+ fails "Module#private_class_method raises a NameError when the given name is an instance method"
165
+ fails "Module#private_class_method raises a NameError when the given name is not a method"
166
+ fails "Module#private_constant accepts multiple names"
167
+ fails "Module#private_constant accepts strings as constant names"
168
+ fails "Module#private_constant can only be passed constant names defined in the target (self) module"
169
+ fails "Module#private_constant marked constants NameError by #private_constant has :receiver and :name attributes" # Expected NameError but no exception was raised (true was returned)
170
+ fails "Module#private_constant marked constants NameError by #private_constant has the defined class as the :name attribute" # Expected NameError but no exception was raised (true was returned)
171
+ fails "Module#private_constant marked constants in Object cannot be accessed using ::Const form"
172
+ fails "Module#private_constant marked constants in Object is not defined? using ::Const form"
173
+ fails "Module#private_constant marked constants in a class can be accessed from lexical scope"
174
+ fails "Module#private_constant marked constants in a class can be accessed from the class itself"
175
+ fails "Module#private_constant marked constants in a class cannot be accessed from outside the class"
176
+ fails "Module#private_constant marked constants in a class cannot be reopened as a class"
177
+ fails "Module#private_constant marked constants in a class cannot be reopened as a module"
178
+ fails "Module#private_constant marked constants in a class is defined? from lexical scope"
179
+ fails "Module#private_constant marked constants in a class is not defined? with A::B form"
180
+ fails "Module#private_constant marked constants in a module can be accessed from lexical scope"
181
+ fails "Module#private_constant marked constants in a module can be accessed from the module itself"
182
+ fails "Module#private_constant marked constants in a module cannot be accessed from outside the module"
183
+ fails "Module#private_constant marked constants in a module cannot be reopened as a class from scope where constant would be private" # Expected NameError but no exception was raised (nil was returned)
184
+ fails "Module#private_constant marked constants in a module cannot be reopened as a class"
185
+ fails "Module#private_constant marked constants in a module cannot be reopened as a module from scope where constant would be private" # Exception: Cannot read property '$pretty_inspect' of undefined
186
+ fails "Module#private_constant marked constants in a module cannot be reopened as a module"
187
+ fails "Module#private_constant marked constants in a module is defined? from lexical scope"
188
+ fails "Module#private_constant marked constants in a module is not defined? with A::B form"
189
+ fails "Module#private_constant marked constants remain private even when updated"
190
+ fails "Module#private_instance_methods returns a list of private methods in module and its ancestors"
191
+ fails "Module#private_instance_methods when not passed an argument returns a unique list for a class including a module"
192
+ fails "Module#private_instance_methods when not passed an argument returns a unique list for a subclass"
193
+ fails "Module#private_instance_methods when passed false as a parameter, should return only methods defined in that module"
194
+ fails "Module#private_instance_methods when passed true returns a unique list for a class including a module"
195
+ fails "Module#private_instance_methods when passed true returns a unique list for a subclass"
196
+ fails "Module#private_method_defined? accepts symbols for the method name"
197
+ fails "Module#private_method_defined? calls #to_str to convert an Object"
198
+ fails "Module#private_method_defined? raises a TypeError if passed a Fixnum"
199
+ fails "Module#private_method_defined? raises a TypeError if passed an object that defines #to_sym"
200
+ fails "Module#private_method_defined? raises a TypeError if passed an object that does not defined #to_str"
201
+ fails "Module#private_method_defined? raises a TypeError if passed false"
202
+ fails "Module#private_method_defined? raises a TypeError if passed nil"
203
+ fails "Module#private_method_defined? returns true if the named private method is defined by module or its ancestors"
204
+ fails "Module#protected is a private method"
205
+ fails "Module#protected makes a public Object instance method protected in Kernel"
206
+ fails "Module#protected makes a public Object instance method protected in a new module"
207
+ fails "Module#protected makes an existing class method protected"
208
+ fails "Module#protected raises a NameError when given an undefined name"
209
+ fails "Module#protected returns self"
210
+ fails "Module#protected without arguments affects evaled method definitions when itself is outside the eval"
211
+ fails "Module#protected without arguments affects normally if itself and following method definitions are inside a eval"
212
+ fails "Module#protected without arguments affects normally if itself and method definitions are inside a module_eval"
213
+ fails "Module#protected without arguments continues setting visibility if the body encounters other visibility setters with arguments"
214
+ fails "Module#protected without arguments does not affect method definitions when itself is inside an eval and method definitions are outside"
215
+ fails "Module#protected without arguments does not affect module_evaled method definitions when itself is outside the eval"
216
+ fails "Module#protected without arguments sets visibility to following method definitions"
217
+ fails "Module#protected without arguments stops setting visibility if the body encounters other visibility setters without arguments"
218
+ fails "Module#protected without arguments within a closure sets the visibility outside the closure"
219
+ fails "Module#protected_instance_methods default list should be the same as passing true as an argument"
220
+ fails "Module#protected_instance_methods returns a list of protected methods in module and its ancestors"
221
+ fails "Module#protected_instance_methods when not passed an argument returns a unique list for a class including a module"
222
+ fails "Module#protected_instance_methods when not passed an argument returns a unique list for a subclass"
223
+ fails "Module#protected_instance_methods when passed false as a parameter, should return only methods defined in that module"
224
+ fails "Module#protected_instance_methods when passed true returns a unique list for a class including a module"
225
+ fails "Module#protected_instance_methods when passed true returns a unique list for a subclass"
226
+ fails "Module#protected_method_defined? accepts symbols for the method name"
227
+ fails "Module#protected_method_defined? calls #to_str to convert an Object"
228
+ fails "Module#protected_method_defined? raises a TypeError if passed a Fixnum"
229
+ fails "Module#protected_method_defined? raises a TypeError if passed an object that defines #to_sym"
230
+ fails "Module#protected_method_defined? raises a TypeError if passed an object that does not defined #to_str"
231
+ fails "Module#protected_method_defined? raises a TypeError if passed false"
232
+ fails "Module#protected_method_defined? raises a TypeError if passed nil"
233
+ fails "Module#protected_method_defined? returns true if the named protected method is defined by module or its ancestors"
234
+ fails "Module#public is a private method"
235
+ fails "Module#public makes a private Object instance method public in Kernel"
236
+ fails "Module#public makes a private Object instance method public in a new module"
237
+ fails "Module#public raises a NameError when given an undefined name"
238
+ fails "Module#public returns self"
239
+ fails "Module#public without arguments affects evaled method definitions when itself is outside the eval"
240
+ fails "Module#public without arguments affects normally if itself and following method definitions are inside a eval"
241
+ fails "Module#public without arguments does not affect method definitions when itself is inside an eval and method definitions are outside"
242
+ fails "Module#public without arguments does not affect module_evaled method definitions when itself is outside the eval"
243
+ fails "Module#public without arguments stops setting visibility if the body encounters other visibility setters without arguments"
244
+ fails "Module#public_class_method accepts more than one method at a time"
245
+ fails "Module#public_class_method makes an existing class method public up the inheritance tree"
246
+ fails "Module#public_class_method makes an existing class method public"
247
+ fails "Module#public_class_method raises a NameError if class method doesn't exist"
248
+ fails "Module#public_class_method raises a NameError when the given name is an instance method"
249
+ fails "Module#public_class_method raises a NameError when the given name is not a method"
250
+ fails "Module#public_constant accepts multiple names"
251
+ fails "Module#public_constant accepts strings as constant names"
252
+ fails "Module#public_constant can only be passed constant names defined in the target (self) module"
253
+ fails "Module#public_constant marked constants in a class can be accessed from outside the class"
254
+ fails "Module#public_constant marked constants in a class is defined? with A::B form" # Exception: Opal.TypeError is not a constructor
255
+ fails "Module#public_constant marked constants in a module can be accessed from outside the module"
256
+ fails "Module#public_constant marked constants in a module is defined? with A::B form" # Exception: Opal.TypeError is not a constructor
257
+ fails "Module#public_instance_method is a public method"
258
+ fails "Module#public_instance_method raises a NameError if the method is private"
259
+ fails "Module#public_instance_method raises a NameError when given a protected method name"
260
+ fails "Module#public_instance_method raises a TypeError when given a name is not Symbol or String"
261
+ fails "Module#public_instance_method requires an argument"
262
+ fails "Module#public_instance_method sets the NameError#name attribute to the name of the missing method"
263
+ fails "Module#public_instance_method when given a public method name accepts if the name is a Symbol or String"
264
+ fails "Module#public_instance_method when given a public method name returns an UnboundMethod corresponding to the defined Module"
265
+ fails "Module#public_instance_methods when passed false as a parameter, should return only methods defined in that module"
266
+ fails "Module#public_method_defined? calls #to_str to convert an Object"
267
+ fails "Module#public_method_defined? raises a TypeError if passed a Fixnum"
268
+ fails "Module#public_method_defined? raises a TypeError if passed an object that defines #to_sym"
269
+ fails "Module#public_method_defined? raises a TypeError if passed an object that does not defined #to_str"
270
+ fails "Module#public_method_defined? raises a TypeError if passed false"
271
+ fails "Module#public_method_defined? raises a TypeError if passed nil"
272
+ fails "Module#public_method_defined? returns false if method is not a public method"
273
+ fails "Module#remove_const is a private method"
274
+ fails "Module#remove_method is a private method"
275
+ fails "Module#undef_method is a private method"
276
+ fails "NoMethodError#message for an protected method match /protected method/"
277
+ fails "NoMethodError#message for private method match /private method/"
278
+ fails "OpenStruct#initialize is private"
279
+ fails "OpenStruct#new_ostruct_member is protected"
280
+ fails "OpenStruct#table is protected"
281
+ fails "Rational#marshal_dump is a private method"
282
+ fails "Redefining a singleton method does not inherit a previously set visibility"
283
+ fails "Regexp#initialize is a private method"
284
+ fails "Set#flatten_merge is protected"
285
+ fails "String#+@ returns mutable copy despite freeze-magic-comment in file" # NoMethodError: undefined method `tmp' for #<Object:0x3bdc>
286
+ fails "StringScanner#initialize is a private method"
287
+ end