@blazetrails/ruby-compat 0.0.0-stage → 0.1.0-alpha0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (625) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +6 -0
  3. package/README.md +440 -2
  4. package/dist/argument-error.d.ts +15 -0
  5. package/dist/argument-error.js +15 -0
  6. package/dist/argument-error.js.map +1 -0
  7. package/dist/array.d.ts +415 -0
  8. package/dist/array.js +1330 -0
  9. package/dist/array.js.map +1 -0
  10. package/dist/async-context-adapter.d.ts +19 -0
  11. package/dist/async-context-adapter.js +139 -0
  12. package/dist/async-context-adapter.js.map +1 -0
  13. package/dist/backtrace-location.d.ts +78 -0
  14. package/dist/backtrace-location.js +158 -0
  15. package/dist/backtrace-location.js.map +1 -0
  16. package/dist/base64.d.ts +73 -0
  17. package/dist/base64.js +164 -0
  18. package/dist/base64.js.map +1 -0
  19. package/dist/benchmark.d.ts +19 -0
  20. package/dist/benchmark.js +16 -0
  21. package/dist/benchmark.js.map +1 -0
  22. package/dist/big-decimal.d.ts +111 -0
  23. package/dist/big-decimal.js +584 -0
  24. package/dist/big-decimal.js.map +1 -0
  25. package/dist/bundler.d.ts +44 -0
  26. package/dist/bundler.js +97 -0
  27. package/dist/bundler.js.map +1 -0
  28. package/dist/cgi.d.ts +89 -0
  29. package/dist/cgi.js +168 -0
  30. package/dist/cgi.js.map +1 -0
  31. package/dist/child-process-adapter.d.ts +110 -0
  32. package/dist/child-process-adapter.js +272 -0
  33. package/dist/child-process-adapter.js.map +1 -0
  34. package/dist/class-module.d.ts +10 -0
  35. package/dist/class-module.js +10 -0
  36. package/dist/class-module.js.map +1 -0
  37. package/dist/classpath.d.ts +93 -0
  38. package/dist/classpath.js +210 -0
  39. package/dist/classpath.js.map +1 -0
  40. package/dist/closed-queue-error.d.ts +10 -0
  41. package/dist/closed-queue-error.js +10 -0
  42. package/dist/closed-queue-error.js.map +1 -0
  43. package/dist/comparable.d.ts +127 -0
  44. package/dist/comparable.js +376 -0
  45. package/dist/comparable.js.map +1 -0
  46. package/dist/complex.d.ts +49 -0
  47. package/dist/complex.js +164 -0
  48. package/dist/complex.js.map +1 -0
  49. package/dist/concurrent/atomic-boolean.d.ts +24 -0
  50. package/dist/concurrent/atomic-boolean.js +43 -0
  51. package/dist/concurrent/atomic-boolean.js.map +1 -0
  52. package/dist/concurrent/atomic-fixnum.d.ts +21 -0
  53. package/dist/concurrent/atomic-fixnum.js +35 -0
  54. package/dist/concurrent/atomic-fixnum.js.map +1 -0
  55. package/dist/concurrent/count-down-latch.d.ts +20 -0
  56. package/dist/concurrent/count-down-latch.js +50 -0
  57. package/dist/concurrent/count-down-latch.js.map +1 -0
  58. package/dist/concurrent/cyclic-barrier.d.ts +18 -0
  59. package/dist/concurrent/cyclic-barrier.js +50 -0
  60. package/dist/concurrent/cyclic-barrier.js.map +1 -0
  61. package/dist/concurrent/event.d.ts +19 -0
  62. package/dist/concurrent/event.js +31 -0
  63. package/dist/concurrent/event.js.map +1 -0
  64. package/dist/concurrent/map.d.ts +149 -0
  65. package/dist/concurrent/map.js +202 -0
  66. package/dist/concurrent/map.js.map +1 -0
  67. package/dist/concurrent/read-write-lock.d.ts +25 -0
  68. package/dist/concurrent/read-write-lock.js +70 -0
  69. package/dist/concurrent/read-write-lock.js.map +1 -0
  70. package/dist/concurrent/semaphore.d.ts +24 -0
  71. package/dist/concurrent/semaphore.js +74 -0
  72. package/dist/concurrent/semaphore.js.map +1 -0
  73. package/dist/concurrent/timer-task.d.ts +52 -0
  74. package/dist/concurrent/timer-task.js +112 -0
  75. package/dist/concurrent/timer-task.js.map +1 -0
  76. package/dist/constants.generated.d.ts +2 -0
  77. package/dist/constants.generated.js +64 -0
  78. package/dist/constants.generated.js.map +1 -0
  79. package/dist/converter-not-found-error.d.ts +14 -0
  80. package/dist/converter-not-found-error.js +14 -0
  81. package/dist/converter-not-found-error.js.map +1 -0
  82. package/dist/crypto-adapter.d.ts +64 -0
  83. package/dist/crypto-adapter.js +365 -0
  84. package/dist/crypto-adapter.js.map +1 -0
  85. package/dist/delegate.d.ts +156 -0
  86. package/dist/delegate.js +306 -0
  87. package/dist/delegate.js.map +1 -0
  88. package/dist/digest.d.ts +99 -0
  89. package/dist/digest.js +131 -0
  90. package/dist/digest.js.map +1 -0
  91. package/dist/dir.d.ts +225 -0
  92. package/dist/dir.js +608 -0
  93. package/dist/dir.js.map +1 -0
  94. package/dist/encoding-error.d.ts +14 -0
  95. package/dist/encoding-error.js +17 -0
  96. package/dist/encoding-error.js.map +1 -0
  97. package/dist/encoding.d.ts +121 -0
  98. package/dist/encoding.js +306 -0
  99. package/dist/encoding.js.map +1 -0
  100. package/dist/ensure.d.ts +15 -0
  101. package/dist/ensure.js +35 -0
  102. package/dist/ensure.js.map +1 -0
  103. package/dist/enumerable.d.ts +375 -0
  104. package/dist/enumerable.js +1102 -0
  105. package/dist/enumerable.js.map +1 -0
  106. package/dist/enumerator.d.ts +324 -0
  107. package/dist/enumerator.js +625 -0
  108. package/dist/enumerator.js.map +1 -0
  109. package/dist/eof-error.d.ts +14 -0
  110. package/dist/eof-error.js +14 -0
  111. package/dist/eof-error.js.map +1 -0
  112. package/dist/errno.d.ts +447 -0
  113. package/dist/errno.js +616 -0
  114. package/dist/errno.js.map +1 -0
  115. package/dist/exc-detailed-message.d.ts +15 -0
  116. package/dist/exc-detailed-message.js +106 -0
  117. package/dist/exc-detailed-message.js.map +1 -0
  118. package/dist/exc-to-s.d.ts +10 -0
  119. package/dist/exc-to-s.js +21 -0
  120. package/dist/exc-to-s.js.map +1 -0
  121. package/dist/exception.d.ts +44 -0
  122. package/dist/exception.js +115 -0
  123. package/dist/exception.js.map +1 -0
  124. package/dist/fiber-error.d.ts +12 -0
  125. package/dist/fiber-error.js +12 -0
  126. package/dist/fiber-error.js.map +1 -0
  127. package/dist/fiber.d.ts +51 -0
  128. package/dist/fiber.js +178 -0
  129. package/dist/fiber.js.map +1 -0
  130. package/dist/file-utils.d.ts +480 -0
  131. package/dist/file-utils.js +1824 -0
  132. package/dist/file-utils.js.map +1 -0
  133. package/dist/file.d.ts +643 -0
  134. package/dist/file.js +1334 -0
  135. package/dist/file.js.map +1 -0
  136. package/dist/float-domain-error.d.ts +17 -0
  137. package/dist/float-domain-error.js +17 -0
  138. package/dist/float-domain-error.js.map +1 -0
  139. package/dist/fork-children.d.ts +23 -0
  140. package/dist/fork-children.js +32 -0
  141. package/dist/fork-children.js.map +1 -0
  142. package/dist/frozen-error.d.ts +33 -0
  143. package/dist/frozen-error.js +41 -0
  144. package/dist/frozen-error.js.map +1 -0
  145. package/dist/fs-adapter.d.ts +158 -0
  146. package/dist/fs-adapter.js +253 -0
  147. package/dist/fs-adapter.js.map +1 -0
  148. package/dist/gem/deprecate.d.ts +10 -0
  149. package/dist/gem/deprecate.js +8 -0
  150. package/dist/gem/deprecate.js.map +1 -0
  151. package/dist/gem/requirement.d.ts +55 -0
  152. package/dist/gem/requirement.js +91 -0
  153. package/dist/gem/requirement.js.map +1 -0
  154. package/dist/gem/version.d.ts +50 -0
  155. package/dist/gem/version.js +148 -0
  156. package/dist/gem/version.js.map +1 -0
  157. package/dist/gem.d.ts +59 -0
  158. package/dist/gem.js +82 -0
  159. package/dist/gem.js.map +1 -0
  160. package/dist/hash.d.ts +967 -0
  161. package/dist/hash.js +1572 -0
  162. package/dist/hash.js.map +1 -0
  163. package/dist/http-adapter.d.ts +124 -0
  164. package/dist/http-adapter.js +220 -0
  165. package/dist/http-adapter.js.map +1 -0
  166. package/dist/immediate-executor.d.ts +20 -0
  167. package/dist/immediate-executor.js +39 -0
  168. package/dist/immediate-executor.js.map +1 -0
  169. package/dist/include.d.ts +778 -0
  170. package/dist/include.js +2208 -0
  171. package/dist/include.js.map +1 -0
  172. package/dist/index-error.d.ts +13 -0
  173. package/dist/index-error.js +13 -0
  174. package/dist/index-error.js.map +1 -0
  175. package/dist/index.d.ts +174 -0
  176. package/dist/index.js +166 -0
  177. package/dist/index.js.map +1 -0
  178. package/dist/invalid-byte-sequence-error.d.ts +62 -0
  179. package/dist/invalid-byte-sequence-error.js +75 -0
  180. package/dist/invalid-byte-sequence-error.js.map +1 -0
  181. package/dist/io-error.d.ts +14 -0
  182. package/dist/io-error.js +17 -0
  183. package/dist/io-error.js.map +1 -0
  184. package/dist/io.d.ts +867 -0
  185. package/dist/io.js +1960 -0
  186. package/dist/io.js.map +1 -0
  187. package/dist/ipaddr.d.ts +79 -0
  188. package/dist/ipaddr.js +405 -0
  189. package/dist/ipaddr.js.map +1 -0
  190. package/dist/json.d.ts +70 -0
  191. package/dist/json.js +181 -0
  192. package/dist/json.js.map +1 -0
  193. package/dist/kernel-catch.d.ts +59 -0
  194. package/dist/kernel-catch.js +184 -0
  195. package/dist/kernel-catch.js.map +1 -0
  196. package/dist/kernel-float.d.ts +19 -0
  197. package/dist/kernel-float.js +54 -0
  198. package/dist/kernel-float.js.map +1 -0
  199. package/dist/kernel-fork.d.ts +30 -0
  200. package/dist/kernel-fork.js +72 -0
  201. package/dist/kernel-fork.js.map +1 -0
  202. package/dist/kernel-format.d.ts +27 -0
  203. package/dist/kernel-format.js +901 -0
  204. package/dist/kernel-format.js.map +1 -0
  205. package/dist/kernel-hash.d.ts +7 -0
  206. package/dist/kernel-hash.js +33 -0
  207. package/dist/kernel-hash.js.map +1 -0
  208. package/dist/kernel-integer.d.ts +49 -0
  209. package/dist/kernel-integer.js +170 -0
  210. package/dist/kernel-integer.js.map +1 -0
  211. package/dist/kernel-rand.d.ts +16 -0
  212. package/dist/kernel-rand.js +237 -0
  213. package/dist/kernel-rand.js.map +1 -0
  214. package/dist/kernel-system.d.ts +39 -0
  215. package/dist/kernel-system.js +103 -0
  216. package/dist/kernel-system.js.map +1 -0
  217. package/dist/kernel-warn.d.ts +35 -0
  218. package/dist/kernel-warn.js +73 -0
  219. package/dist/kernel-warn.js.map +1 -0
  220. package/dist/key-error.d.ts +44 -0
  221. package/dist/key-error.js +59 -0
  222. package/dist/key-error.js.map +1 -0
  223. package/dist/keyword-splat.d.ts +41 -0
  224. package/dist/keyword-splat.js +65 -0
  225. package/dist/keyword-splat.js.map +1 -0
  226. package/dist/load-error.d.ts +19 -0
  227. package/dist/load-error.js +19 -0
  228. package/dist/load-error.js.map +1 -0
  229. package/dist/load.d.ts +128 -0
  230. package/dist/load.js +278 -0
  231. package/dist/load.js.map +1 -0
  232. package/dist/loaded-features.d.ts +13 -0
  233. package/dist/loaded-features.js +15 -0
  234. package/dist/loaded-features.js.map +1 -0
  235. package/dist/local-jump-error.d.ts +12 -0
  236. package/dist/local-jump-error.js +12 -0
  237. package/dist/local-jump-error.js.map +1 -0
  238. package/dist/logger/formatter.d.ts +21 -0
  239. package/dist/logger/formatter.js +43 -0
  240. package/dist/logger/formatter.js.map +1 -0
  241. package/dist/logger/log-device.d.ts +52 -0
  242. package/dist/logger/log-device.js +104 -0
  243. package/dist/logger/log-device.js.map +1 -0
  244. package/dist/logger/severity.d.ts +23 -0
  245. package/dist/logger/severity.js +42 -0
  246. package/dist/logger/severity.js.map +1 -0
  247. package/dist/logger.d.ts +127 -0
  248. package/dist/logger.js +218 -0
  249. package/dist/logger.js.map +1 -0
  250. package/dist/marshal.d.ts +83 -0
  251. package/dist/marshal.js +1487 -0
  252. package/dist/marshal.js.map +1 -0
  253. package/dist/match-data.d.ts +161 -0
  254. package/dist/match-data.js +284 -0
  255. package/dist/match-data.js.map +1 -0
  256. package/dist/method-cache.d.ts +81 -0
  257. package/dist/method-cache.js +109 -0
  258. package/dist/method-cache.js.map +1 -0
  259. package/dist/method-missing-proxy.d.ts +53 -0
  260. package/dist/method-missing-proxy.js +154 -0
  261. package/dist/method-missing-proxy.js.map +1 -0
  262. package/dist/method.d.ts +132 -0
  263. package/dist/method.js +320 -0
  264. package/dist/method.js.map +1 -0
  265. package/dist/monitor.d.ts +114 -0
  266. package/dist/monitor.js +270 -0
  267. package/dist/monitor.js.map +1 -0
  268. package/dist/mutex.d.ts +51 -0
  269. package/dist/mutex.js +150 -0
  270. package/dist/mutex.js.map +1 -0
  271. package/dist/name-error.d.ts +45 -0
  272. package/dist/name-error.js +54 -0
  273. package/dist/name-error.js.map +1 -0
  274. package/dist/net/http/exceptions.d.ts +31 -0
  275. package/dist/net/http/exceptions.js +46 -0
  276. package/dist/net/http/exceptions.js.map +1 -0
  277. package/dist/net/http/request.d.ts +137 -0
  278. package/dist/net/http/request.js +559 -0
  279. package/dist/net/http/request.js.map +1 -0
  280. package/dist/net/http/requests.d.ts +197 -0
  281. package/dist/net/http/requests.js +197 -0
  282. package/dist/net/http/requests.js.map +1 -0
  283. package/dist/net/http/response.d.ts +141 -0
  284. package/dist/net/http/response.js +416 -0
  285. package/dist/net/http/response.js.map +1 -0
  286. package/dist/net/http/responses.d.ts +345 -0
  287. package/dist/net/http/responses.js +486 -0
  288. package/dist/net/http/responses.js.map +1 -0
  289. package/dist/net/http.d.ts +278 -0
  290. package/dist/net/http.js +760 -0
  291. package/dist/net/http.js.map +1 -0
  292. package/dist/net/protocol.d.ts +227 -0
  293. package/dist/net/protocol.js +392 -0
  294. package/dist/net/protocol.js.map +1 -0
  295. package/dist/nil-class.d.ts +10 -0
  296. package/dist/nil-class.js +27 -0
  297. package/dist/nil-class.js.map +1 -0
  298. package/dist/no-method-error.d.ts +38 -0
  299. package/dist/no-method-error.js +45 -0
  300. package/dist/no-method-error.js.map +1 -0
  301. package/dist/not-implemented-error.d.ts +13 -0
  302. package/dist/not-implemented-error.js +13 -0
  303. package/dist/not-implemented-error.js.map +1 -0
  304. package/dist/numeric-class.d.ts +29 -0
  305. package/dist/numeric-class.js +41 -0
  306. package/dist/numeric-class.js.map +1 -0
  307. package/dist/numeric.d.ts +226 -0
  308. package/dist/numeric.js +848 -0
  309. package/dist/numeric.js.map +1 -0
  310. package/dist/object-space.d.ts +34 -0
  311. package/dist/object-space.js +152 -0
  312. package/dist/object-space.js.map +1 -0
  313. package/dist/object.d.ts +833 -0
  314. package/dist/object.js +2131 -0
  315. package/dist/object.js.map +1 -0
  316. package/dist/open-uri.d.ts +180 -0
  317. package/dist/open-uri.js +402 -0
  318. package/dist/open-uri.js.map +1 -0
  319. package/dist/open3.d.ts +69 -0
  320. package/dist/open3.js +134 -0
  321. package/dist/open3.js.map +1 -0
  322. package/dist/openssl.d.ts +479 -0
  323. package/dist/openssl.js +1052 -0
  324. package/dist/openssl.js.map +1 -0
  325. package/dist/optparse.d.ts +130 -0
  326. package/dist/optparse.js +457 -0
  327. package/dist/optparse.js.map +1 -0
  328. package/dist/os-adapter.d.ts +20 -0
  329. package/dist/os-adapter.js +95 -0
  330. package/dist/os-adapter.js.map +1 -0
  331. package/dist/pathname.d.ts +73 -0
  332. package/dist/pathname.js +412 -0
  333. package/dist/pathname.js.map +1 -0
  334. package/dist/pp.d.ts +60 -0
  335. package/dist/pp.js +195 -0
  336. package/dist/pp.js.map +1 -0
  337. package/dist/pretty-print.d.ts +89 -0
  338. package/dist/pretty-print.js +232 -0
  339. package/dist/pretty-print.js.map +1 -0
  340. package/dist/process-adapter.d.ts +229 -0
  341. package/dist/process-adapter.js +889 -0
  342. package/dist/process-adapter.js.map +1 -0
  343. package/dist/process.d.ts +202 -0
  344. package/dist/process.js +433 -0
  345. package/dist/process.js.map +1 -0
  346. package/dist/psych/class-loader.d.ts +92 -0
  347. package/dist/psych/class-loader.js +139 -0
  348. package/dist/psych/class-loader.js.map +1 -0
  349. package/dist/psych/coder.d.ts +144 -0
  350. package/dist/psych/coder.js +176 -0
  351. package/dist/psych/coder.js.map +1 -0
  352. package/dist/psych/core-ext.d.ts +8 -0
  353. package/dist/psych/core-ext.js +10 -0
  354. package/dist/psych/core-ext.js.map +1 -0
  355. package/dist/psych/emitter.d.ts +116 -0
  356. package/dist/psych/emitter.js +1130 -0
  357. package/dist/psych/emitter.js.map +1 -0
  358. package/dist/psych/exception.d.ts +43 -0
  359. package/dist/psych/exception.js +54 -0
  360. package/dist/psych/exception.js.map +1 -0
  361. package/dist/psych/handler.d.ts +59 -0
  362. package/dist/psych/handler.js +95 -0
  363. package/dist/psych/handler.js.map +1 -0
  364. package/dist/psych/handlers/document-stream.d.ts +17 -0
  365. package/dist/psych/handlers/document-stream.js +26 -0
  366. package/dist/psych/handlers/document-stream.js.map +1 -0
  367. package/dist/psych/nodes/alias.d.ts +15 -0
  368. package/dist/psych/nodes/alias.js +22 -0
  369. package/dist/psych/nodes/alias.js.map +1 -0
  370. package/dist/psych/nodes/document.d.ts +23 -0
  371. package/dist/psych/nodes/document.js +35 -0
  372. package/dist/psych/nodes/document.js.map +1 -0
  373. package/dist/psych/nodes/mapping.d.ts +25 -0
  374. package/dist/psych/nodes/mapping.js +35 -0
  375. package/dist/psych/nodes/mapping.js.map +1 -0
  376. package/dist/psych/nodes/node.d.ts +59 -0
  377. package/dist/psych/nodes/node.js +79 -0
  378. package/dist/psych/nodes/node.js.map +1 -0
  379. package/dist/psych/nodes/scalar.d.ts +35 -0
  380. package/dist/psych/nodes/scalar.js +47 -0
  381. package/dist/psych/nodes/scalar.js.map +1 -0
  382. package/dist/psych/nodes/sequence.d.ts +25 -0
  383. package/dist/psych/nodes/sequence.js +35 -0
  384. package/dist/psych/nodes/sequence.js.map +1 -0
  385. package/dist/psych/nodes/stream.d.ts +23 -0
  386. package/dist/psych/nodes/stream.js +31 -0
  387. package/dist/psych/nodes/stream.js.map +1 -0
  388. package/dist/psych/omap.d.ts +9 -0
  389. package/dist/psych/omap.js +9 -0
  390. package/dist/psych/omap.js.map +1 -0
  391. package/dist/psych/parser.d.ts +41 -0
  392. package/dist/psych/parser.js +139 -0
  393. package/dist/psych/parser.js.map +1 -0
  394. package/dist/psych/scalar-scanner.d.ts +31 -0
  395. package/dist/psych/scalar-scanner.js +169 -0
  396. package/dist/psych/scalar-scanner.js.map +1 -0
  397. package/dist/psych/syntax-error.d.ts +23 -0
  398. package/dist/psych/syntax-error.js +35 -0
  399. package/dist/psych/syntax-error.js.map +1 -0
  400. package/dist/psych/tree-builder.d.ts +51 -0
  401. package/dist/psych/tree-builder.js +118 -0
  402. package/dist/psych/tree-builder.js.map +1 -0
  403. package/dist/psych/visitors/depth-first.d.ts +27 -0
  404. package/dist/psych/visitors/depth-first.js +37 -0
  405. package/dist/psych/visitors/depth-first.js.map +1 -0
  406. package/dist/psych/visitors/emitter.d.ts +32 -0
  407. package/dist/psych/visitors/emitter.js +63 -0
  408. package/dist/psych/visitors/emitter.js.map +1 -0
  409. package/dist/psych/visitors/to-ruby.d.ts +110 -0
  410. package/dist/psych/visitors/to-ruby.js +396 -0
  411. package/dist/psych/visitors/to-ruby.js.map +1 -0
  412. package/dist/psych/visitors/visitor.d.ts +11 -0
  413. package/dist/psych/visitors/visitor.js +17 -0
  414. package/dist/psych/visitors/visitor.js.map +1 -0
  415. package/dist/psych/visitors/yaml-tree.d.ts +182 -0
  416. package/dist/psych/visitors/yaml-tree.js +593 -0
  417. package/dist/psych/visitors/yaml-tree.js.map +1 -0
  418. package/dist/psych-adapter.d.ts +65 -0
  419. package/dist/psych-adapter.js +121 -0
  420. package/dist/psych-adapter.js.map +1 -0
  421. package/dist/psych-yaml.d.ts +2 -0
  422. package/dist/psych-yaml.js +5 -0
  423. package/dist/psych-yaml.js.map +1 -0
  424. package/dist/psych.d.ts +257 -0
  425. package/dist/psych.js +332 -0
  426. package/dist/psych.js.map +1 -0
  427. package/dist/queue.d.ts +137 -0
  428. package/dist/queue.js +236 -0
  429. package/dist/queue.js.map +1 -0
  430. package/dist/racc/parser.d.ts +70 -0
  431. package/dist/racc/parser.js +206 -0
  432. package/dist/racc/parser.js.map +1 -0
  433. package/dist/range-error.d.ts +15 -0
  434. package/dist/range-error.js +15 -0
  435. package/dist/range-error.js.map +1 -0
  436. package/dist/range.d.ts +166 -0
  437. package/dist/range.js +421 -0
  438. package/dist/range.js.map +1 -0
  439. package/dist/rational.d.ts +168 -0
  440. package/dist/rational.js +587 -0
  441. package/dist/rational.js.map +1 -0
  442. package/dist/rb-config.d.ts +33 -0
  443. package/dist/rb-config.js +53 -0
  444. package/dist/rb-config.js.map +1 -0
  445. package/dist/rb-equal.d.ts +66 -0
  446. package/dist/rb-equal.js +262 -0
  447. package/dist/rb-equal.js.map +1 -0
  448. package/dist/rb-hash.d.ts +26 -0
  449. package/dist/rb-hash.js +108 -0
  450. package/dist/rb-hash.js.map +1 -0
  451. package/dist/regexp.d.ts +82 -0
  452. package/dist/regexp.js +191 -0
  453. package/dist/regexp.js.map +1 -0
  454. package/dist/repl-adapter.d.ts +270 -0
  455. package/dist/repl-adapter.js +562 -0
  456. package/dist/repl-adapter.js.map +1 -0
  457. package/dist/resolv.d.ts +30 -0
  458. package/dist/resolv.js +48 -0
  459. package/dist/resolv.js.map +1 -0
  460. package/dist/ruby-empty.d.ts +28 -0
  461. package/dist/ruby-empty.js +40 -0
  462. package/dist/ruby-empty.js.map +1 -0
  463. package/dist/ruby-platform.d.ts +39 -0
  464. package/dist/ruby-platform.js +49 -0
  465. package/dist/ruby-platform.js.map +1 -0
  466. package/dist/runtime-error.d.ts +15 -0
  467. package/dist/runtime-error.js +15 -0
  468. package/dist/runtime-error.js.map +1 -0
  469. package/dist/scheduled-task.d.ts +73 -0
  470. package/dist/scheduled-task.js +150 -0
  471. package/dist/scheduled-task.js.map +1 -0
  472. package/dist/secure-random.d.ts +50 -0
  473. package/dist/secure-random.js +141 -0
  474. package/dist/secure-random.js.map +1 -0
  475. package/dist/set.d.ts +158 -0
  476. package/dist/set.js +352 -0
  477. package/dist/set.js.map +1 -0
  478. package/dist/shellwords.d.ts +27 -0
  479. package/dist/shellwords.js +53 -0
  480. package/dist/shellwords.js.map +1 -0
  481. package/dist/signal-exception.d.ts +43 -0
  482. package/dist/signal-exception.js +88 -0
  483. package/dist/signal-exception.js.map +1 -0
  484. package/dist/socket.d.ts +230 -0
  485. package/dist/socket.js +484 -0
  486. package/dist/socket.js.map +1 -0
  487. package/dist/standard-error.d.ts +27 -0
  488. package/dist/standard-error.js +49 -0
  489. package/dist/standard-error.js.map +1 -0
  490. package/dist/stop-iteration.d.ts +10 -0
  491. package/dist/stop-iteration.js +10 -0
  492. package/dist/stop-iteration.js.map +1 -0
  493. package/dist/string/b.d.ts +19 -0
  494. package/dist/string/b.js +28 -0
  495. package/dist/string/b.js.map +1 -0
  496. package/dist/string/byte-methods.d.ts +57 -0
  497. package/dist/string/byte-methods.js +266 -0
  498. package/dist/string/byte-methods.js.map +1 -0
  499. package/dist/string/bytes.d.ts +35 -0
  500. package/dist/string/bytes.js +123 -0
  501. package/dist/string/bytes.js.map +1 -0
  502. package/dist/string/case-mapping.d.ts +57 -0
  503. package/dist/string/case-mapping.js +192 -0
  504. package/dist/string/case-mapping.js.map +1 -0
  505. package/dist/string/chomp.d.ts +15 -0
  506. package/dist/string/chomp.js +32 -0
  507. package/dist/string/chomp.js.map +1 -0
  508. package/dist/string/convert.d.ts +55 -0
  509. package/dist/string/convert.js +316 -0
  510. package/dist/string/convert.js.map +1 -0
  511. package/dist/string/delete.d.ts +14 -0
  512. package/dist/string/delete.js +17 -0
  513. package/dist/string/delete.js.map +1 -0
  514. package/dist/string/each.d.ts +108 -0
  515. package/dist/string/each.js +305 -0
  516. package/dist/string/each.js.map +1 -0
  517. package/dist/string/encode.d.ts +37 -0
  518. package/dist/string/encode.js +268 -0
  519. package/dist/string/encode.js.map +1 -0
  520. package/dist/string/force-encoding.d.ts +72 -0
  521. package/dist/string/force-encoding.js +147 -0
  522. package/dist/string/force-encoding.js.map +1 -0
  523. package/dist/string/inspect.d.ts +17 -0
  524. package/dist/string/inspect.js +81 -0
  525. package/dist/string/inspect.js.map +1 -0
  526. package/dist/string/method-table.d.ts +174 -0
  527. package/dist/string/method-table.js +805 -0
  528. package/dist/string/method-table.js.map +1 -0
  529. package/dist/string/scrub.d.ts +12 -0
  530. package/dist/string/scrub.js +33 -0
  531. package/dist/string/scrub.js.map +1 -0
  532. package/dist/string/slice.d.ts +26 -0
  533. package/dist/string/slice.js +73 -0
  534. package/dist/string/slice.js.map +1 -0
  535. package/dist/string/split.d.ts +11 -0
  536. package/dist/string/split.js +44 -0
  537. package/dist/string/split.js.map +1 -0
  538. package/dist/string/sub.d.ts +114 -0
  539. package/dist/string/sub.js +371 -0
  540. package/dist/string/sub.js.map +1 -0
  541. package/dist/string/succ.d.ts +14 -0
  542. package/dist/string/succ.js +118 -0
  543. package/dist/string/succ.js.map +1 -0
  544. package/dist/string/support.d.ts +142 -0
  545. package/dist/string/support.js +296 -0
  546. package/dist/string/support.js.map +1 -0
  547. package/dist/string/tr.d.ts +46 -0
  548. package/dist/string/tr.js +156 -0
  549. package/dist/string/tr.js.map +1 -0
  550. package/dist/string-io.d.ts +166 -0
  551. package/dist/string-io.js +248 -0
  552. package/dist/string-io.js.map +1 -0
  553. package/dist/string-scanner.d.ts +133 -0
  554. package/dist/string-scanner.js +248 -0
  555. package/dist/string-scanner.js.map +1 -0
  556. package/dist/struct.d.ts +54 -0
  557. package/dist/struct.js +222 -0
  558. package/dist/struct.js.map +1 -0
  559. package/dist/symbol.d.ts +48 -0
  560. package/dist/symbol.js +107 -0
  561. package/dist/symbol.js.map +1 -0
  562. package/dist/tempfile.d.ts +173 -0
  563. package/dist/tempfile.js +295 -0
  564. package/dist/tempfile.js.map +1 -0
  565. package/dist/temporal-tag.d.ts +23 -0
  566. package/dist/temporal-tag.js +29 -0
  567. package/dist/temporal-tag.js.map +1 -0
  568. package/dist/thread-error.d.ts +13 -0
  569. package/dist/thread-error.js +13 -0
  570. package/dist/thread-error.js.map +1 -0
  571. package/dist/thread-pool-executor.d.ts +121 -0
  572. package/dist/thread-pool-executor.js +254 -0
  573. package/dist/thread-pool-executor.js.map +1 -0
  574. package/dist/thread.d.ts +211 -0
  575. package/dist/thread.js +495 -0
  576. package/dist/thread.js.map +1 -0
  577. package/dist/timeout.d.ts +29 -0
  578. package/dist/timeout.js +41 -0
  579. package/dist/timeout.js.map +1 -0
  580. package/dist/tse.d.ts +40 -0
  581. package/dist/tse.js +66 -0
  582. package/dist/tse.js.map +1 -0
  583. package/dist/type-error.d.ts +14 -0
  584. package/dist/type-error.js +14 -0
  585. package/dist/type-error.js.map +1 -0
  586. package/dist/undefined-conversion-error.d.ts +10 -0
  587. package/dist/undefined-conversion-error.js +10 -0
  588. package/dist/undefined-conversion-error.js.map +1 -0
  589. package/dist/uri/common.d.ts +209 -0
  590. package/dist/uri/common.js +369 -0
  591. package/dist/uri/common.js.map +1 -0
  592. package/dist/uri/generic.d.ts +280 -0
  593. package/dist/uri/generic.js +806 -0
  594. package/dist/uri/generic.js.map +1 -0
  595. package/dist/uri/http.d.ts +23 -0
  596. package/dist/uri/http.js +30 -0
  597. package/dist/uri/http.js.map +1 -0
  598. package/dist/uri/https.d.ts +13 -0
  599. package/dist/uri/https.js +15 -0
  600. package/dist/uri/https.js.map +1 -0
  601. package/dist/uri/rfc2396-parser.d.ts +70 -0
  602. package/dist/uri/rfc2396-parser.js +264 -0
  603. package/dist/uri/rfc2396-parser.js.map +1 -0
  604. package/dist/uri/rfc3986-parser.d.ts +46 -0
  605. package/dist/uri/rfc3986-parser.js +171 -0
  606. package/dist/uri/rfc3986-parser.js.map +1 -0
  607. package/dist/uri.d.ts +13 -0
  608. package/dist/uri.js +13 -0
  609. package/dist/uri.js.map +1 -0
  610. package/dist/variable.d.ts +183 -0
  611. package/dist/variable.js +463 -0
  612. package/dist/variable.js.map +1 -0
  613. package/dist/verbose.d.ts +39 -0
  614. package/dist/verbose.js +49 -0
  615. package/dist/verbose.js.map +1 -0
  616. package/dist/yaml.d.ts +9 -0
  617. package/dist/yaml.js +9 -0
  618. package/dist/yaml.js.map +1 -0
  619. package/dist/zlib-adapter.d.ts +119 -0
  620. package/dist/zlib-adapter.js +230 -0
  621. package/dist/zlib-adapter.js.map +1 -0
  622. package/dist/zlib.d.ts +299 -0
  623. package/dist/zlib.js +679 -0
  624. package/dist/zlib.js.map +1 -0
  625. package/package.json +172 -3
