opal 1.0.4 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (399) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +13 -12
  3. data/.gitattributes +1 -1
  4. data/.github/workflows/build.yml +23 -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 +138 -1
  10. data/Gemfile +1 -2
  11. data/HACKING.md +2 -9
  12. data/LICENSE +1 -1
  13. data/README.md +21 -18
  14. data/UNRELEASED.md +4 -2
  15. data/benchmark-ips/bm_array_pop_1.rb +8 -0
  16. data/benchmark-ips/bm_array_shift.rb +7 -0
  17. data/benchmark-ips/bm_js_symbols_vs_strings.rb +7 -2
  18. data/benchmark-ips/class_shovel_vs_singleton_class.rb +16 -0
  19. data/bin/build-browser-source-map-support +4 -0
  20. data/bin/format-filters +54 -0
  21. data/bin/remove-filters +39 -0
  22. data/docs/roda-sprockets.md +86 -0
  23. data/docs/sinatra.md +5 -12
  24. data/examples/rack/Gemfile +1 -0
  25. data/examples/rack/app/application.rb +3 -0
  26. data/examples/rack/config.ru +5 -4
  27. data/exe/opal-repl +2 -83
  28. data/lib/opal/ast/builder.rb +1 -1
  29. data/lib/opal/builder.rb +2 -10
  30. data/lib/opal/builder_processors.rb +1 -1
  31. data/lib/opal/cli.rb +4 -1
  32. data/lib/opal/cli_options.rb +10 -3
  33. data/lib/opal/cli_runners.rb +27 -37
  34. data/lib/opal/cli_runners/applescript.rb +5 -44
  35. data/lib/opal/cli_runners/chrome.js +7 -35
  36. data/lib/opal/cli_runners/chrome.rb +75 -17
  37. data/lib/opal/cli_runners/compiler.rb +17 -0
  38. data/lib/opal/cli_runners/nashorn.rb +9 -43
  39. data/lib/opal/cli_runners/nodejs.rb +18 -47
  40. data/lib/opal/cli_runners/server.rb +18 -6
  41. data/lib/opal/cli_runners/source-map-support-browser.js +6449 -0
  42. data/lib/opal/cli_runners/source-map-support-node.js +3704 -0
  43. data/lib/opal/cli_runners/source-map-support.js +639 -0
  44. data/lib/opal/cli_runners/system_runner.rb +45 -0
  45. data/lib/opal/compiler.rb +57 -29
  46. data/lib/opal/config.rb +0 -5
  47. data/lib/opal/erb.rb +1 -1
  48. data/lib/opal/magic_comments.rb +34 -0
  49. data/lib/opal/nodes/args/arity_check.rb +2 -1
  50. data/lib/opal/nodes/base.rb +1 -1
  51. data/lib/opal/nodes/call.rb +1 -4
  52. data/lib/opal/nodes/def.rb +2 -0
  53. data/lib/opal/nodes/iter.rb +1 -1
  54. data/lib/opal/nodes/literal.rb +19 -14
  55. data/lib/opal/nodes/logic.rb +5 -80
  56. data/lib/opal/nodes/masgn.rb +2 -0
  57. data/lib/opal/nodes/rescue.rb +1 -1
  58. data/lib/opal/nodes/super.rb +24 -10
  59. data/lib/opal/nodes/top.rb +5 -4
  60. data/lib/opal/parser/with_c_lexer.rb +2 -1
  61. data/lib/opal/parser/with_ruby_lexer.rb +1 -1
  62. data/lib/opal/path_reader.rb +2 -2
  63. data/lib/opal/paths.rb +8 -5
  64. data/lib/opal/repl.rb +103 -0
  65. data/lib/opal/rewriter.rb +4 -0
  66. data/lib/opal/rewriters/for_rewriter.rb +1 -1
  67. data/lib/opal/rewriters/js_reserved_words.rb +7 -7
  68. data/lib/opal/rewriters/numblocks.rb +31 -0
  69. data/lib/opal/rewriters/returnable_logic.rb +33 -0
  70. data/lib/opal/version.rb +1 -1
  71. data/opal.gemspec +26 -26
  72. data/opal/corelib/array.rb +160 -118
  73. data/opal/corelib/array/pack.rb +5 -3
  74. data/opal/corelib/basic_object.rb +4 -4
  75. data/opal/corelib/class.rb +2 -1
  76. data/opal/corelib/comparable.rb +49 -31
  77. data/opal/corelib/constants.rb +5 -5
  78. data/opal/corelib/enumerable.rb +108 -46
  79. data/opal/corelib/enumerator.rb +27 -12
  80. data/opal/corelib/file.rb +3 -1
  81. data/opal/corelib/hash.rb +6 -1
  82. data/opal/corelib/helpers.rb +8 -28
  83. data/opal/corelib/io.rb +12 -7
  84. data/opal/corelib/kernel.rb +45 -14
  85. data/opal/corelib/kernel/format.rb +3 -1
  86. data/opal/corelib/math.rb +8 -6
  87. data/opal/corelib/method.rb +8 -0
  88. data/opal/corelib/module.rb +17 -2
  89. data/opal/corelib/number.rb +3 -12
  90. data/opal/corelib/proc.rb +16 -0
  91. data/opal/corelib/random/mersenne_twister.rb +147 -0
  92. data/opal/corelib/range.rb +3 -13
  93. data/opal/corelib/regexp.rb +10 -6
  94. data/opal/corelib/runtime.js +208 -81
  95. data/opal/corelib/string.rb +55 -49
  96. data/opal/corelib/string/encoding.rb +109 -32
  97. data/opal/corelib/string/unpack.rb +2 -17
  98. data/opal/corelib/struct.rb +14 -1
  99. data/opal/corelib/time.rb +4 -0
  100. data/opal/opal.rb +1 -1
  101. data/opal/opal/mini.rb +1 -1
  102. data/package.json +2 -1
  103. data/spec/README.md +10 -0
  104. data/spec/filters/bugs/array.rb +76 -0
  105. data/spec/filters/bugs/base64.rb +10 -0
  106. data/spec/filters/bugs/basicobject.rb +12 -0
  107. data/spec/filters/bugs/bigdecimal.rb +248 -0
  108. data/spec/filters/bugs/class.rb +12 -0
  109. data/spec/filters/bugs/complex.rb +7 -0
  110. data/spec/filters/bugs/date.rb +104 -0
  111. data/spec/filters/bugs/encoding.rb +259 -0
  112. data/spec/filters/bugs/enumerable.rb +26 -0
  113. data/spec/filters/bugs/enumerator.rb +48 -0
  114. data/spec/filters/bugs/exception.rb +120 -0
  115. data/spec/filters/bugs/file.rb +48 -0
  116. data/spec/filters/bugs/float.rb +74 -0
  117. data/spec/filters/bugs/hash.rb +60 -0
  118. data/spec/filters/bugs/integer.rb +78 -0
  119. data/spec/filters/bugs/io.rb +9 -0
  120. data/spec/filters/bugs/kernel.rb +401 -0
  121. data/spec/filters/bugs/language.rb +451 -0
  122. data/spec/filters/bugs/marshal.rb +50 -0
  123. data/spec/filters/bugs/math.rb +4 -0
  124. data/spec/filters/bugs/method.rb +79 -0
  125. data/spec/filters/bugs/module.rb +281 -0
  126. data/spec/filters/bugs/nilclass.rb +4 -0
  127. data/spec/filters/bugs/numeric.rb +27 -0
  128. data/spec/filters/bugs/openstruct.rb +8 -0
  129. data/spec/filters/bugs/pack_unpack.rb +138 -0
  130. data/spec/filters/bugs/pathname.rb +9 -0
  131. data/spec/filters/bugs/proc.rb +80 -0
  132. data/spec/filters/bugs/random.rb +20 -0
  133. data/spec/filters/bugs/range.rb +139 -0
  134. data/spec/filters/bugs/rational.rb +12 -0
  135. data/spec/filters/bugs/regexp.rb +91 -0
  136. data/spec/filters/bugs/set.rb +51 -0
  137. data/spec/filters/bugs/singleton.rb +7 -0
  138. data/spec/filters/bugs/string.rb +341 -0
  139. data/spec/filters/bugs/stringscanner.rb +78 -0
  140. data/spec/filters/bugs/struct.rb +26 -0
  141. data/spec/filters/bugs/symbol.rb +7 -0
  142. data/spec/filters/bugs/time.rb +109 -0
  143. data/spec/filters/bugs/unboundmethod.rb +33 -0
  144. data/spec/filters/bugs/warnings.rb +30 -0
  145. data/spec/filters/unsupported/array.rb +168 -0
  146. data/spec/filters/unsupported/basicobject.rb +15 -0
  147. data/spec/filters/unsupported/bignum.rb +55 -0
  148. data/spec/filters/unsupported/class.rb +5 -0
  149. data/spec/filters/unsupported/delegator.rb +6 -0
  150. data/spec/filters/unsupported/enumerable.rb +12 -0
  151. data/spec/filters/unsupported/enumerator.rb +14 -0
  152. data/spec/filters/unsupported/file.rb +4 -0
  153. data/spec/filters/unsupported/fixnum.rb +15 -0
  154. data/spec/filters/unsupported/float.rb +47 -0
  155. data/spec/filters/unsupported/freeze.rb +259 -0
  156. data/spec/filters/unsupported/hash.rb +44 -0
  157. data/spec/filters/unsupported/integer.rb +101 -0
  158. data/spec/filters/unsupported/kernel.rb +35 -0
  159. data/spec/filters/unsupported/language.rb +25 -0
  160. data/spec/filters/unsupported/marshal.rb +44 -0
  161. data/spec/filters/unsupported/matchdata.rb +63 -0
  162. data/spec/filters/unsupported/math.rb +4 -0
  163. data/spec/filters/unsupported/pathname.rb +4 -0
  164. data/spec/filters/unsupported/privacy.rb +287 -0
  165. data/spec/filters/unsupported/proc.rb +4 -0
  166. data/spec/filters/unsupported/random.rb +5 -0
  167. data/spec/filters/unsupported/range.rb +8 -0
  168. data/spec/filters/unsupported/regexp.rb +70 -0
  169. data/spec/filters/unsupported/set.rb +5 -0
  170. data/spec/filters/unsupported/singleton.rb +7 -0
  171. data/spec/filters/unsupported/string.rb +687 -0
  172. data/spec/filters/unsupported/struct.rb +7 -0
  173. data/spec/filters/unsupported/symbol.rb +21 -0
  174. data/spec/filters/unsupported/taint.rb +162 -0
  175. data/spec/filters/unsupported/thread.rb +10 -0
  176. data/spec/filters/unsupported/time.rb +204 -0
  177. data/spec/filters/unsupported/usage_of_files.rb +262 -0
  178. data/spec/lib/builder_processors_spec.rb +44 -0
  179. data/spec/lib/builder_spec.rb +133 -0
  180. data/spec/lib/cli_runners/server_spec.rb +25 -0
  181. data/spec/lib/cli_runners_spec.rb +16 -0
  182. data/spec/lib/cli_spec.rb +256 -0
  183. data/spec/lib/compiler_spec.rb +693 -0
  184. data/spec/lib/config_spec.rb +112 -0
  185. data/spec/lib/dependency_resolver_spec.rb +43 -0
  186. data/spec/lib/deprecations_spec.rb +17 -0
  187. data/spec/lib/fixtures/complex_sprockets.js.rb.erb +4 -0
  188. data/spec/lib/fixtures/file_with_directives.js +2 -0
  189. data/spec/lib/fixtures/jst_file.js.jst +1 -0
  190. data/spec/lib/fixtures/no_requires.rb +1 -0
  191. data/spec/lib/fixtures/opal_file.rb +2 -0
  192. data/spec/lib/fixtures/require_tree_test.rb +3 -0
  193. data/spec/lib/fixtures/required_file.js +1 -0
  194. data/spec/lib/fixtures/required_tree_test/required_file1.rb +1 -0
  195. data/spec/lib/fixtures/required_tree_test/required_file2.rb +1 -0
  196. data/spec/lib/fixtures/requires.rb +7 -0
  197. data/spec/lib/fixtures/source_location_test.rb +7 -0
  198. data/spec/lib/fixtures/source_map.rb +1 -0
  199. data/spec/lib/fixtures/source_map/subfolder/other_file.rb +1 -0
  200. data/spec/lib/fixtures/sprockets_file.js.rb +3 -0
  201. data/spec/lib/fixtures/sprockets_require_tree_test.rb +3 -0
  202. data/spec/lib/path_reader_spec.rb +47 -0
  203. data/spec/lib/paths_spec.rb +18 -0
  204. data/spec/lib/repl_spec.rb +28 -0
  205. data/spec/lib/rewriters/base_spec.rb +68 -0
  206. data/spec/lib/rewriters/binary_operator_assignment_spec.rb +153 -0
  207. data/spec/lib/rewriters/block_to_iter_spec.rb +28 -0
  208. data/spec/lib/rewriters/dot_js_syntax_spec.rb +108 -0
  209. data/spec/lib/rewriters/explicit_writer_return_spec.rb +186 -0
  210. data/spec/lib/rewriters/for_rewriter_spec.rb +92 -0
  211. data/spec/lib/rewriters/hashes/key_duplicates_rewriter_spec.rb +47 -0
  212. data/spec/lib/rewriters/js_reserved_words_spec.rb +119 -0
  213. data/spec/lib/rewriters/logical_operator_assignment_spec.rb +202 -0
  214. data/spec/lib/rewriters/opal_engine_check_spec.rb +84 -0
  215. data/spec/lib/rewriters/returnable_logic_spec.rb +52 -0
  216. data/spec/lib/rewriters/rubyspec/filters_rewriter_spec.rb +59 -0
  217. data/spec/lib/simple_server_spec.rb +56 -0
  218. data/spec/lib/source_map/file_spec.rb +67 -0
  219. data/spec/lib/source_map/index_spec.rb +80 -0
  220. data/spec/lib/spec_helper.rb +105 -0
  221. data/spec/mspec-opal/formatters.rb +197 -0
  222. data/spec/mspec-opal/runner.rb +172 -0
  223. data/spec/opal/compiler/irb_spec.rb +44 -0
  224. data/spec/opal/compiler/unicode_spec.rb +10 -0
  225. data/spec/opal/core/array/dup_spec.rb +23 -0
  226. data/spec/opal/core/array/intersection_spec.rb +38 -0
  227. data/spec/opal/core/array/minus_spec.rb +38 -0
  228. data/spec/opal/core/array/union_spec.rb +38 -0
  229. data/spec/opal/core/array/uniq_spec.rb +49 -0
  230. data/spec/opal/core/class/inherited_spec.rb +18 -0
  231. data/spec/opal/core/enumerable/all_break_spec.rb +5 -0
  232. data/spec/opal/core/enumerable/any_break_spec.rb +5 -0
  233. data/spec/opal/core/enumerable/collect_break_spec.rb +13 -0
  234. data/spec/opal/core/enumerable/count_break_spec.rb +5 -0
  235. data/spec/opal/core/enumerable/detect_break_spec.rb +5 -0
  236. data/spec/opal/core/enumerable/drop_while_break_spec.rb +5 -0
  237. data/spec/opal/core/enumerable/each_slice_break_spec.rb +6 -0
  238. data/spec/opal/core/enumerable/each_with_index_break_spec.rb +5 -0
  239. data/spec/opal/core/enumerable/each_with_object_break_spec.rb +5 -0
  240. data/spec/opal/core/enumerable/find_all_break_spec.rb +5 -0
  241. data/spec/opal/core/enumerable/find_index_break_spec.rb +5 -0
  242. data/spec/opal/core/enumerable/grep_break_spec.rb +5 -0
  243. data/spec/opal/core/enumerable/max_break_spec.rb +5 -0
  244. data/spec/opal/core/enumerable/max_by_break_spec.rb +5 -0
  245. data/spec/opal/core/enumerable/min_break_spec.rb +5 -0
  246. data/spec/opal/core/enumerable/min_by_break_spec.rb +5 -0
  247. data/spec/opal/core/enumerable/none_break_spec.rb +5 -0
  248. data/spec/opal/core/enumerable/one_break_spec.rb +5 -0
  249. data/spec/opal/core/enumerable/reduce_break_spec.rb +5 -0
  250. data/spec/opal/core/enumerable/take_while_break_spec.rb +5 -0
  251. data/spec/opal/core/enumerator/with_index_spec.rb +6 -0
  252. data/spec/opal/core/exception_spec.rb +8 -0
  253. data/spec/opal/core/fixtures/require_tree_files/file 1.rb +1 -0
  254. data/spec/opal/core/fixtures/require_tree_files/file 2.rb +1 -0
  255. data/spec/opal/core/fixtures/require_tree_files/file 3.rb +1 -0
  256. data/spec/opal/core/fixtures/require_tree_files/file 4.rb +1 -0
  257. data/spec/opal/core/fixtures/require_tree_files/file 5.rb +1 -0
  258. data/spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb +1 -0
  259. data/spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb +1 -0
  260. data/spec/opal/core/fixtures/require_tree_files/other/other 1.rb +1 -0
  261. data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
  262. data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
  263. data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
  264. data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
  265. data/spec/opal/core/hash/internals_spec.rb +339 -0
  266. data/spec/opal/core/helpers_spec.rb +14 -0
  267. data/spec/opal/core/iterable_props_spec.rb +53 -0
  268. data/spec/opal/core/kernel/at_exit_spec.rb +70 -0
  269. data/spec/opal/core/kernel/freeze_spec.rb +15 -0
  270. data/spec/opal/core/kernel/instance_variables_spec.rb +110 -0
  271. data/spec/opal/core/kernel/methods_spec.rb +25 -0
  272. data/spec/opal/core/kernel/public_methods_spec.rb +25 -0
  273. data/spec/opal/core/kernel/require_tree_spec.rb +18 -0
  274. data/spec/opal/core/kernel/respond_to_spec.rb +15 -0
  275. data/spec/opal/core/language/DATA/characters_support_spec.rb +9 -0
  276. data/spec/opal/core/language/DATA/empty___END___spec.rb +7 -0
  277. data/spec/opal/core/language/DATA/multiple___END___spec.rb +10 -0
  278. data/spec/opal/core/language/arguments/mlhs_arg_spec.rb +18 -0
  279. data/spec/opal/core/language/keyword_arguments_spec.rb +9 -0
  280. data/spec/opal/core/language/numblocks_spec.rb +16 -0
  281. data/spec/opal/core/language/safe_navigator_spec.rb +7 -0
  282. data/spec/opal/core/language/while_spec.rb +31 -0
  283. data/spec/opal/core/language_spec.rb +29 -0
  284. data/spec/opal/core/marshal/dump_spec.rb +81 -0
  285. data/spec/opal/core/marshal/load_spec.rb +13 -0
  286. data/spec/opal/core/module_spec.rb +27 -0
  287. data/spec/opal/core/object_id_spec.rb +56 -0
  288. data/spec/opal/core/regexp/interpolation_spec.rb +40 -0
  289. data/spec/opal/core/regexp/match_spec.rb +78 -0
  290. data/spec/opal/core/runtime/bridged_classes_spec.rb +123 -0
  291. data/spec/opal/core/runtime/constants_spec.rb +16 -0
  292. data/spec/opal/core/runtime/eval_spec.rb +5 -0
  293. data/spec/opal/core/runtime/exit_spec.rb +29 -0
  294. data/spec/opal/core/runtime/is_a_spec.rb +48 -0
  295. data/spec/opal/core/runtime/loaded_spec.rb +20 -0
  296. data/spec/opal/core/runtime/main_methods_spec.rb +39 -0
  297. data/spec/opal/core/runtime/method_missing_spec.rb +68 -0
  298. data/spec/opal/core/runtime/rescue_spec.rb +37 -0
  299. data/spec/opal/core/runtime/string_spec.rb +25 -0
  300. data/spec/opal/core/runtime/truthy_spec.rb +61 -0
  301. data/spec/opal/core/runtime_spec.rb +58 -0
  302. data/spec/opal/core/string/each_byte_spec.rb +19 -0
  303. data/spec/opal/core/string/gsub_spec.rb +35 -0
  304. data/spec/opal/core/string/to_sym_spec.rb +9 -0
  305. data/spec/opal/core/string_spec.rb +28 -0
  306. data/spec/opal/core/struct/dup_spec.rb +11 -0
  307. data/spec/opal/core/time_spec.rb +68 -0
  308. data/spec/opal/stdlib/erb/erb_spec.rb +30 -0
  309. data/spec/opal/stdlib/erb/inline_block.opalerb +3 -0
  310. data/spec/opal/stdlib/erb/quoted.opalerb +1 -0
  311. data/spec/opal/stdlib/erb/simple.opalerb +1 -0
  312. data/spec/opal/stdlib/js_spec.rb +72 -0
  313. data/spec/opal/stdlib/json/ext_spec.rb +55 -0
  314. data/spec/opal/stdlib/json/parse_spec.rb +37 -0
  315. data/spec/opal/stdlib/logger/logger_spec.rb +308 -0
  316. data/spec/opal/stdlib/native/alias_native_spec.rb +27 -0
  317. data/spec/opal/stdlib/native/array_spec.rb +11 -0
  318. data/spec/opal/stdlib/native/date_spec.rb +12 -0
  319. data/spec/opal/stdlib/native/deprecated_include_spec.rb +8 -0
  320. data/spec/opal/stdlib/native/each_spec.rb +13 -0
  321. data/spec/opal/stdlib/native/element_reference_spec.rb +16 -0
  322. data/spec/opal/stdlib/native/exposure_spec.rb +33 -0
  323. data/spec/opal/stdlib/native/ext_spec.rb +19 -0
  324. data/spec/opal/stdlib/native/hash_spec.rb +67 -0
  325. data/spec/opal/stdlib/native/initialize_spec.rb +17 -0
  326. data/spec/opal/stdlib/native/method_missing_spec.rb +51 -0
  327. data/spec/opal/stdlib/native/native_alias_spec.rb +26 -0
  328. data/spec/opal/stdlib/native/native_class_spec.rb +18 -0
  329. data/spec/opal/stdlib/native/native_module_spec.rb +13 -0
  330. data/spec/opal/stdlib/native/native_reader_spec.rb +22 -0
  331. data/spec/opal/stdlib/native/native_writer_spec.rb +30 -0
  332. data/spec/opal/stdlib/native/new_spec.rb +92 -0
  333. data/spec/opal/stdlib/native/struct_spec.rb +12 -0
  334. data/spec/opal/stdlib/pp_spec.rb +5 -0
  335. data/spec/opal/stdlib/promise/always_spec.rb +49 -0
  336. data/spec/opal/stdlib/promise/error_spec.rb +15 -0
  337. data/spec/opal/stdlib/promise/rescue_spec.rb +53 -0
  338. data/spec/opal/stdlib/promise/then_spec.rb +79 -0
  339. data/spec/opal/stdlib/promise/trace_spec.rb +51 -0
  340. data/spec/opal/stdlib/promise/value_spec.rb +15 -0
  341. data/spec/opal/stdlib/promise/when_spec.rb +34 -0
  342. data/spec/opal/stdlib/source_map_spec.rb +8 -0
  343. data/spec/opal/stdlib/strscan/scan_spec.rb +11 -0
  344. data/spec/opal/stdlib/template/paths_spec.rb +10 -0
  345. data/spec/opal/stdlib/thread/mutex_spec.rb +40 -0
  346. data/spec/opal/stdlib/thread/thread_queue_spec.rb +32 -0
  347. data/spec/opal/stdlib/thread/thread_spec.rb +60 -0
  348. data/spec/ruby_specs +183 -0
  349. data/spec/spec_helper.rb +31 -0
  350. data/spec/support/guard_platform.rb +4 -0
  351. data/spec/support/match_helpers.rb +57 -0
  352. data/spec/support/mspec_rspec_adapter.rb +33 -0
  353. data/spec/support/rewriters_helper.rb +54 -0
  354. data/spec/support/source_map_helper.rb +190 -0
  355. data/stdlib/base64.rb +2 -2
  356. data/stdlib/bigdecimal.rb +15 -3
  357. data/stdlib/bigdecimal/bignumber.js.rb +1 -1
  358. data/stdlib/bigdecimal/util.rb +148 -0
  359. data/stdlib/delegate.rb +8 -0
  360. data/stdlib/nodejs/fileutils.rb +1 -1
  361. data/stdlib/nodejs/kernel.rb +0 -13
  362. data/stdlib/nodejs/stacktrace.rb +4 -179
  363. data/stdlib/ostruct.rb +5 -0
  364. data/stdlib/pp.rb +586 -19
  365. data/stdlib/prettyprint.rb +556 -0
  366. data/stdlib/rbconfig/sizeof.rb +2 -0
  367. data/stdlib/securerandom.rb +32 -0
  368. data/stdlib/set.rb +36 -0
  369. data/stdlib/strscan.rb +15 -0
  370. data/tasks/benchmarking.rake +1 -1
  371. data/tasks/releasing.rake +0 -3
  372. data/tasks/testing.rake +16 -11
  373. data/tasks/testing/mspec_special_calls.rb +1 -19
  374. data/test/nodejs/fixtures/cat.png +0 -0
  375. data/test/nodejs/fixtures/hello.rb +1 -0
  376. data/test/nodejs/fixtures/iso88591.txt +1 -0
  377. data/test/nodejs/fixtures/utf8.txt +1 -0
  378. data/test/nodejs/fixtures/win1258.txt +1 -0
  379. data/test/nodejs/test_dir.rb +39 -0
  380. data/test/nodejs/test_env.rb +62 -0
  381. data/test/nodejs/test_error.rb +29 -0
  382. data/test/nodejs/test_file.rb +206 -0
  383. data/test/nodejs/test_file_encoding.rb +20 -0
  384. data/test/nodejs/test_io.rb +18 -0
  385. data/test/nodejs/test_opal_builder.rb +12 -0
  386. data/test/nodejs/test_pathname.rb +16 -0
  387. data/test/opal/cat.png +0 -0
  388. data/test/opal/http_server.rb +52 -0
  389. data/test/opal/test_base64.rb +115 -0
  390. data/test/opal/test_keyword.rb +590 -0
  391. data/test/opal/test_matrix.rb +661 -0
  392. data/test/opal/test_openuri.rb +53 -0
  393. data/test/opal/unsupported_and_bugs.rb +39 -0
  394. data/yarn.lock +1114 -3
  395. metadata +893 -33
  396. data/lib/opal/nodes/runtime_helpers.rb +0 -51
  397. data/opal/corelib/random/MersenneTwister.js +0 -137
  398. data/opal/corelib/random/mersenne_twister.js.rb +0 -13
  399. data/stdlib/bigdecimal/kernel.rb +0 -5