@@ -0,0 +1,587 @@
1
+ /**
2
+ * Ruby's `Rational` (`vendor/ruby/v3.3.11/rational.c:481` `nurat_s_canonicalize_internal`)
3
+ * and the `Kernel#Rational()` conversion function beside it
4
+ * (`vendor/ruby/v3.3.11/rational.c:2691` `nurat_s_convert`). Ruby has both spellings
5
+ * and Rails calls the function, so both ship here.
6
+ */
7
+ import { ArgumentError } from "./argument-error.js";
8
+ import { classpaths } from "./classpath.js";
9
+ import { FloatDomainError } from "./float-domain-error.js";
10
+ import { FrozenError } from "./frozen-error.js";
11
+ import { warn } from "./kernel-warn.js";
12
+ import { rbIntegerTypeP } from "./numeric.js";
13
+ import { rbModDefineMethod } from "./method-cache.js";
14
+ import { rbCFloat, rbCInteger, rbCNumeric } from "./numeric-class.js";
15
+ import { rbBuiltinClassName, rbFSend, rbInspect, rbObjClassname, rbObjIvarGet, rbObjIvarSet, rtest, } from "./object.js";
16
+ import { rbEqual } from "./rb-equal.js";
17
+ import { TypeError } from "./type-error.js";
18
+ /** Ruby core `ZeroDivisionError`, what `rb_num_zerodiv`
19
+ * (`vendor/ruby/v3.3.11/numeric.c:206`) raises for a denominator of zero.
20
+ *
21
+ * @noRailsEquivalent PERMANENT — Ruby core; Rails defines no such error. */
22
+ export class ZeroDivisionError extends Error {
23
+ constructor(message) {
24
+ super(message);
25
+ this.name = "ZeroDivisionError";
26
+ }
27
+ }
28
+ /** @internal `vendor/ruby/v3.3.11/rational.c:292` `i_gcd`, the greatest common divisor a
29
+ * Rational reduces by. */
30
+ function iGcd(x, y) {
31
+ if (x < 0n)
32
+ x = -x;
33
+ if (y < 0n)
34
+ y = -y;
35
+ while (y !== 0n) {
36
+ const t = x % y;
37
+ x = y;
38
+ y = t;
39
+ }
40
+ return x;
41
+ }
42
+ /**
43
+ * @internal `vendor/ruby/v3.3.11/rational.c:2199` `float_to_r`, which decodes a Float
44
+ * into the exact `f * 2 ** e` its bits already hold
45
+ * (`vendor/ruby/v3.3.11/numeric.c` `float_decode_internal`, i.e. `frexp`) and answers
46
+ * `f` over `2 ** -e`. A double IS a binary fraction, so doubling until the
47
+ * value is whole is that decode with no rounding in it, and it stops inside
48
+ * `Number.MAX_SAFE_INTEGER` because a mantissa is 53 bits wide. An Integer — a
49
+ * `bigint`, or a `number` `Integer#===` would accept — is itself over one, the
50
+ * `nurat_convert` Integer arm. `float_decode_internal` refuses a non-finite
51
+ * Float with a `FloatDomainError`.
52
+ */
53
+ function floatToR(x) {
54
+ if (typeof x === "bigint" || Number.isInteger(x)) {
55
+ return { numerator: BigInt(x), denominator: 1n };
56
+ }
57
+ if (!Number.isFinite(x))
58
+ throw new FloatDomainError(String(x));
59
+ let f = x;
60
+ let e = 1n;
61
+ while (!Number.isInteger(f)) {
62
+ f *= 2;
63
+ e *= 2n;
64
+ }
65
+ return { numerator: BigInt(f), denominator: e };
66
+ }
67
+ /**
68
+ * Ruby's `Rational` (`vendor/ruby/v3.3.11/rational.c`), as much of it as its callers
69
+ * need: the constructor canonicalizes to lowest terms
70
+ * (`vendor/ruby/v3.3.11/rational.c:481` `nurat_s_canonicalize_internal`), `+` adds an
71
+ * Integer (`vendor/ruby/v3.3.11/rational.c:724` `rb_rational_plus`), and
72
+ * `numerator`/`denominator` read the parts back out. A Rational stays a
73
+ * Rational under arithmetic in Ruby — on ruby 3.3.11 `(Rational(1,2) * 12).class`
74
+ * is `Rational`, `(6/1)`, and so is `Rational(9,3)` — so a ported `FIXNUM_P`
75
+ * branch is NOT reached by a reducible Rational and this class matches by
76
+ * staying a Rational too. Nothing in `rational.c` folds a denominator of one to
77
+ * an Integer; the date gem spells that fold out inline where it wants it
78
+ * (`date_parse.c:531-534`), and where a body TESTS for it it sends
79
+ * `wholenum_p`, which is a predicate, not a conversion.
80
+ *
81
+ * @noRailsEquivalent PERMANENT — Ruby core. Rails defines no Rational; it
82
+ * inherits Ruby's, and `Date._parse` answers one for a fractional-hour
83
+ * `:offset`, so trails needs the value type to answer the same.
84
+ */
85
+ export class Rational extends rbCNumeric {
86
+ /** `vendor/ruby/v3.3.11/rational.c:580` `nurat_numerator` (`Rational#numerator`).
87
+ *
88
+ * Ruby's is an Integer — arbitrary precision — so a `bigint` is the JS
89
+ * analogue, not a `number`: a `number` is exact only inside
90
+ * `Number.MAX_SAFE_INTEGER` and a parsed fraction literal of more than
91
+ * sixteen digits (`date_parse.c:2319-2325`) runs straight past it.
92
+ *
93
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
94
+ numerator;
95
+ /** `vendor/ruby/v3.3.11/rational.c:598` `nurat_denominator` (`Rational#denominator`).
96
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
97
+ denominator;
98
+ /**
99
+ * `vendor/ruby/v3.3.11/rational.c:481` `nurat_s_canonicalize_internal`, the C
100
+ * constructor every `Rational` goes through — there is no public
101
+ * `Rational.new` in Ruby, so this is `rb_rational_new`
102
+ * (`vendor/ruby/v3.3.11/rational.c:1969`) rather than a method with a Ruby name.
103
+ * A Float argument goes through `float_to_r` ({@link floatToR}) — the
104
+ * `nurat_convert` division arm, so `new Rational(0.5, 86400)` is `(1/172800)`
105
+ * on ruby 3.3.11.
106
+ *
107
+ * `nurat_canonicalize` (`vendor/ruby/v3.3.11/rational.c:457`) puts the SIGN on the
108
+ * numerator before `nurat_reduce` cancels: it negates BOTH parts on a
109
+ * negative denominator, which is why `Rational(3, -4)` is `(-3/4)` on ruby
110
+ * 3.3.11 and not `(3/-4)`, and raises `rb_num_zerodiv` on a zero one.
111
+ *
112
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
113
+ constructor(num, den) {
114
+ super();
115
+ const a = floatToR(num);
116
+ const b = floatToR(den);
117
+ let n = a.numerator * b.denominator;
118
+ let d = a.denominator * b.numerator;
119
+ if (d < 0n) {
120
+ n = -n;
121
+ d = -d;
122
+ }
123
+ else if (d === 0n) {
124
+ throw new ZeroDivisionError("divided by 0");
125
+ }
126
+ const g = iGcd(n, d);
127
+ this.numerator = n / g;
128
+ this.denominator = d / g;
129
+ }
130
+ /** `vendor/ruby/v3.3.11/rational.c:1075` `rb_rational_cmp` (`Rational#<=>`), which
131
+ * compares `a.num * b.den` against `b.num * a.den` — exact, where a `toF`
132
+ * comparison would not be. Its T_FLOAT arm, `f_cmp(f_to_f(self), other)`,
133
+ * takes both sides to Float instead, and it is the only arm a non-integral
134
+ * operand has.
135
+ *
136
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
137
+ cmp(other) {
138
+ if (typeof other === "number" && !Number.isInteger(other)) {
139
+ const f = this.toF();
140
+ return f === other ? 0 : f < other ? -1 : 1;
141
+ }
142
+ const b = other instanceof Rational ? other : new Rational(other, 1);
143
+ const a = this.numerator * b.denominator;
144
+ const c = b.numerator * this.denominator;
145
+ if (a === c)
146
+ return 0;
147
+ return a < c ? -1 : 1;
148
+ }
149
+ /** `vendor/ruby/v3.3.11/rational.c:724` `rb_rational_plus` (`Rational#+`), for the
150
+ * Integer and Rational addends this port needs.
151
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
152
+ add(other) {
153
+ if (other instanceof Rational) {
154
+ return new Rational(this.numerator * other.denominator + other.numerator * this.denominator, this.denominator * other.denominator);
155
+ }
156
+ return new Rational(this.numerator + BigInt(other) * this.denominator, this.denominator);
157
+ }
158
+ /** `vendor/ruby/v3.3.11/rational.c:1128` `nurat_eqeq_p` (`Rational#==`). A Float
159
+ * operand compares as a double; anything else is asked `other == self`.
160
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
161
+ equals(other) {
162
+ if (rbIntegerTypeP(other)) {
163
+ if (this.numerator === 0n && BigInt(other) === 0n)
164
+ return true;
165
+ if (this.denominator !== 1n)
166
+ return false;
167
+ return this.numerator === BigInt(other);
168
+ }
169
+ else if (other instanceof Number || typeof other === "number") {
170
+ return this.toF() === other.valueOf();
171
+ }
172
+ else if (other instanceof Rational) {
173
+ if (this.numerator === 0n && other.numerator === 0n)
174
+ return true;
175
+ return this.numerator === other.numerator && this.denominator === other.denominator;
176
+ }
177
+ else {
178
+ return rbEqual(other, this);
179
+ }
180
+ }
181
+ /** `vendor/ruby/v3.3.11/rational.c:1170` `nurat_coerce` (`Rational#coerce`), for the
182
+ * Integer, Float and Rational operands this port needs.
183
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
184
+ coerce(other) {
185
+ if (rbIntegerTypeP(other))
186
+ return [new Rational(other, 1), this];
187
+ else if (other instanceof Number || typeof other === "number")
188
+ return [other, this.toF()];
189
+ else if (other instanceof Rational)
190
+ return [other, this];
191
+ throw new TypeError(`${rbObjClassname(other)} can't be coerced into Rational`);
192
+ }
193
+ /** `vendor/ruby/v3.3.11/rational.c:861` `rb_rational_mul` (`Rational#*`), for the
194
+ * Integer multiplier this port needs. `f_muldiv`
195
+ * (`vendor/ruby/v3.3.11/rational.c:794`) cancels the multiplier against the
196
+ * denominator BEFORE it multiplies.
197
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
198
+ mul(other) {
199
+ const o = BigInt(other);
200
+ const g = iGcd(o, this.denominator);
201
+ return new Rational(this.numerator * (o / g), this.denominator / g);
202
+ }
203
+ /** `vendor/ruby/v3.3.11/rational.c:903` `rb_rational_div` (`Rational#/`), for an
204
+ * Integer or Rational divisor (`f_muldiv`), the Integer one cancelled the same way {@link mul} is.
205
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
206
+ quo(other) {
207
+ if (other instanceof Rational) {
208
+ return new Rational(this.numerator * other.denominator, this.denominator * other.numerator);
209
+ }
210
+ const o = BigInt(other);
211
+ const g = iGcd(this.numerator, o);
212
+ return new Rational(this.numerator / g, this.denominator * (o / g));
213
+ }
214
+ /** `vendor/ruby/v3.3.11/numeric.c:828` `num_zero_p` (`Rational#zero?`, inherited from
215
+ * Numeric), what `date_core.c`'s `f_zero_p` dispatches to for a Rational.
216
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
217
+ isZero() {
218
+ return this.numerator === 0n;
219
+ }
220
+ /** `vendor/ruby/v3.3.11/numeric.c:659` `num_div` (`Rational#div`, inherited from
221
+ * Numeric), the floored quotient — the method `date_core.c`'s `f_idiv` macro
222
+ * sends (`date_core.c:43`) — for the Integer divisor this port needs.
223
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
224
+ div(other) {
225
+ const den = this.denominator * BigInt(other);
226
+ const q = this.numerator / den;
227
+ return Number(this.numerator % den !== 0n && this.numerator < 0n !== den < 0n ? q - 1n : q);
228
+ }
229
+ /** `vendor/ruby/v3.3.11/numeric.c:700` `num_modulo` (`Rational#%`, inherited from
230
+ * Numeric), which is `self - other * (self.div other)` there too — what
231
+ * `date_core.c`'s `f_mod` dispatches to for a Rational — for the Integer
232
+ * and Rational divisors this port needs (`time.c`'s `modv`).
233
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
234
+ mod(other) {
235
+ const b = other instanceof Rational ? other : new Rational(other, 1);
236
+ const num = this.numerator * b.denominator;
237
+ const den = this.denominator * b.numerator;
238
+ const q = num / den - (num % den !== 0n && num < 0n !== den < 0n ? 1n : 0n);
239
+ return this.add(new Rational(-b.numerator * q, b.denominator));
240
+ }
241
+ /** `vendor/ruby/v3.3.11/rational.c:1278` `nurat_truncate` (`Rational#to_i`), which
242
+ * truncates toward zero.
243
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
244
+ toI() {
245
+ return Number(this.numerator / this.denominator);
246
+ }
247
+ /** `vendor/ruby/v3.3.11/rational.c:1287` `nurat_round_half_up` (`Rational#round`),
248
+ * which rounds half away from zero.
249
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
250
+ round() {
251
+ const q = this.numerator / this.denominator;
252
+ const r = this.numerator % this.denominator;
253
+ const half = (r < 0n ? -r : r) * 2n >= (this.denominator < 0n ? -this.denominator : this.denominator);
254
+ return Number(half ? q + (r < 0n !== this.denominator < 0n ? -1n : 1n) : q);
255
+ }
256
+ /** The `Float` a Rational becomes at a `number` seam —
257
+ * `vendor/ruby/v3.3.11/rational.c:1576` `nurat_to_f`, which is what every reader that
258
+ * hands the value to a floating-point API needs.
259
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
260
+ toF() {
261
+ return Number(this.numerator) / Number(this.denominator);
262
+ }
263
+ /** `vendor/ruby/v3.3.11/rational.c:1802` `nurat_to_s` (`Rational#to_s`).
264
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
265
+ toString() {
266
+ return `${this.numerator}/${this.denominator}`;
267
+ }
268
+ /** `vendor/ruby/v3.3.11/rational.c:1818` `nurat_inspect` (`Rational#inspect`), which
269
+ * parenthesizes where {@link toString} does not.
270
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
271
+ inspect() {
272
+ return `(${this.toString()})`;
273
+ }
274
+ /** `vendor/ruby/v3.3.11/rational.c:1857` `nurat_marshal_dump` (`Rational#marshal_dump`).
275
+ * Its `rb_copy_generic_ivar(a, self)` has no ivar table to write: a JS Array
276
+ * holds no ivars, which is why `has_ivars` (`vendor/ruby/v3.3.11/marshal.c:713`)
277
+ * counts none on one.
278
+ * @noRailsEquivalent PERMANENT — Ruby core, part of the Rational above. */
279
+ marshalDump() {
280
+ const a = [this.numerator, this.denominator];
281
+ return a;
282
+ }
283
+ }
284
+ /** @internal `vendor/ruby/v3.3.11/rational.c:439` `nurat_int_check`. It admits a
285
+ * Numeric answering `integer?`, which `nurat_canonicalize` then `assert`s is
286
+ * an Integer (`vendor/ruby/v3.3.11/rational.c:459-460`); the narrowing is that
287
+ * assertion, and `BigInt()` raises for a value that fails it. */
288
+ function nuratIntCheck(num) {
289
+ if (!rbIntegerTypeP(num)) {
290
+ if (!(num instanceof rbCNumeric) || !rtest(rbFSend(num, "isInteger"))) {
291
+ throw new TypeError("not an integer");
292
+ }
293
+ }
294
+ }
295
+ /** @internal `vendor/ruby/v3.3.11/rational.c:457` `nurat_canonicalize`, answering
296
+ * the pair its two out-parameters hold. */
297
+ function nuratCanonicalize(num, den) {
298
+ if (den < 0n) {
299
+ num = -num;
300
+ den = -den;
301
+ }
302
+ else if (den === 0n) {
303
+ throw new ZeroDivisionError("divided by 0");
304
+ }
305
+ return [num, den];
306
+ }
307
+ /** @internal `Rational::compatible` (`vendor/ruby/v3.3.11/rational.c:2806`), the
308
+ * class `Marshal.load` allocates in a Rational's place and sends `marshal_load`. */
309
+ class compatible {
310
+ /** `vendor/ruby/v3.3.11/rational.c:1869` `nurat_marshal_load`.
311
+ * @noRailsEquivalent PERMANENT */
312
+ marshalLoad(a) {
313
+ if (Object.isFrozen(this)) {
314
+ throw new FrozenError(`can't modify frozen ${rbObjClassname(this)}: ${rbInspect(this)}`);
315
+ }
316
+ if (!Array.isArray(a)) {
317
+ throw new TypeError(`wrong argument type ${rbBuiltinClassName(a)} (expected Array)`);
318
+ }
319
+ if (a.length !== 2) {
320
+ throw new ArgumentError(`marshaled rational must have an array whose length is 2 but ${a.length}`);
321
+ }
322
+ let num = a[0];
323
+ let den = a[1];
324
+ nuratIntCheck(num);
325
+ nuratIntCheck(den);
326
+ [num, den] = nuratCanonicalize(BigInt(num), BigInt(den));
327
+ rbObjIvarSet(this, "@numerator", num);
328
+ rbObjIvarSet(this, "@denominator", den);
329
+ return this;
330
+ }
331
+ }
332
+ Rational.compatible = compatible;
333
+ /**
334
+ * `vendor/ruby/v3.3.11/rational.c:1831` `nurat_dumper`.
335
+ *
336
+ * @noRailsEquivalent PERMANENT
337
+ */
338
+ export function nuratDumper(self) {
339
+ return self;
340
+ }
341
+ /**
342
+ * `vendor/ruby/v3.3.11/rational.c:1838` `nurat_loader`. `nurat_marshal_load`
343
+ * leaves the pair canonical and not reduced, and so does this.
344
+ *
345
+ * @noRailsEquivalent PERMANENT
346
+ */
347
+ export function nuratLoader(self, a) {
348
+ let num = rbObjIvarGet(a, "@numerator");
349
+ let den = rbObjIvarGet(a, "@denominator");
350
+ nuratIntCheck(num);
351
+ nuratIntCheck(den);
352
+ [num, den] = nuratCanonicalize(BigInt(num), BigInt(den));
353
+ const dat = self;
354
+ dat.numerator = num;
355
+ dat.denominator = den;
356
+ Object.freeze(self);
357
+ return self;
358
+ }
359
+ /**
360
+ * `Kernel#Rational()` — `vendor/ruby/v3.3.11/rational.c:2691` `nurat_s_convert`, whose
361
+ * `rb_scan_args(argc, argv, "11", ...)` makes the denominator optional and
362
+ * defaults it to `ONE` (`vendor/ruby/v3.3.11/rational.c:2674`) before handing both to
363
+ * `nurat_s_canonicalize_internal`. It is the spelling Rails writes — 20 call
364
+ * sites across activesupport and activerecord — and it is NOT an Integer fold:
365
+ * on ruby 3.3.11 `Rational(6, 1)` is `(6/1)` and its class is `Rational`.
366
+ *
367
+ * A Rational numerator is NOT canonicalized against the denominator:
368
+ * `nurat_convert` (`vendor/ruby/v3.3.11/rational.c:2621`) returns it unchanged for an
369
+ * exact-one denominator, and otherwise leaves the canonicalizer for `f_div`
370
+ * (`vendor/ruby/v3.3.11/rational.c:2668`), so `Rational(r, 1000000)` is a division.
371
+ *
372
+ * A non-numeric operand is converted through its `to_r`
373
+ * (`vendor/ruby/v3.3.11/rational.c:2591,2647`), and `nil` raises TypeError (`:2564-2567`).
374
+ *
375
+ * @noRailsEquivalent PERMANENT — Ruby core `Kernel#Rational()`, which Rails
376
+ * calls and does not define. */
377
+ export function rational(numv, denv = 1) {
378
+ if (numv == null)
379
+ throw new TypeError("can't convert nil into Rational");
380
+ if (typeof numv === "string")
381
+ numv = stringToRStrict(numv);
382
+ else if (typeof numv === "object" && !(numv instanceof Rational))
383
+ numv = numv.toR();
384
+ if (typeof denv === "string")
385
+ return rational(numv).quo(rational(stringToRStrict(denv)));
386
+ if (numv instanceof Rational) {
387
+ return denv === 1 || denv === 1n ? numv : numv.quo(denv);
388
+ }
389
+ return new Rational(numv, denv);
390
+ }
391
+ /** @internal `vendor/ruby/v3.3.11/bignum.c:4074` `rb_int_parse_cstr` for base 10 with
392
+ * `RB_INT_PARSE_UNDERSCORE` and no sign or prefix: the digits at `p.s`, an
393
+ * underscore allowed only between two of them. */
394
+ function rbIntParseCstr(str, p) {
395
+ const md = /^\d+(?:_\d+)*/.exec(str.slice(p.s));
396
+ if (md == null)
397
+ return null;
398
+ p.s += md[0].length;
399
+ const digits = md[0].replaceAll("_", "");
400
+ return { n: BigInt(digits), count: digits.length };
401
+ }
402
+ /** @internal `vendor/ruby/v3.3.11/rational.c:2308` `read_sign`. */
403
+ function readSign(str, p, e) {
404
+ let sign = "?";
405
+ if (p.s < e && (str[p.s] === "-" || str[p.s] === "+")) {
406
+ sign = str[p.s];
407
+ p.s++;
408
+ }
409
+ return sign;
410
+ }
411
+ /** @internal `vendor/ruby/v3.3.11/rational.c:2338` `read_num`. */
412
+ function readNum(str, p, end, out) {
413
+ let fn = 0n;
414
+ let ok = false;
415
+ out.nexp = 0n;
416
+ out.num = 0n;
417
+ if (p.s < end && str[p.s] !== ".") {
418
+ const n = rbIntParseCstr(str, p);
419
+ if (n == null)
420
+ return false;
421
+ out.num = n.n;
422
+ ok = true;
423
+ }
424
+ if (p.s < end && str[p.s] === ".") {
425
+ p.s++;
426
+ const fp = rbIntParseCstr(str, p);
427
+ if (fp == null)
428
+ return true;
429
+ out.nexp = BigInt(fp.count);
430
+ const l = 10n ** out.nexp;
431
+ out.num = out.num === 0n ? fp.n : out.num * l + fp.n;
432
+ fn = BigInt(fp.count);
433
+ ok = true;
434
+ }
435
+ if (ok && p.s + 1 < end && (str[p.s] === "e" || str[p.s] === "E")) {
436
+ p.s++;
437
+ const expsign = readSign(str, p, end);
438
+ const parsed = rbIntParseCstr(str, p);
439
+ if (parsed == null)
440
+ return true;
441
+ let exp = parsed.n;
442
+ if (exp !== 0n) {
443
+ if (expsign === "-") {
444
+ if (fn !== 0n)
445
+ exp = exp + fn;
446
+ }
447
+ else {
448
+ if (fn !== 0n)
449
+ exp = exp - fn;
450
+ exp = -exp;
451
+ }
452
+ out.nexp = exp;
453
+ }
454
+ }
455
+ return ok;
456
+ }
457
+ /** @internal `vendor/ruby/v3.3.11/rational.c:2398` `skip_ws`. */
458
+ function skipWs(str, s, e) {
459
+ while (s < e && " \t\n\v\f\r".includes(str[s]))
460
+ ++s;
461
+ return s;
462
+ }
463
+ const FIXNUM_MAX = 2n ** 62n - 1n;
464
+ const SQRT_LONG_MAX = 3037000499n;
465
+ /**
466
+ * @internal `f_expt10` (`vendor/ruby/v3.3.11/rational.c:169`), `rb_int_pow(10, x)`:
467
+ * `int_pow` (`numeric.c:4454-4491`) squares while `FIT_SQRT_LONG`, and hands the
468
+ * rest to `rb_big_pow` (`bignum.c:6297-6309`), which answers a Float once
469
+ * `xbits * yy` passes `BIGLEN_LIMIT`.
470
+ */
471
+ function fExpt10(n) {
472
+ let x = 10n;
473
+ let y = n;
474
+ let z = 1n;
475
+ if (y === 0n)
476
+ return 1n;
477
+ if (y === 1n)
478
+ return x;
479
+ if (y % 2n === 1n)
480
+ z = x;
481
+ y -= y % 2n;
482
+ do {
483
+ while (y % 2n === 0n) {
484
+ if (x >= SQRT_LONG_MAX)
485
+ return bigPow(x, y, z);
486
+ x = x * x;
487
+ y >>= 1n;
488
+ }
489
+ if (x * z > FIXNUM_MAX)
490
+ return bigPow(x, y, z);
491
+ z = x * z;
492
+ } while (--y);
493
+ return z;
494
+ }
495
+ /** @internal `vendor/ruby/v3.3.11/numeric.c:4485-4490`, `int_pow`'s `bignum:` arm
496
+ * over `rb_big_pow`'s `BIGLEN_LIMIT` check (`bignum.c:6297-6309`). */
497
+ function bigPow(x, yy, z) {
498
+ const xbits = BigInt(x.toString(2).length);
499
+ if (xbits * yy > 32n * 1024n * 1024n) {
500
+ warn("in a**b, b may be too big", { uplevel: 0 });
501
+ return Infinity;
502
+ }
503
+ const v = x ** yy;
504
+ return z !== 1n ? z * v : v;
505
+ }
506
+ /** @internal `vendor/ruby/v3.3.11/rational.c:2406` `parse_rat`, strict and raising. */
507
+ function parseRat(str) {
508
+ const e = str.length;
509
+ const p = { s: skipWs(str, 0, e) };
510
+ const sign = readSign(str, p, e);
511
+ const n = { num: 0n, nexp: 0n };
512
+ if (!readNum(str, p, e, n))
513
+ return null;
514
+ let { num, nexp } = n;
515
+ let den = 1n;
516
+ if (p.s < e && str[p.s] === "/") {
517
+ p.s++;
518
+ const d = { num: 0n, nexp: 0n };
519
+ if (!readNum(str, p, e, d)) {
520
+ return null;
521
+ }
522
+ else if (d.num === 0n) {
523
+ throw new ZeroDivisionError("divided by 0");
524
+ }
525
+ else if (skipWs(str, p.s, e) !== e) {
526
+ return null;
527
+ }
528
+ else {
529
+ den = d.num;
530
+ nexp = nexp - d.nexp;
531
+ }
532
+ }
533
+ else if (skipWs(str, p.s, e) !== e) {
534
+ return null;
535
+ }
536
+ if (nexp !== 0n) {
537
+ if (nexp < 0n) {
538
+ const mul = nexp >= -FIXNUM_MAX - 1n && nexp <= FIXNUM_MAX ? fExpt10(-nexp) : Infinity;
539
+ if (typeof mul !== "number") {
540
+ num = num * mul;
541
+ }
542
+ else {
543
+ return sign === "-" ? -Infinity : Infinity;
544
+ }
545
+ }
546
+ else {
547
+ const div = nexp >= -FIXNUM_MAX - 1n && nexp <= FIXNUM_MAX ? fExpt10(nexp) : Infinity;
548
+ if (typeof div !== "number") {
549
+ den = den * div;
550
+ }
551
+ else {
552
+ return sign === "-" ? -0.0 : +0.0;
553
+ }
554
+ }
555
+ }
556
+ if (sign === "-") {
557
+ num = -num;
558
+ }
559
+ return new Rational(num, den);
560
+ }
561
+ /** @internal `vendor/ruby/v3.3.11/rational.c:2476` `string_to_r_strict`. */
562
+ function stringToRStrict(self) {
563
+ const num = parseRat(self);
564
+ if (num == null) {
565
+ throw new ArgumentError(`invalid value for convert(): ${rbInspect(self)}`);
566
+ }
567
+ if (typeof num === "number" && num !== 0) {
568
+ throw new FloatDomainError("Infinity");
569
+ }
570
+ return num;
571
+ }
572
+ classpaths.set(Rational, { path: "Rational", permanent: true });
573
+ /**
574
+ * `Integer#to_r` (`vendor/ruby/v3.3.11/rational.c:2148`).
575
+ * @noRailsEquivalent PERMANENT
576
+ */
577
+ rbModDefineMethod(rbCInteger, "toR", function () {
578
+ return new Rational(this, 1);
579
+ });
580
+ /**
581
+ * `Float#to_r` (`vendor/ruby/v3.3.11/rational.c:2199`).
582
+ * @noRailsEquivalent PERMANENT
583
+ */
584
+ rbModDefineMethod(rbCFloat, "toR", function () {
585
+ return new Rational(Number(this), 1);
586
+ });
587
+ //# sourceMappingURL=rational.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rational.js","sourceRoot":"","sources":["../lib/rational.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,OAAO,EACP,SAAS,EACT,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,KAAK,GACN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;4EAG4E;AAC5E,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;0BAC0B;AAC1B,SAAS,IAAI,CAAC,CAAS,EAAE,CAAS;IAChC,IAAI,CAAC,GAAG,EAAE;QAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnB,IAAI,CAA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E,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAEhE;;;GAGG;AACH,iBAAiB,CAAC,UAAU,EAAE,KAAK,EAAE;IACnC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC;AACH;;;GAGG;AACH,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE;IACjC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * `vendor/ruby/v3.3.11/tool/mkconfig.rb:21` — `RbConfig::CONFIG`, the build configuration hash Ruby's `rbconfig.rb`
3
+ * defines. Only the keys trails' ports read are answered; `EXEEXT` is the
4
+ * executable suffix a DOSISH build appends and the empty string everywhere
5
+ * else, which is what `ActiveRecord::ConnectionAdapters::AbstractAdapter
6
+ * .find_cmd_and_exec` (`abstract_adapter.rb:95`) tests for emptiness.
7
+ * `rubylibdir` is where the standard library's frames come from, which in
8
+ * Node is the `node:` scheme. `bindir` and `ruby_install_name` locate the
9
+ * running interpreter, which here is the JS runtime's executable: its
10
+ * directory, and its file name less `EXEEXT`, so that
11
+ * `File.join(bindir, ruby_install_name) + EXEEXT` is the executable's path, as
12
+ * `Thor::Util.ruby_command` (`vendor/thor/v1.4.0/lib/thor/util.rb:223-225`)
13
+ * builds it. Both are read from the process adapter on access, and are empty
14
+ * where the host names no executable.
15
+ *
16
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `RbConfig`.
17
+ */
18
+ export declare const RbConfig: {
19
+ /**
20
+ * `vendor/ruby/v3.3.11/tool/mkconfig.rb:394` — the config hash itself, read as
21
+ * `RbConfig::CONFIG["EXEEXT"]` and `RbConfig::CONFIG["host_os"]`.
22
+ *
23
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `RbConfig::CONFIG`.
24
+ */
25
+ readonly CONFIG: Readonly<Record<string, string>>;
26
+ /**
27
+ * `vendor/ruby/v3.3.11/tool/mkconfig.rb:391` — `RbConfig.ruby`.
28
+ *
29
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `RbConfig.ruby`.
30
+ */
31
+ ruby(): string;
32
+ };
33
+ //# sourceMappingURL=rb-config.d.ts.map