@@ -0,0 +1,4 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "Math" do
3
+ fails "Math.log2 returns the natural logarithm of the argument" # Expected Infinity to equal 10001
4
+ end
@@ -0,0 +1,79 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "Method" do
3
+ fails "Method#<< does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `<<' for #<Method: MethodSpecs::Composition#upcase (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:192)>)
4
+ fails "Method#<< raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `<<' for #<Method: MethodSpecs::Composition#upcase (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:192)>)
5
+ fails "Method#== missing methods returns true for the same method missing"
6
+ fails "Method#== returns true if a method was defined using the other one"
7
+ fails "Method#== returns true if methods are the same"
8
+ fails "Method#== returns true if the two core methods are aliases"
9
+ fails "Method#== returns true on aliased methods"
10
+ fails "Method#=== for a Method generated by respond_to_missing? does not call the original method name even if it now exists" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
11
+ fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing dynamically" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
12
+ fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
13
+ fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods'
14
+ fails "Method#=== invokes the method with the specified arguments, returning the method's return value" # Expected false to equal 15
15
+ fails "Method#=== raises an ArgumentError when given incorrect number of arguments" # Expected ArgumentError but no exception was raised (false was returned)
16
+ fails "Method#>> composition is a lambda" # NoMethodError: undefined method `>>' for #<Method: MethodSpecs::Composition#pow_2 (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:200)>
17
+ fails "Method#>> does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `>>' for #<Method: MethodSpecs::Composition#upcase (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:192)>)
18
+ fails "Method#>> raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `>>' for #<Method: MethodSpecs::Composition#upcase (defined in MethodSpecs::Composition in ruby/core/method/fixtures/classes.rb:192)>)
19
+ fails "Method#[] for a Method generated by respond_to_missing? does not call the original method name even if it now exists"
20
+ fails "Method#[] for a Method generated by respond_to_missing? invokes method_missing dynamically"
21
+ fails "Method#[] for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments"
22
+ fails "Method#[] for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result"
23
+ fails "Method#arity for a Method generated by respond_to_missing? returns -1"
24
+ fails "Method#call for a Method generated by respond_to_missing? does not call the original method name even if it now exists"
25
+ fails "Method#call for a Method generated by respond_to_missing? invokes method_missing dynamically"
26
+ fails "Method#call for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments"
27
+ fails "Method#call for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result"
28
+ fails "Method#clone returns a copy of the method"
29
+ fails "Method#curry returns a curried proc"
30
+ fails "Method#curry with optional arity argument raises ArgumentError when the method requires less arguments than the given arity"
31
+ fails "Method#curry with optional arity argument raises ArgumentError when the method requires more arguments than the given arity"
32
+ fails "Method#curry with optional arity argument returns a curried proc when given correct arity"
33
+ fails "Method#define_method when passed a Proc object and a method is defined inside defines the nested method in the default definee where the Proc was created" # Expected #<#<Class:0x3753c>:0x37538> NOT to have method 'nested_method_in_proc_for_define_method' but it does
34
+ fails "Method#define_method when passed an UnboundMethod object defines a method with the same #arity as the original"
35
+ fails "Method#define_method when passed an UnboundMethod object defines a method with the same #parameters as the original"
36
+ fails "Method#eql? missing methods returns true for the same method missing"
37
+ fails "Method#eql? returns true if a method was defined using the other one"
38
+ fails "Method#eql? returns true if methods are the same"
39
+ fails "Method#eql? returns true if the two core methods are aliases"
40
+ fails "Method#eql? returns true on aliased methods"
41
+ fails "Method#hash returns the same value for builtin methods that are eql?"
42
+ fails "Method#hash returns the same value for user methods that are eql?"
43
+ fails "Method#inspect returns a String containing method arguments" # Expected "#<Method: MethodSpecs::Methods#zero (defined in MethodSpecs::Methods in ruby/core/method/fixtures/classes.rb:49)>".include? "()" to be truthy but was false
44
+ fails "Method#inspect returns a String containing the Module containing the method if object has a singleton class but method is not defined in the singleton class" # Expected "#<Method: MethodSpecs::MySub#bar (defined in MethodSpecs::MyMod in ruby/core/method/fixtures/classes.rb:99)>".start_with? "#<Method: MethodSpecs::MySub(MethodSpecs::MyMod)#bar" to be truthy but was false
45
+ fails "Method#inspect returns a String containing the singleton class if method is defined in the singleton class" # Expected "#<Method: MethodSpecs::MySub#bar (defined in #<Class:#<MethodSpecs::MySub:0x7e4a>> in ruby/core/method/shared/to_s.rb:70)>".start_with? "#<Method: #<MethodSpecs::MySub:0xXXXXXX>.bar" to be truthy but was false
46
+ fails "Method#inspect returns a String including all details" # Expected "#<Method: MethodSpecs::MySub#bar (defined in MethodSpecs::MyMod in ruby/core/method/fixtures/classes.rb:99)>".start_with? "#<Method: MethodSpecs::MySub(MethodSpecs::MyMod)#bar" to be truthy but was false
47
+ fails "Method#inspect shows the metaclass and the owner for a Module instance method retrieved from a class" # Expected "#<Method: Class#include (defined in Module in <internal:corelib/module.rb>:407)>".start_with? "#<Method: #<Class:String>(Module)#include" to be truthy but was false
48
+ fails "Method#name for a Method generated by respond_to_missing? returns the name passed to respond_to_missing?"
49
+ fails "Method#original_name returns the name of the method" # NoMethodError: undefined method `original_name' for #<Method: String#upcase (defined in String in corelib/string.rb:1672)>
50
+ fails "Method#original_name returns the original name even when aliased twice" # NoMethodError: undefined method `original_name' for #<Method: MethodSpecs::Methods#foo (defined in MethodSpecs::Methods in ruby/core/method/fixtures/classes.rb:24)>
51
+ fails "Method#original_name returns the original name when aliased" # NoMethodError: undefined method `original_name' for #<Method: MethodSpecs::Methods#foo (defined in MethodSpecs::Methods in ruby/core/method/fixtures/classes.rb:24)>
52
+ fails "Method#owner for a Method generated by respond_to_missing? returns the owner of the method"
53
+ fails "Method#parameters returns [[:req]] for each parameter for core methods with fixed-length argument lists" # Expected [["req", "other"]] to equal [["req"]]
54
+ fails "Method#parameters returns [[:rest]] for a Method generated by respond_to_missing?"
55
+ fails "Method#parameters returns [[:rest]] for core methods with variable-length argument lists" # NameError: undefined method `delete!' for class `String'
56
+ fails "Method#parameters returns [[:rest]] or [[:opt]] for core methods with optional arguments" # Expected [[["rest"]], [["opt"]]] to include [["opt", "count"]]
57
+ fails "Method#receiver for a Method generated by respond_to_missing? returns the receiver of the method"
58
+ fails "Method#source_location for a Method generated by respond_to_missing? returns nil"
59
+ fails "Method#source_location sets the first value to the path of the file in which the method was defined" # Expected "ruby/core/method/fixtures/classes.rb" to equal "./ruby/core/method/fixtures/classes.rb"
60
+ fails "Method#source_location works for methods defined with a block"
61
+ fails "Method#source_location works for methods defined with an UnboundMethod"
62
+ fails "Method#super_method returns nil when the parent's method is removed"
63
+ fails "Method#super_method returns nil when there's no super method in the parent"
64
+ fails "Method#super_method returns the method that would be called by super in the method"
65
+ fails "Method#to_proc returns a proc that can be used by define_method"
66
+ fails "Method#to_proc returns a proc that can receive a block"
67
+ fails "Method#to_proc returns a proc whose binding has the same receiver as the method" # NoMethodError: undefined method `receiver' for nil
68
+ fails "Method#to_s does not show the defining module if it is the same as the receiver class" # Expected "#<Method:0x80d6>".start_with? "#<Method: MethodSpecs::A#baz" to be truthy but was false
69
+ fails "Method#to_s returns a String containing method arguments" # Expected "#<Method:0x6cc4a>".include? "()" to be truthy but was false
70
+ fails "Method#to_s returns a String containing the Module containing the method if object has a singleton class but method is not defined in the singleton class" # Expected "#<Method:0x6cc94>".start_with? "#<Method: MethodSpecs::MySub(MethodSpecs::MyMod)#bar" to be truthy but was false
71
+ fails "Method#to_s returns a String containing the Module the method is defined in"
72
+ fails "Method#to_s returns a String containing the Module the method is referenced from"
73
+ fails "Method#to_s returns a String containing the method name"
74
+ fails "Method#to_s returns a String containing the singleton class if method is defined in the singleton class" # Expected "#<Method:0x805e>".start_with? "#<Method: #<MethodSpecs::MySub:0xXXXXXX>.bar" to be truthy but was false
75
+ fails "Method#to_s returns a String including all details" # Expected "#<Method:0x80a4>".start_with? "#<Method: MethodSpecs::MySub(MethodSpecs::MyMod)#bar" to be truthy but was false
76
+ fails "Method#to_s shows the metaclass and the owner for a Module instance method retrieved from a class" # Expected "#<Method: Class#include (defined in Module in <internal:corelib/module.rb>:407)>".start_with? "#<Method: #<Class:String>(Module)#include" to be truthy but was false
77
+ fails "Method#unbind keeps the origin singleton class if there is one" # Expected "#<UnboundMethod: Object#foo (defined in #<Class:#<Object:0x39c20>> in ruby/core/method/unbind_spec.rb:37)>".start_with? "#<UnboundMethod: #<Class:#<Object:0x39c20>>#foo" to be truthy but was false
78
+ fails "Method#unbind rebinding UnboundMethod to Method's obj produces exactly equivalent Methods"
79
+ end
@@ -0,0 +1,281 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "Module" do
3
+ fails "Module#alias_method creates methods that are == to each other" # Expected #<Method: #<Class:0x9122>#uno (defined in #<Class:0x9122> in ruby/core/module/fixtures/classes.rb:206)> == #<Method: #<Class:0x9122>#public_one (defined in ModuleSpecs::Aliasing in ruby/core/module/fixtures/classes.rb:206)> to be truthy but was false
4
+ fails "Module#alias_method creates methods that are == to eachother" # Expected #<Method: #<Class:0x3ee54>#uno (defined in #<Class:0x3ee54> in ruby/core/module/fixtures/classes.rb:203)> to equal #<Method: #<Class:0x3ee54>#public_one (defined in ModuleSpecs::Aliasing in ruby/core/module/fixtures/classes.rb:203)>
5
+ fails "Module#alias_method handles aliasing a method only present in a refinement" # NoMethodError: undefined method `refine' for #<Module:0x90fa>
6
+ fails "Module#alias_method retains method visibility"
7
+ fails "Module#alias_method returned value returns symbol of the defined method name" # Expected #<Class:0x1c94a> to be identical to "checking_return_value"
8
+ fails "Module#append_features on Class raises a TypeError if calling after rebinded to Class"
9
+ fails "Module#attr applies current visibility to methods created"
10
+ fails "Module#attr converts non string/symbol names to strings using to_str" # Expected false == true to be truthy but was false
11
+ fails "Module#attr converts non string/symbol/fixnum names to strings using to_str"
12
+ fails "Module#attr raises a TypeError when the given names can't be converted to strings using to_str"
13
+ fails "Module#attr returns an array of defined method names as symbols" # Expected nil == ["foo", "bar"] to be truthy but was false
14
+ fails "Module#attr_accessor applies current visibility to methods created"
15
+ fails "Module#attr_accessor converts non string/symbol names to strings using to_str" # Expected false == true to be truthy but was false
16
+ fails "Module#attr_accessor converts non string/symbol/fixnum names to strings using to_str"
17
+ fails "Module#attr_accessor not allows creating an attr_accessor on an immediate class"
18
+ fails "Module#attr_accessor on immediates can read through the accessor" # NoMethodError: undefined method `foobar' for 1
19
+ fails "Module#attr_accessor raises a TypeError when the given names can't be converted to strings using to_str"
20
+ fails "Module#attr_accessor returns an array of defined method names as symbols" # Expected nil == ["foo", "foo=", "bar", "bar="] to be truthy but was false
21
+ fails "Module#attr_reader applies current visibility to methods created"
22
+ fails "Module#attr_reader converts non string/symbol names to strings using to_str" # Expected false == true to be truthy but was false
23
+ fails "Module#attr_reader converts non string/symbol/fixnum names to strings using to_str"
24
+ fails "Module#attr_reader not allows for adding an attr_reader to an immediate"
25
+ fails "Module#attr_reader raises a TypeError when the given names can't be converted to strings using to_str"
26
+ fails "Module#attr_reader returns an array of defined method names as symbols" # Expected nil == ["foo", "bar"] to be truthy but was false
27
+ fails "Module#attr_writer applies current visibility to methods created"
28
+ fails "Module#attr_writer converts non string/symbol names to strings using to_str" # Expected false == true to be truthy but was false
29
+ fails "Module#attr_writer converts non string/symbol/fixnum names to strings using to_str"
30
+ fails "Module#attr_writer not allows for adding an attr_writer to an immediate"
31
+ fails "Module#attr_writer raises a TypeError when the given names can't be converted to strings using to_str"
32
+ fails "Module#attr_writer returns an array of defined method names as symbols" # Expected nil == ["foo=", "bar="] to be truthy but was false
33
+ fails "Module#autoload (concurrently) blocks a second thread while a first is doing the autoload"
34
+ fails "Module#autoload (concurrently) blocks others threads while doing an autoload"
35
+ fails "Module#autoload allows multiple autoload constants for a single file"
36
+ fails "Module#autoload calls #to_path on non-String filename arguments"
37
+ fails "Module#autoload calls #to_path on non-string filenames"
38
+ fails "Module#autoload does NOT raise a NameError when the autoload file did not define the constant and a module is opened with the same name"
39
+ fails "Module#autoload does not load the file if the file is manually required"
40
+ fails "Module#autoload does not load the file when accessing the constants table of the module"
41
+ fails "Module#autoload does not load the file when referring to the constant in defined?"
42
+ fails "Module#autoload does not remove the constant from the constant table if load fails"
43
+ fails "Module#autoload does not remove the constant from the constant table if the loaded files does not define it"
44
+ fails "Module#autoload ignores the autoload request if the file is already loaded"
45
+ fails "Module#autoload loads a file with .rb extension when passed the name without the extension"
46
+ fails "Module#autoload loads the file that defines subclass XX::YY < YY and YY is a top level constant"
47
+ fails "Module#autoload loads the file when opening a module that is the autoloaded constant"
48
+ fails "Module#autoload loads the registered constant into a dynamically created class"
49
+ fails "Module#autoload loads the registered constant into a dynamically created module"
50
+ fails "Module#autoload loads the registered constant when it is accessed"
51
+ fails "Module#autoload loads the registered constant when it is included"
52
+ fails "Module#autoload loads the registered constant when it is inherited from"
53
+ fails "Module#autoload loads the registered constant when it is opened as a class"
54
+ fails "Module#autoload loads the registered constant when it is opened as a module"
55
+ fails "Module#autoload looks up the constant in the scope where it is referred"
56
+ fails "Module#autoload looks up the constant when in a meta class scope"
57
+ fails "Module#autoload raises a NameError when the constant name has a space in it"
58
+ fails "Module#autoload raises a NameError when the constant name starts with a lower case letter"
59
+ fails "Module#autoload raises a NameError when the constant name starts with a number"
60
+ fails "Module#autoload raises a TypeError if not passed a String or object respodning to #to_path for the filename"
61
+ fails "Module#autoload raises a TypeError if opening a class with a different superclass than the class defined in the autoload file"
62
+ fails "Module#autoload raises an ArgumentError when an empty filename is given"
63
+ fails "Module#autoload registers a file to load the first time the named constant is accessed"
64
+ fails "Module#autoload retains the autoload even if the request to require fails"
65
+ fails "Module#autoload returns 'constant' on referring the constant with defined?()"
66
+ fails "Module#autoload runs for an exception condition class and doesn't trample the exception"
67
+ fails "Module#autoload sets the autoload constant in the constants table"
68
+ fails "Module#autoload shares the autoload request across dup'ed copies of modules"
69
+ fails "Module#autoload when changing $LOAD_PATH does not reload a file due to a different load path"
70
+ fails "Module#autoload? returns nil if no file has been registered for a constant"
71
+ fails "Module#autoload? returns the name of the file that will be autoloaded"
72
+ fails "Module#class_eval activates refinements from the eval scope with block" # NoMethodError: undefined method `refine' for #<Module:0x89ba>
73
+ fails "Module#class_eval activates refinements from the eval scope" # NoMethodError: undefined method `refine' for #<Module:0x90be>
74
+ fails "Module#class_eval converts a non-string filename to a string using to_str"
75
+ fails "Module#class_eval converts non string eval-string to string using to_str"
76
+ fails "Module#class_eval raises a TypeError when the given eval-string can't be converted to string using to_str"
77
+ fails "Module#class_eval raises a TypeError when the given filename can't be converted to string using to_str"
78
+ fails "Module#class_eval resolves constants in the caller scope ignoring send"
79
+ fails "Module#class_eval resolves constants in the caller scope" # fails because of the difference between module_eval("Const") and module_eval { Const } (only the second one is supported by Opal)
80
+ fails "Module#class_eval uses the optional filename and lineno parameters for error messages"
81
+ fails "Module#const_defined? returns true for toplevel constant when the name begins with '::'"
82
+ fails "Module#const_defined? returns true or false for the nested name"
83
+ fails "Module#const_defined? returns true when passed a scoped constant name for a constant in the inheritance hierarchy and the inherited flag is default"
84
+ fails "Module#const_defined? returns true when passed a scoped constant name for a constant in the inheritance hierarchy and the inherited flag is true"
85
+ fails "Module#const_defined? returns true when passed a scoped constant name"
86
+ fails "Module#const_get does autoload a constant with a toplevel scope qualifier" # NameError: uninitialized constant CSAutoloadB
87
+ fails "Module#const_get does autoload a constant" # NameError: uninitialized constant CSAutoloadA
88
+ fails "Module#const_get does autoload a module and resolve a constant within" # NameError: uninitialized constant CSAutoloadC
89
+ fails "Module#const_get does autoload a non-toplevel module" # LoadError: cannot load such file -- ruby/core/module/fixtures/constants_autoload_d
90
+ fails "Module#const_set sets the name of a module scoped by an anonymous module" # NoMethodError: undefined method `end_with?' for nil
91
+ fails "Module#const_set when overwriting an existing constant does not warn if the previous value was undefined" # Expected #<Module:0x48fd0> to have constant 'Foo' but it does not
92
+ fails "Module#const_set when overwriting an existing constant warns if the previous value was a normal value" # Expected warning to match: /already initialized constant/ but got: ""
93
+ fails "Module#const_source_location accepts a String or Symbol name" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
94
+ fails "Module#const_source_location accepts a scoped constant name" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
95
+ fails "Module#const_source_location accepts a toplevel scope qualifier" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
96
+ fails "Module#const_source_location autoload returns the autoload location while not resolved" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
97
+ fails "Module#const_source_location autoload returns where the constant was resolved when resolved" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
98
+ fails "Module#const_source_location calls #to_str to convert the given name to a String" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
99
+ fails "Module#const_source_location does not search the containing scope" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
100
+ fails "Module#const_source_location does not search the singleton class of a Class or Module" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
101
+ fails "Module#const_source_location does search private constants path" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
102
+ fails "Module#const_source_location raises a NameError if a Symbol has a toplevel scope qualifier" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
103
+ fails "Module#const_source_location raises a NameError if a Symbol is a scoped constant name" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
104
+ fails "Module#const_source_location raises a NameError if only '::' is passed" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
105
+ fails "Module#const_source_location raises a NameError if the name contains non-alphabetic characters except '_'" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
106
+ fails "Module#const_source_location raises a NameError if the name does not start with a capital letter" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
107
+ fails "Module#const_source_location raises a NameError if the name includes two successive scope separators" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
108
+ fails "Module#const_source_location raises a NameError if the name starts with a non-alphabetic character" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
109
+ fails "Module#const_source_location raises a TypeError if conversion to a String by calling #to_str fails" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
110
+ fails "Module#const_source_location return empty path if constant defined in C code" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
111
+ fails "Module#const_source_location returns nil if no constant is defined in the search path" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
112
+ fails "Module#const_source_location returns nil if the constant is defined in the receiver's superclass and the inherit flag is false" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
113
+ fails "Module#const_source_location returns nil when the receiver is a Class, the constant is defined at toplevel and the inherit flag is false" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
114
+ fails "Module#const_source_location returns nil when the receiver is a Module, the constant is defined at toplevel and the inherit flag is false" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
115
+ fails "Module#const_source_location searches into the receiver superclasses if the inherit flag is true" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
116
+ fails "Module#const_source_location with dynamically assigned constants returns path to a toplevel constant when the receiver is a Class" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
117
+ fails "Module#const_source_location with dynamically assigned constants returns path to a toplevel constant when the receiver is a Module" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
118
+ fails "Module#const_source_location with dynamically assigned constants returns path to the updated value of a constant" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
119
+ fails "Module#const_source_location with dynamically assigned constants searches a path in a module included in the immediate class before the superclass" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
120
+ fails "Module#const_source_location with dynamically assigned constants searches a path in a module included in the superclass" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
121
+ fails "Module#const_source_location with dynamically assigned constants searches a path in the immediate class or module first" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
122
+ fails "Module#const_source_location with dynamically assigned constants searches a path in the superclass before a module included in the superclass" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
123
+ fails "Module#const_source_location with dynamically assigned constants searches a path in the superclass chain" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
124
+ fails "Module#const_source_location with statically assigned constants returns location path a toplevel constant when the receiver is a Class" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
125
+ fails "Module#const_source_location with statically assigned constants returns location path a toplevel constant when the receiver is a Module" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
126
+ fails "Module#const_source_location with statically assigned constants searches location path a module included in the immediate class before the superclass" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
127
+ fails "Module#const_source_location with statically assigned constants searches location path a module included in the superclass" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
128
+ fails "Module#const_source_location with statically assigned constants searches location path the immediate class or module first" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
129
+ fails "Module#const_source_location with statically assigned constants searches location path the superclass before a module included in the superclass" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
130
+ fails "Module#const_source_location with statically assigned constants searches location path the superclass chain" # NoMethodError: undefined method `__dir__' for #<MSpecEnv:0x6efae>
131
+ fails "Module#constants doesn't returns inherited constants when passed nil"
132
+ fails "Module#constants returns only public constants"
133
+ fails "Module#define_method raises a TypeError when a Method from a singleton class is defined on another class"
134
+ fails "Module#define_method raises a TypeError when a Method from one class is defined on an unrelated class"
135
+ fails "Module#define_method raises a TypeError when an UnboundMethod from a child class is defined on a parent class"
136
+ fails "Module#define_method raises a TypeError when an UnboundMethod from a singleton class is defined on another class" # Expected TypeError (/can't bind singleton method to a different class/) but no exception was raised (#<Class:0x47ae6> was returned)
137
+ fails "Module#define_method raises a TypeError when an UnboundMethod from one class is defined on an unrelated class"
138
+ fails "Module#deprecate_constant accepts multiple symbols and strings as constant names"
139
+ fails "Module#deprecate_constant raises a NameError when given an undefined name"
140
+ fails "Module#deprecate_constant returns self"
141
+ fails "Module#deprecate_constant when accessing the deprecated module passes the accessing"
142
+ fails "Module#deprecate_constant when accessing the deprecated module warns with a message"
143
+ fails "Module#extend_object extends the given object with its constants and methods by default"
144
+ fails "Module#extend_object on Class raises a TypeError if calling after rebinded to Class"
145
+ fails "Module#include doesn't accept no-arguments" # Expected ArgumentError but no exception was raised (#<Module:0x4fbac> was returned)
146
+ fails "Module#initialize_copy should produce a duped module with inspectable class methods" # NameError: undefined method `hello' for class `Module'
147
+ fails "Module#initialize_copy should retain singleton methods when duped" # Expected [] to equal ["hello"]
148
+ fails "Module#instance_method raises a NameError if the method has been undefined"
149
+ fails "Module#instance_method raises a TypeError if not passed a symbol"
150
+ fails "Module#instance_method raises a TypeError if the given name is not a string/symbol"
151
+ fails "Module#method_added is called with a precise caller location with the line of the 'def'" # NoMethodError: undefined method `caller_locations' for #<Module:0xaa8>
152
+ fails "Module#method_defined? converts the given name to a string using to_str"
153
+ fails "Module#method_defined? raises a TypeError when the given object is not a string/symbol" # Expected TypeError but no exception was raised (false was returned)
154
+ fails "Module#method_defined? raises a TypeError when the given object is not a string/symbol/fixnum"
155
+ fails "Module#method_defined? returns true if a public or private method with the given name is defined in self, self's ancestors or one of self's included modules"
156
+ fails "Module#method_defined? when passed false as a second optional argument checks only the class itself" # ArgumentError: [Child.method_defined?] wrong number of arguments(2 for 1)
157
+ fails "Module#method_defined? when passed true as a second optional argument performs a lookup in ancestors" # ArgumentError: [Child.method_defined?] wrong number of arguments(2 for 1)
158
+ fails "Module#module_eval activates refinements from the eval scope with block" # NoMethodError: undefined method `refine' for #<Module:0x81e0>
159
+ fails "Module#module_eval activates refinements from the eval scope" # NoMethodError: undefined method `refine' for #<Module:0x88e4>
160
+ fails "Module#module_eval converts a non-string filename to a string using to_str"
161
+ fails "Module#module_eval converts non string eval-string to string using to_str"
162
+ fails "Module#module_eval raises a TypeError when the given eval-string can't be converted to string using to_str"
163
+ fails "Module#module_eval raises a TypeError when the given filename can't be converted to string using to_str"
164
+ fails "Module#module_eval resolves constants in the caller scope ignoring send"
165
+ fails "Module#module_eval resolves constants in the caller scope"
166
+ fails "Module#module_eval uses the optional filename and lineno parameters for error messages"
167
+ fails "Module#module_function as a toggle (no arguments) in a Module body does not affect module_evaled method definitions also if outside the eval itself"
168
+ fails "Module#module_function as a toggle (no arguments) in a Module body doesn't affect definitions when inside an eval even if the definitions are outside of it"
169
+ fails "Module#module_function as a toggle (no arguments) in a Module body has no effect if inside a module_eval if the definitions are outside of it"
170
+ fails "Module#module_function on Class raises a TypeError if calling after rebinded to Class"
171
+ fails "Module#module_function with specific method names raises a TypeError when the given names can't be converted to string using to_str"
172
+ fails "Module#module_function with specific method names tries to convert the given names to strings using to_str"
173
+ fails "Module#name changes when the module is reachable through a constant path" # Expected nil to match /^#<Module:0x\h+>::N$/
174
+ fails "Module#name is not nil for a nested module created with the module keyword"
175
+ fails "Module#name is not nil when assigned to a constant in an anonymous module" # NoMethodError: undefined method `end_with?' for nil
176
+ fails "Module#name is set after it is removed from a constant under an anonymous module" # Expected nil to match /^#<Module:0x\h+>::Child$/
177
+ fails "Module#name preserves the encoding in which the class was defined"
178
+ fails "Module#prepend keeps the module in the chain when dupping an intermediate module"
179
+ fails "Module#prepend keeps the module in the chain when dupping the class"
180
+ fails "Module#prepend uses only new module when dupping the module" # Expected [#<Module:0x6c37a>] == [#<Module:0x6c38c>, #<Module:0x6c37a>] to be truthy but was false
181
+ fails "Module#private with argument array as a single argument sets visibility of given method names" # Expected #<Module:0x7b0e0> to have private instance method 'test1' but it does not
182
+ fails "Module#private with argument one or more arguments sets visibility of given method names" # Expected #<Module:0x2f186> to have private instance method 'test1' but it does not
183
+ fails "Module#private_constant marked constants sends #const_missing to the original class or module" # Expected true == "Foo" to be truthy but was false
184
+ fails "Module#private_method_defined? raises a TypeError if passed an Integer" # Expected TypeError but no exception was raised (false was returned)
185
+ fails "Module#private_method_defined? when passed false as a second optional argument checks only the class itself" # ArgumentError: [Child.private_method_defined?] wrong number of arguments(2 for 1)
186
+ fails "Module#private_method_defined? when passed true as a second optional argument performs a lookup in ancestors" # ArgumentError: [Child.private_method_defined?] wrong number of arguments(2 for 1)
187
+ fails "Module#protected with argument array as a single argument sets visibility of given method names" # NoMethodError: undefined method `protected_instance_methods' for #<Module:0x6994a>
188
+ fails "Module#protected with argument does not clone method from the ancestor when setting to the same visibility in a child" # NoMethodError: undefined method `protected_instance_methods' for #<Module:0xa2d8>
189
+ fails "Module#protected with argument one or more arguments sets visibility of given method names" # NoMethodError: undefined method `protected_instance_methods' for #<Module:0x33d4a>
190
+ fails "Module#protected_method_defined? raises a TypeError if passed an Integer" # Expected TypeError but no exception was raised (false was returned)
191
+ fails "Module#protected_method_defined? when passed false as a second optional argument checks only the class itself" # ArgumentError: [Child.private_method_defined?] wrong number of arguments(2 for 1)
192
+ fails "Module#protected_method_defined? when passed true as a second optional argument performs a lookup in ancestors" # ArgumentError: [Child.private_method_defined?] wrong number of arguments(2 for 1)
193
+ fails "Module#public_method_defined? raises a TypeError if passed an Integer" # Expected TypeError but no exception was raised (false was returned)
194
+ fails "Module#refine accepts a module as argument" # NoMethodError: undefined method `refine' for #<Module:0x4c172>
195
+ fails "Module#refine adds methods defined in its block to the anonymous module's public instance methods" # NoMethodError: undefined method `refine' for #<Module:0x3ae64>
196
+ fails "Module#refine and alias aliases a method within a refinement module, but not outside it" # NoMethodError: undefined method `refine' for #<Module:0x1aab4>
197
+ fails "Module#refine and alias_method aliases a method within a refinement module, but not outside it" # NoMethodError: undefined method `refine' for #<Module:0x1aab0>
198
+ fails "Module#refine and instance_methods returns a list of methods including those of the refined module" # NoMethodError: undefined method `refine' for #<Module:0x228>
199
+ fails "Module#refine applies refinements to calls in the refine block" # NoMethodError: undefined method `refine' for #<Module:0x3ae7a>
200
+ fails "Module#refine applies refinements to the module" # NoMethodError: undefined method `refine' for #<Module:0x22c>
201
+ fails "Module#refine does not apply refinements to external scopes not using the module" # NoMethodError: undefined method `refine' for #<Module:0x3ae60>
202
+ fails "Module#refine does not list methods defined only in refinement" # NoMethodError: undefined method `refine' for #<Module:0x1e042>
203
+ fails "Module#refine does not make available methods from another refinement module" # NoMethodError: undefined method `refine' for #<Module:0x3ae8c>
204
+ fails "Module#refine does not override methods in subclasses" # NoMethodError: undefined method `refine' for #<Module:0x3ae56>
205
+ fails "Module#refine doesn't apply refinements outside the refine block" # NoMethodError: undefined method `refine' for #<Module:0x3ae72>
206
+ fails "Module#refine for methods accessed indirectly is honored by &" # NoMethodError: undefined method `refine' for #<Module:0x4b006>
207
+ fails "Module#refine for methods accessed indirectly is honored by BasicObject#__send__" # NoMethodError: undefined method `refine' for #<Module:0x3aeb2>
208
+ fails "Module#refine for methods accessed indirectly is honored by Kernel#binding" # NoMethodError: undefined method `refine' for #<Module:0x3aeaa>
209
+ fails "Module#refine for methods accessed indirectly is honored by Kernel#method" # NoMethodError: undefined method `refine' for #<Module:0x4b00a>
210
+ fails "Module#refine for methods accessed indirectly is honored by Kernel#public_send" # NoMethodError: undefined method `refine' for #<Module:0x4b00e>
211
+ fails "Module#refine for methods accessed indirectly is honored by Kernel#respond_to?" # NoMethodError: undefined method `refine' for #<Module:0x4b016>
212
+ fails "Module#refine for methods accessed indirectly is honored by Kernel#send" # NoMethodError: undefined method `refine' for #<Module:0x3aeae>
213
+ fails "Module#refine for methods accessed indirectly is honored by Symbol#to_proc" # NoMethodError: undefined method `refine' for #<Module:0x3aeba>
214
+ fails "Module#refine for methods accessed indirectly is honored by string interpolation" # NoMethodError: undefined method `refine' for #<Module:0x3aeb6>
215
+ fails "Module#refine for methods accessed indirectly is not honored by &" # NoMethodError: undefined method `refine' for #<Module:0x21e9c>
216
+ fails "Module#refine for methods accessed indirectly is not honored by Kernel#instance_method" # NoMethodError: undefined method `refine' for #<Module:0x4c176>
217
+ fails "Module#refine for methods accessed indirectly is not honored by Kernel#method" # NoMethodError: undefined method `refine' for #<Module:0x3aec0>
218
+ fails "Module#refine for methods accessed indirectly is not honored by Kernel#public_send" # NoMethodError: undefined method `refine' for #<Module:0x21ea0>
219
+ fails "Module#refine for methods accessed indirectly is not honored by Kernel#respond_to?" # NoMethodError: undefined method `refine' for #<Module:0x3aea6>
220
+ fails "Module#refine makes available all refinements from the same module" # NoMethodError: undefined method `refine' for #<Module:0x3ae88>
221
+ fails "Module#refine method lookup looks in included modules from the refinement then" # NoMethodError: undefined method `refine' for #<Module:0x3aea0>
222
+ fails "Module#refine method lookup looks in later included modules of the refined module first" # NoMethodError: undefined method `refine' for #<Module:0x230>
223
+ fails "Module#refine method lookup looks in prepended modules from the refinement first" # NoMethodError: undefined method `refine' for #<Module:0x3ae98>
224
+ fails "Module#refine method lookup looks in refinement then" # NoMethodError: undefined method `refine' for #<Module:0x3ae94>
225
+ fails "Module#refine method lookup looks in the class then" # NoMethodError: undefined method `refine' for #<Module:0x3ae90>
226
+ fails "Module#refine method lookup looks in the included modules for builtin methods" # NoMethodError: undefined method `insert' for "rubyexe.rb"
227
+ fails "Module#refine method lookup looks in the object singleton class first" # NoMethodError: undefined method `refine' for #<Module:0x3ae9c>
228
+ fails "Module#refine module inclusion activates all refinements from all ancestors" # NoMethodError: undefined method `refine' for #<Module:0x3aed4>
229
+ fails "Module#refine module inclusion overrides methods of ancestors by methods in descendants" # NoMethodError: undefined method `refine' for #<Module:0x3aed0>
230
+ fails "Module#refine raises ArgumentError if not given a block" # NoMethodError: undefined method `refine' for #<Module:0x3ae5c>
231
+ fails "Module#refine raises ArgumentError if not passed an argument" # NoMethodError: undefined method `refine' for #<Module:0x3ae80>
232
+ fails "Module#refine raises TypeError if not passed a class" # NoMethodError: undefined method `refine' for #<Module:0x3ae6e>
233
+ fails "Module#refine returns created anonymous module" # NoMethodError: undefined method `refine' for #<Module:0x3ae68>
234
+ fails "Module#refine runs its block in an anonymous module" # NoMethodError: undefined method `refine' for #<Module:0x3ae76>
235
+ fails "Module#refine uses the same anonymous module for future refines of the same class" # NoMethodError: undefined method `refine' for #<Module:0x3ae84>
236
+ fails "Module#refine when super is called in a refinement does't have access to active refinements for C from included module" # NoMethodError: undefined method `refine' for #<Module:0x242>
237
+ fails "Module#refine when super is called in a refinement does't have access to other active refinements from included module" # NoMethodError: undefined method `refine' for #<Module:0x24a>
238
+ fails "Module#refine when super is called in a refinement looks in the another active refinement if super called from included modules" # NoMethodError: undefined method `refine' for #<Module:0x252>
239
+ fails "Module#refine when super is called in a refinement looks in the current active refinement from included modules" # NoMethodError: undefined method `refine' for #<Module:0x256>
240
+ fails "Module#refine when super is called in a refinement looks in the included to refinery module" # NoMethodError: undefined method `refine' for #<Module:0x3aec8>
241
+ fails "Module#refine when super is called in a refinement looks in the lexical scope refinements before other active refinements" # NoMethodError: undefined method `refine' for #<Module:0x236>
242
+ fails "Module#refine when super is called in a refinement looks in the refined ancestors from included module" # NoMethodError: undefined method `refine' for #<Module:0x23e>
243
+ fails "Module#refine when super is called in a refinement looks in the refined class even if there is another active refinement" # NoMethodError: undefined method `refine' for #<Module:0x3aec4>
244
+ fails "Module#refine when super is called in a refinement looks in the refined class first if called from refined method" # NoMethodError: undefined method `refine' for #<Module:0x246>
245
+ fails "Module#refine when super is called in a refinement looks in the refined class from included module" # NoMethodError: undefined method `refine' for #<Module:0x23a>
246
+ fails "Module#refine when super is called in a refinement looks in the refined class" # NoMethodError: undefined method `refine' for #<Module:0x3aecc>
247
+ fails "Module#refine when super is called in a refinement looks only in the refined class even if there is another active refinement" # NoMethodError: undefined method `refine' for #<Module:0x24e>
248
+ fails "Module#remove_const calls #to_str to convert the given name to a String"
249
+ fails "Module#remove_const raises a TypeError if conversion to a String by calling #to_str fails"
250
+ fails "Module#remove_const returns nil when removing autoloaded constant"
251
+ fails "Module#to_s always show the refinement name, even if the module is named" # NoMethodError: undefined method `refine' for ModuleSpecs::RefinementInspect
252
+ fails "Module#to_s does not call #inspect or #to_s for singleton classes" # Expected "#<Class:#<:0x25bee>>" =~ /\A#<Class:#<#<Class:0x25bf2>:0x\h+>>\z/ to be truthy but was nil
253
+ fails "Module#to_s for objects includes class name and object ID" # Expected "#<Class:#<ModuleSpecs::NamedClass:0xa424>>" =~ /^#<Class:#<ModuleSpecs::NamedClass:0x\h+>>$/ to be truthy but was nil
254
+ fails "Module#to_s for the singleton class of an object of an anonymous class" # Expected "#<Class:#<:0xa450>>" == "#<Class:#<#<Class:0xa454>:0xa450>>" to be truthy but was false
255
+ fails "Module#to_s works with an anonymous class" # Expected "#<Class:0xa482>" =~ /^#<Class:0x\h+>$/ to be truthy but was nil
256
+ fails "Module#to_s works with an anonymous module" # Expected "#<Module:0xa4ae>" =~ /^#<Module:0x\h+>$/ to be truthy but was nil
257
+ fails "Module#undef_method raises a NameError when passed a missing name for a class" # Expected NameError (/undefined method `not_exist' for class `#<Class:0xa514>'/) but got: NameError (method 'not_exist' not defined in )
258
+ fails "Module#undef_method raises a NameError when passed a missing name for a metaclass" # Expected NameError (/undefined method `not_exist' for class `String'/) but got: NameError (method 'not_exist' not defined in )
259
+ fails "Module#undef_method raises a NameError when passed a missing name for a module" # Expected NameError (/undefined method `not_exist' for module `#<Module:0xa502>'/) but got: NameError (method 'not_exist' not defined in )
260
+ fails "Module#undef_method raises a NameError when passed a missing name for a singleton class" # Expected NameError (/undefined method `not_exist' for class `#<Class:#<:0xa51a>>'/) but got: NameError (method 'not_exist' not defined in )
261
+ fails "Module#using accepts module as argument" # NoMethodError: undefined method `refine' for #<Module:0x2a040>
262
+ fails "Module#using accepts module without refinements" # Expected to not get Exception but got NoMethodError (undefined method `using' for #<Module:0x2a02a>)
263
+ fails "Module#using activates refinement even for existed objects" # NoMethodError: undefined method `refine' for #<Module:0x2a052>
264
+ fails "Module#using activates updates when refinement reopens later" # NoMethodError: undefined method `refine' for #<Module:0x2a018>
265
+ fails "Module#using does not accept class" # NoMethodError: undefined method `using' for #<Module:0x2a03c>
266
+ fails "Module#using imports class refinements from module into the current class/module" # NoMethodError: undefined method `refine' for #<Module:0x2a02e>
267
+ fails "Module#using raises TypeError if passed something other than module" # NoMethodError: undefined method `using' for #<Module:0x2a034>
268
+ fails "Module#using raises error in method scope" # NoMethodError: undefined method `using' for #<Module:0x2a044>
269
+ fails "Module#using returns self" # NoMethodError: undefined method `using' for #<Module:0x2a022>
270
+ fails "Module#using scope of refinement is active for block called via instance_eval" # NoMethodError: undefined method `refine' for #<Module:0x102>
271
+ fails "Module#using scope of refinement is active for block called via instance_exec" # NoMethodError: undefined method `refine' for #<Module:0xfe>
272
+ fails "Module#using scope of refinement is active for class defined via Class.new {}" # NoMethodError: undefined method `refine' for #<Module:0x106>
273
+ fails "Module#using scope of refinement is active for method defined in a scope wherever it's called" # NoMethodError: undefined method `refine' for #<Module:0x2a06a>
274
+ fails "Module#using scope of refinement is active for module defined via Module.new {}" # NoMethodError: undefined method `refine' for #<Module:0x10a>
275
+ fails "Module#using scope of refinement is active until the end of current class/module" # NoMethodError: undefined method `refine' for #<Module:0x2a07a>
276
+ fails "Module#using scope of refinement is not active before the `using` call" # NoMethodError: undefined method `refine' for #<Module:0x2a05e>
277
+ fails "Module#using scope of refinement is not active for code defined outside the current scope" # NoMethodError: undefined method `refine' for #<Module:0x2a072>
278
+ fails "Module#using scope of refinement is not active when class/module reopens" # NoMethodError: undefined method `refine' for #<Module:0x2a056>
279
+ fails "Module#using works in classes too" # NoMethodError: undefined method `refine' for #<Module:0x2a01c>
280
+ fails "Module::Nesting returns the list of Modules nested at the point of call"
281
+ end
@@ -0,0 +1,4 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "NilClass" do
3
+ fails "NilClass#=~ returns nil matching any object" # Expected false to be nil
4
+ end
@@ -0,0 +1,27 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "Numeric" do
3
+ fails "Numeric#clone does not change frozen status" # Expected false == true to be truthy but was false
4
+ fails "Numeric#clone raises ArgumentError if passed freeze: false" # Expected ArgumentError (/can't unfreeze/) but no exception was raised (1 was returned)
5
+ fails "Numeric#dup does not change frozen status" # Expected false == true to be truthy but was false
6
+ fails "Numeric#remainder returns the result of calling self#% with other - other if self is greater than 0 and other is less than 0"
7
+ fails "Numeric#remainder returns the result of calling self#% with other - other if self is less than 0 and other is greater than 0"
8
+ fails "Numeric#remainder returns the result of calling self#% with other if self and other are greater than 0"
9
+ fails "Numeric#remainder returns the result of calling self#% with other if self and other are less than 0"
10
+ fails "Numeric#remainder returns the result of calling self#% with other if self is 0"
11
+ fails "Numeric#singleton_method_added raises a TypeError when trying to define a singleton method on a Numeric"
12
+ fails "Numeric#step with keyword arguments defaults to an infinite limit with a step size of 1 for Integers" # Expected [] to equal [1, 2, 3, 4, 5]
13
+ fails "Numeric#step with keyword arguments defaults to an infinite limit with a step size of 1.0 for Floats" # Expected [] to equal [1, 2, 3, 4, 5]
14
+ fails "Numeric#step with keyword arguments when no block is given returns an Enumerator::ArithmeticSequence when not passed a block and self < stop" # Expected #<Enumerator: 1:step({"to"=>2, "by"=>3})> (Enumerator) to be an instance of Enumerator::ArithmeticSequence
15
+ fails "Numeric#step with keyword arguments when no block is given returns an Enumerator::ArithmeticSequence when not passed a block and self > stop" # Expected #<Enumerator: 1:step({"to"=>0, "by"=>2})> (Enumerator) to be an instance of Enumerator::ArithmeticSequence
16
+ fails "Numeric#step with mixed arguments raises an ArgumentError when step is 0" # Expected ArgumentError but no exception was raised (nil was returned)
17
+ fails "Numeric#step with mixed arguments defaults to an infinite limit with a step size of 1 for Integers" # Expected [] to equal [1, 2, 3, 4, 5]
18
+ fails "Numeric#step with mixed arguments defaults to an infinite limit with a step size of 1.0 for Floats" # Expected [] to equal [1, 2, 3, 4, 5]
19
+ fails "Numeric#step with mixed arguments raises an ArgumentError when step is 0.0" # Expected ArgumentError but no exception was raised (nil was returned)
20
+ fails "Numeric#step with mixed arguments when no block is given returns an Enumerator::ArithmeticSequence when not passed a block and self < stop" # Expected #<Enumerator: 1:step(2, {"by"=>3})> (Enumerator) to be an instance of Enumerator::ArithmeticSequence
21
+ fails "Numeric#step with mixed arguments when no block is given returns an Enumerator::ArithmeticSequence when not passed a block and self > stop" # Expected #<Enumerator: 1:step(0, {"by"=>2})> (Enumerator) to be an instance of Enumerator::ArithmeticSequence
22
+ fails "Numeric#step with positional args defaults to an infinite limit with a step size of 1 for Integers" # Expected [] to equal [1, 2, 3, 4, 5]
23
+ fails "Numeric#step with positional args defaults to an infinite limit with a step size of 1.0 for Floats" # Expected [] to equal [1, 2, 3, 4, 5]
24
+ fails "Numeric#step with positional args when no block is given returned Enumerator::ArithmeticSequence type returns an instance of Enumerator::ArithmeticSequence" # Expected Enumerator == Enumerator::ArithmeticSequence to be truthy but was false
25
+ fails "Numeric#step with positional args when no block is given returns an Enumerator::ArithmeticSequence when not passed a block and self < stop" # Expected #<Enumerator: 1:step(2, 3)> (Enumerator) to be an instance of Enumerator::ArithmeticSequence
26
+ fails "Numeric#step with positional args when no block is given returns an Enumerator::ArithmeticSequence when not passed a block and self > stop" # Expected #<Enumerator: 1:step(0, 2)> (Enumerator) to be an instance of Enumerator::ArithmeticSequence
27
+ end
@@ -0,0 +1,8 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "OpenStruct" do
3
+ fails "OpenStruct#to_h with block coerces returned pair to Array with #to_ary" # Expected {"name"=>"John Smith", "age"=>70, "pension"=>300} == {"b"=>"b"} to be truthy but was false
4
+ fails "OpenStruct#to_h with block converts [key, value] pairs returned by the block to a hash" # Expected {"name"=>"John Smith", "age"=>70, "pension"=>300} == {"name"=>"John SmithJohn Smith", "age"=>140, "pension"=>600} to be truthy but was false
5
+ fails "OpenStruct#to_h with block does not coerce returned pair to Array with #to_a" # Expected TypeError (/wrong element type MockObject/) but no exception was raised ({"name"=>"John Smith", "age"=>70, "pension"=>300} was returned)
6
+ fails "OpenStruct#to_h with block raises ArgumentError if block returns longer or shorter array" # Expected ArgumentError (/element has wrong array length/) but no exception was raised ({"name"=>"John Smith", "age"=>70, "pension"=>300} was returned)
7
+ fails "OpenStruct#to_h with block raises TypeError if block returns something other than Array" # Expected TypeError (/wrong element type String/) but no exception was raised ({"name"=>"John Smith", "age"=>70, "pension"=>300} was returned)
8
+ end
@@ -0,0 +1,138 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_filter "String#unpack" do
3
+ fails "String#unpack with format 'A' decodes into raw (ascii) string values" # Expected "UTF-16LE" to equal "ASCII-8BIT"
4
+ fails "String#unpack with format 'H' should make strings with US_ASCII encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
5
+ fails "String#unpack with format 'Q' adds nil for each element requested beyond the end of the String" # Expected [7523094288207668000, nil, nil] to be computed by "abcdefgh".unpack from "Q3" (computed [7523094288207667000, nil, nil] instead)
6
+ fails "String#unpack with format 'Q' decodes one long for a single format character" # Expected [7523094288207667000] to equal [7523094288207668000]
7
+ fails "String#unpack with format 'Q' decodes the number of longs requested by the count modifier" # Expected [7523094283929477000, 7378418357791582000] to equal [7523094283929478000, 7378418357791582000]
8
+ fails "String#unpack with format 'Q' decodes two longs for two format characters" # Expected [7233738012216484000, 7233733596956420000] to equal [7233738012216485000, 7233733596956420000]
9
+ fails "String#unpack with format 'Q' ignores NULL bytes between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
10
+ fails "String#unpack with format 'Q' ignores spaces between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
11
+ fails "String#unpack with format 'Q' with modifier '<' decodes one long for a single format character" # Expected [7523094288207667000] to equal [7523094288207668000]
12
+ fails "String#unpack with format 'Q' with modifier '<' decodes the number of longs requested by the count modifier" # Expected [7523094283929477000, 7378418357791582000] to equal [7523094283929478000, 7378418357791582000]
13
+ fails "String#unpack with format 'Q' with modifier '<' decodes two longs for two format characters" # Expected [7233738012216484000, 7233733596956420000] to equal [7233738012216485000, 7233733596956420000]
14
+ fails "String#unpack with format 'Q' with modifier '<' ignores NULL bytes between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
15
+ fails "String#unpack with format 'Q' with modifier '<' ignores spaces between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
16
+ fails "String#unpack with format 'Q' with modifier '>' decodes one long for a single format character" # Expected [7523094288207667000] to equal [7523094288207668000]
17
+ fails "String#unpack with format 'Q' with modifier '>' decodes the number of longs requested by the count modifier" # Expected [7523094283929477000, 7378418357791582000] to equal [7523094283929478000, 7378418357791582000]
18
+ fails "String#unpack with format 'Q' with modifier '>' decodes two longs for two format characters" # Expected [7233738012216484000, 7233733596956420000] to equal [7233738012216485000, 7233733596956420000]
19
+ fails "String#unpack with format 'Q' with modifier '>' ignores NULL bytes between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
20
+ fails "String#unpack with format 'Q' with modifier '>' ignores spaces between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
21
+ fails "String#unpack with format 'U' decodes UTF-8 BMP codepoints" # ArgumentError: malformed UTF-8 character
22
+ fails "String#unpack with format 'U' decodes UTF-8 max codepoints" # Expected [65536] to be computed by "𐀀".unpack from "U" (computed [55296, 56320] instead)
23
+ fails "String#unpack with format 'U' decodes Unicode codepoints as ASCII values" # ArgumentError: malformed UTF-8 character
24
+ fails "String#unpack with format 'U' decodes all remaining characters when passed the '*' modifier" # ArgumentError: malformed UTF-8 character
25
+ fails "String#unpack with format 'U' decodes the number of characters specified by the count modifier" # ArgumentError: malformed UTF-8 character
26
+ fails "String#unpack with format 'U' does not decode any items for directives exceeding the input string size" # ArgumentError: malformed UTF-8 character
27
+ fails "String#unpack with format 'U' implicitly has a count of one when no count modifier is passed" # ArgumentError: malformed UTF-8 character
28
+ fails "String#unpack with format 'a' decodes into raw (ascii) string values" # Expected "UTF-16LE" to equal "ASCII-8BIT"
29
+ fails "String#unpack with format 'b' decodes into US-ASCII string values" # Expected "UTF-16LE" to equal "US-ASCII"
30
+ fails "String#unpack with format 'h' should make strings with US_ASCII encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
31
+ fails "String#unpack with format 'm' produces binary strings" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
32
+ fails "String#unpack with format 'q' adds nil for each element requested beyond the end of the String" # Expected [7523094288207668000, nil, nil] to be computed by "abcdefgh".unpack from "q3" (computed [7523094288207667000, nil, nil] instead)
33
+ fails "String#unpack with format 'q' decodes a long with most significant bit set as a negative number" # Expected [-71870673923813380] to equal [-71870673923814400]
34
+ fails "String#unpack with format 'q' decodes one long for a single format character" # Expected [7523094288207667000] to equal [7523094288207668000]
35
+ fails "String#unpack with format 'q' decodes the number of longs requested by the count modifier" # Expected [7523094283929477000, 7378418357791582000] to equal [7523094283929478000, 7378418357791582000]
36
+ fails "String#unpack with format 'q' decodes two longs for two format characters" # Expected [7233738012216484000, 7233733596956420000] to equal [7233738012216485000, 7233733596956420000]
37
+ fails "String#unpack with format 'q' ignores NULL bytes between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
38
+ fails "String#unpack with format 'q' ignores spaces between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
39
+ fails "String#unpack with format 'q' with modifier '<' decodes a long with most significant bit set as a negative number" # Expected [-71870673923813380] to equal [-71870673923814400]
40
+ fails "String#unpack with format 'q' with modifier '<' decodes one long for a single format character" # Expected [7523094288207667000] to equal [7523094288207668000]
41
+ fails "String#unpack with format 'q' with modifier '<' decodes the number of longs requested by the count modifier" # Expected [7523094283929477000, 7378418357791582000] to equal [7523094283929478000, 7378418357791582000]
42
+ fails "String#unpack with format 'q' with modifier '<' decodes two longs for two format characters" # Expected [7233738012216484000, 7233733596956420000] to equal [7233738012216485000, 7233733596956420000]
43
+ fails "String#unpack with format 'q' with modifier '<' ignores NULL bytes between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
44
+ fails "String#unpack with format 'q' with modifier '<' ignores spaces between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
45
+ fails "String#unpack with format 'q' with modifier '>' decodes a long with most significant bit set as a negative number" # Expected [-71870673923813380] to equal [-71870673923814400]
46
+ fails "String#unpack with format 'q' with modifier '>' decodes one long for a single format character" # Expected [7523094288207667000] to equal [7523094288207668000]
47
+ fails "String#unpack with format 'q' with modifier '>' decodes the number of longs requested by the count modifier" # Expected [7523094283929477000, 7378418357791582000] to equal [7523094283929478000, 7378418357791582000]
48
+ fails "String#unpack with format 'q' with modifier '>' decodes two longs for two format characters" # Expected [7233738012216484000, 7233733596956420000] to equal [7233738012216485000, 7233733596956420000]
49
+ fails "String#unpack with format 'q' with modifier '>' ignores NULL bytes between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
50
+ fails "String#unpack with format 'q' with modifier '>' ignores spaces between directives" # Expected [7523094288207667000, 7233738012216484000] to equal [7523094288207668000, 7233738012216485000]
51
+ fails "String#unpack with format 'u' decodes into raw (ascii) string values" # Expected "UTF-16LE" to equal "ASCII-8BIT"
52
+ end
53
+
54
+ opal_filter "Array#pack" do
55
+ fails "Array#pack with format 'A' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
56
+ fails "Array#pack with format 'A' returns a string in encoding of common to the concatenated results" # RuntimeError: Unsupported pack directive "U" (no chunk reader defined)
57
+ fails "Array#pack with format 'C' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
58
+ fails "Array#pack with format 'C' returns a binary string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
59
+ fails "Array#pack with format 'C' returns an ASCII-8BIT string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
60
+ fails "Array#pack with format 'L' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
61
+ fails "Array#pack with format 'L' returns a binary string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
62
+ fails "Array#pack with format 'L' returns an ASCII-8BIT string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
63
+ fails "Array#pack with format 'L' with modifier '>' and '!' calls #to_int to convert the pack argument to an Integer" # Mock 'to_int' expected to receive to_int("any_args") exactly 1 times but received it 0 times
64
+ fails "Array#pack with format 'L' with modifier '>' and '!' encodes a Float truncated as an Integer" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
65
+ fails "Array#pack with format 'L' with modifier '>' and '!' encodes all remaining elements when passed the '*' modifier" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
66
+ fails "Array#pack with format 'L' with modifier '>' and '!' encodes the least significant 32 bits of a negative number" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
67
+ fails "Array#pack with format 'L' with modifier '>' and '!' encodes the least significant 32 bits of a positive number" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
68
+ fails "Array#pack with format 'L' with modifier '>' and '!' encodes the number of array elements specified by the count modifier" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
69
+ fails "Array#pack with format 'L' with modifier '>' and '!' ignores NULL bytes between directives" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
70
+ fails "Array#pack with format 'L' with modifier '>' and '!' ignores spaces between directives" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
71
+ fails "Array#pack with format 'L' with modifier '>' and '_' calls #to_int to convert the pack argument to an Integer" # Mock 'to_int' expected to receive to_int("any_args") exactly 1 times but received it 0 times
72
+ fails "Array#pack with format 'L' with modifier '>' and '_' encodes a Float truncated as an Integer" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
73
+ fails "Array#pack with format 'L' with modifier '>' and '_' encodes all remaining elements when passed the '*' modifier" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
74
+ fails "Array#pack with format 'L' with modifier '>' and '_' encodes the least significant 32 bits of a negative number" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
75
+ fails "Array#pack with format 'L' with modifier '>' and '_' encodes the least significant 32 bits of a positive number" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
76
+ fails "Array#pack with format 'L' with modifier '>' and '_' encodes the number of array elements specified by the count modifier" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
77
+ fails "Array#pack with format 'L' with modifier '>' and '_' ignores NULL bytes between directives" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
78
+ fails "Array#pack with format 'L' with modifier '>' and '_' ignores spaces between directives" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
79
+ fails "Array#pack with format 'L' with modifier '>' calls #to_int to convert the pack argument to an Integer" # Mock 'to_int' expected to receive 'to_int' exactly 1 times but received it 0 times
80
+ fails "Array#pack with format 'L' with modifier '>' encodes a Float truncated as an Integer" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
81
+ fails "Array#pack with format 'L' with modifier '>' encodes all remaining elements when passed the '*' modifier" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
82
+ fails "Array#pack with format 'L' with modifier '>' encodes the least significant 32 bits of a negative number" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
83
+ fails "Array#pack with format 'L' with modifier '>' encodes the least significant 32 bits of a positive number" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
84
+ fails "Array#pack with format 'L' with modifier '>' encodes the number of array elements specified by the count modifier" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
85
+ fails "Array#pack with format 'L' with modifier '>' ignores NULL bytes between directives" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
86
+ fails "Array#pack with format 'L' with modifier '>' ignores spaces between directives" # RuntimeError: Unsupported pack directive "L>" (no chunk reader defined)
87
+ fails "Array#pack with format 'U' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
88
+ fails "Array#pack with format 'U' encodes values larger than UTF-8 max codepoints" # Exception: Invalid code point 1114112
89
+ fails "Array#pack with format 'U' raises a TypeError if #to_int does not return an Integer" # Expected TypeError but no exception was raised ("\u0005" was returned)
90
+ fails "Array#pack with format 'a' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
91
+ fails "Array#pack with format 'a' returns a string in encoding of common to the concatenated results" # RuntimeError: Unsupported pack directive "U" (no chunk reader defined)
92
+ fails "Array#pack with format 'c' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
93
+ fails "Array#pack with format 'c' returns a binary string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
94
+ fails "Array#pack with format 'c' returns an ASCII-8BIT string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
95
+ fails "Array#pack with format 'l' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
96
+ fails "Array#pack with format 'l' returns a binary string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
97
+ fails "Array#pack with format 'l' returns an ASCII-8BIT string" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
98
+ fails "Array#pack with format 'l' with modifier '>' and '!' calls #to_int to convert the pack argument to an Integer" # Mock 'to_int' expected to receive to_int("any_args") exactly 1 times but received it 0 times
99
+ fails "Array#pack with format 'l' with modifier '>' and '!' encodes a Float truncated as an Integer" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
100
+ fails "Array#pack with format 'l' with modifier '>' and '!' encodes all remaining elements when passed the '*' modifier" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
101
+ fails "Array#pack with format 'l' with modifier '>' and '!' encodes the least significant 32 bits of a negative number" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
102
+ fails "Array#pack with format 'l' with modifier '>' and '!' encodes the least significant 32 bits of a positive number" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
103
+ fails "Array#pack with format 'l' with modifier '>' and '!' encodes the number of array elements specified by the count modifier" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
104
+ fails "Array#pack with format 'l' with modifier '>' and '!' ignores NULL bytes between directives" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
105
+ fails "Array#pack with format 'l' with modifier '>' and '!' ignores spaces between directives" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
106
+ fails "Array#pack with format 'l' with modifier '>' and '_' calls #to_int to convert the pack argument to an Integer" # Mock 'to_int' expected to receive to_int("any_args") exactly 1 times but received it 0 times
107
+ fails "Array#pack with format 'l' with modifier '>' and '_' encodes a Float truncated as an Integer" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
108
+ fails "Array#pack with format 'l' with modifier '>' and '_' encodes all remaining elements when passed the '*' modifier" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
109
+ fails "Array#pack with format 'l' with modifier '>' and '_' encodes the least significant 32 bits of a negative number" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
110
+ fails "Array#pack with format 'l' with modifier '>' and '_' encodes the least significant 32 bits of a positive number" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
111
+ fails "Array#pack with format 'l' with modifier '>' and '_' encodes the number of array elements specified by the count modifier" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
112
+ fails "Array#pack with format 'l' with modifier '>' and '_' ignores NULL bytes between directives" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
113
+ fails "Array#pack with format 'l' with modifier '>' and '_' ignores spaces between directives" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
114
+ fails "Array#pack with format 'l' with modifier '>' calls #to_int to convert the pack argument to an Integer" # Mock 'to_int' expected to receive 'to_int' exactly 1 times but received it 0 times
115
+ fails "Array#pack with format 'l' with modifier '>' encodes a Float truncated as an Integer" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
116
+ fails "Array#pack with format 'l' with modifier '>' encodes all remaining elements when passed the '*' modifier" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
117
+ fails "Array#pack with format 'l' with modifier '>' encodes the least significant 32 bits of a negative number" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
118
+ fails "Array#pack with format 'l' with modifier '>' encodes the least significant 32 bits of a positive number" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
119
+ fails "Array#pack with format 'l' with modifier '>' encodes the number of array elements specified by the count modifier" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
120
+ fails "Array#pack with format 'l' with modifier '>' ignores NULL bytes between directives" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
121
+ fails "Array#pack with format 'l' with modifier '>' ignores spaces between directives" # RuntimeError: Unsupported pack directive "l>" (no chunk reader defined)
122
+ fails "Array#pack with format 'u' appends a newline to the end of the encoded string" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
123
+ fails "Array#pack with format 'u' calls #to_str to coerce the directives string" # RuntimeError: Unsupported pack directive "x" (no chunk reader defined)
124
+ fails "Array#pack with format 'u' calls #to_str to convert an object to a String" # Mock 'pack m string' expected to receive 'to_str' exactly 1 times but received it 0 times
125
+ fails "Array#pack with format 'u' emits a newline after complete groups of count / 3 input characters when passed a count modifier" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
126
+ fails "Array#pack with format 'u' encodes 1, 2, or 3 characters in 4 output characters (uuencoding)" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
127
+ fails "Array#pack with format 'u' encodes all ascii characters" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
128
+ fails "Array#pack with format 'u' encodes an empty string as an empty string" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
129
+ fails "Array#pack with format 'u' encodes one element per directive" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
130
+ fails "Array#pack with format 'u' ignores whitespace in the format string" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
131
+ fails "Array#pack with format 'u' implicitly has a count of 45 when passed '*', 0, 1, 2 or no count modifier" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
132
+ fails "Array#pack with format 'u' prepends the length of each segment of the input string as the first character (+32) in each line of the output" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
133
+ fails "Array#pack with format 'u' raises a TypeError if #to_str does not return a String" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
134
+ fails "Array#pack with format 'u' raises a TypeError if passed an Integer" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
135
+ fails "Array#pack with format 'u' raises a TypeError if passed nil" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
136
+ fails "Array#pack with format 'u' raises an ArgumentError if there are fewer elements than the format requires" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
137
+ fails "Array#pack with format 'u' sets the output string to US-ASCII encoding" # RuntimeError: Unsupported pack directive "u" (no chunk reader defined)
138
+ end