@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,166 @@
1
+ import { Encoding } from "./encoding.js";
2
+ import { print as ioPrint, puts as ioPuts } from "./io.js";
3
+ /**
4
+ * Ruby's `StringIO` (stdlib), the readable/writable in-memory IO that
5
+ * `XmlMini._parse_file` (`activesupport/lib/active_support/xml_mini.rb:180-186`)
6
+ * and `Rack::MockRequest` hand to their callers. Only the members Ruby code in
7
+ * this repo sends are ported.
8
+ *
9
+ * The buffer holds bytes, so `size`, `read`'s length and `write`'s return
10
+ * value count bytes exactly as Ruby's do. A StringIO opened on an ASCII-8BIT
11
+ * String, a `Uint8Array`, answers its whole-buffer reads as one, and every
12
+ * other answers them as the UTF-8 text the bytes spell; `read`'s length arm
13
+ * answers a `Uint8Array` whatever the buffer, as `strio_read`
14
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1539`) tags it ASCII-8BIT.
15
+ *
16
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails: `StringIO`
17
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1432`) ships with the interpreter, so
18
+ * no Rails file defines it and no port can remove the need for it while
19
+ * `_parse_file` and `Rack::MockRequest` hand callers an IO.
20
+ */
21
+ export declare class StringIO<S extends string | Uint8Array = string> {
22
+ #private;
23
+ constructor(string?: S);
24
+ /**
25
+ * `strio_copy` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:620`), bound to
26
+ * `initialize_copy` (`:1869`): the copy shares the original's struct, so
27
+ * both read and write one buffer and one position.
28
+ *
29
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails: `StringIO#initialize_copy`.
30
+ */
31
+ initializeCopy(orig: StringIO<S>): this;
32
+ string(): S;
33
+ size(): number;
34
+ /**
35
+ * `strio_read` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1539`). The `str` buffer
36
+ * of its two-argument form (`stringio.c:1548-1552`) receives the bytes, and
37
+ * at EOF Ruby empties it with `rb_str_resize(str, 0)` (`stringio.c:1561`)
38
+ * before answering `nil`.
39
+ *
40
+ * A `Uint8Array` cannot be resized, so — exactly as {@link IO.read} already
41
+ * does for `io_read`'s identical `str` argument (`vendor/ruby/v3.3.11/io.c:3800`) —
42
+ * it is filled up to its own length instead, and zero-filled where Ruby
43
+ * truncates. That deviation is recorded once there; this is the same fact
44
+ * about the same buffer.
45
+ */
46
+ read(): S;
47
+ read(length: number, str?: Uint8Array | null): Uint8Array | null;
48
+ write(string: string | Uint8Array): number;
49
+ /**
50
+ * `IO::generic_writable#<<` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1955`
51
+ * `strio_addstr`, which is `rb_io_addstr`, `vendor/ruby/v3.3.11/io.c:2323-2327`).
52
+ *
53
+ * @noRailsEquivalent PERMANENT
54
+ */
55
+ append(str: string | Uint8Array): this;
56
+ /**
57
+ * `IO::generic_writable#puts` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1530`
58
+ * aliases it to `rb_io_puts`, `vendor/ruby/v3.3.11/io.c:8947`), which is how
59
+ * `Rack::Session::Abstract::Persisted#commit_session` writes to
60
+ * `rack.errors`. One body, shared with `IO#puts` — see `./io.js`.
61
+ *
62
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails:
63
+ * `IO::generic_writable#puts` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1530`).
64
+ */
65
+ puts: typeof ioPuts;
66
+ /**
67
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails:
68
+ * `IO::generic_writable#print` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1956`
69
+ * aliases it to `rb_io_print`, `vendor/ruby/v3.3.11/io.c:8715`).
70
+ */
71
+ print: typeof ioPrint;
72
+ /**
73
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails: `strio_flush`
74
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1891`) returns the StringIO itself,
75
+ * which is how `Rack::ShowExceptions#call` flushes `rack.errors`.
76
+ */
77
+ flush(): this;
78
+ /**
79
+ * `strio_get_pos` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:940`), the offset
80
+ * {@link rewind} puts back to zero.
81
+ *
82
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#pos`
83
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:940`).
84
+ */
85
+ get pos(): number;
86
+ rewind(): number;
87
+ /**
88
+ * `strio_binmode` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1863`) — it records
89
+ * ASCII-8BIT on the stream and, when the StringIO is writable, associates it
90
+ * with the buffer String, then answers the StringIO, whose whole-buffer reads
91
+ * then answer a `Uint8Array` (see the class comment).
92
+ *
93
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#binmode`
94
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1879`).
95
+ */
96
+ binmode(): this;
97
+ /**
98
+ * `strio_set_encoding` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1801`) in its
99
+ * one-argument form — the encoding is recorded on the stream and, when the
100
+ * StringIO is writable, associated with the buffer String
101
+ * (`stringio.c:1823-1826`); it answers the StringIO. `int_enc` and `opt` are
102
+ * ignored by MRI itself (`stringio.c:1796-1797`), so neither is ported.
103
+ *
104
+ * Associated with `BINARY`, the buffer's whole-buffer reads answer a
105
+ * `Uint8Array` (see the class comment), and the recorded encoding is what
106
+ * `Rack::Test::Utils.build_file_part`'s `set_encoding(Encoding::BINARY)`
107
+ * (`vendor/rack-test/v2.2.0/lib/rack/test/utils.rb:148`) is asking for.
108
+ *
109
+ * `rb_find_encoding` (`vendor/ruby/v3.3.11/encoding.c:325-332`) answers a NULL
110
+ * `rb_encoding *` for a name that resolves to `UNSPECIFIED_ENCODING` — the
111
+ * `internal` alias while `Encoding.default_internal` is unset — and
112
+ * `strio_set_encoding` then falls through the mode-string path to no
113
+ * encoding at all, which the stream reports as `ASCII-8BIT` (verified
114
+ * against ruby 3.3: `StringIO.new("x").set_encoding("internal")
115
+ * .external_encoding` is `#<Encoding:ASCII-8BIT>`).
116
+ *
117
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#set_encoding`
118
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1801`).
119
+ */
120
+ setEncoding(extEnc: Encoding | string): this;
121
+ /**
122
+ * `strio_sysread` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1664`), which
123
+ * `StringIO#readpartial` is defined as (`stringio.c:1949`): `read` with a
124
+ * `rb_eof_error()` (`vendor/ruby/v3.3.11/io.c:756`) where that answers `nil` — the
125
+ * member
126
+ * `Rack::Test::UploadedFile#append_to`
127
+ * (`vendor/rack-test/v2.2.0/lib/rack/test/uploaded_file.rb:64`) walks a StringIO
128
+ * body with.
129
+ *
130
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#readpartial`
131
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1949`).
132
+ */
133
+ readpartial(maxlen: number, outbuf?: Uint8Array | null): Uint8Array;
134
+ /**
135
+ * `strio_gets` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1322`) with no
136
+ * separator argument: the next line, newline included, or `nil` at EOF.
137
+ *
138
+ * @noRailsEquivalent PERMANENT
139
+ */
140
+ gets(): S | null;
141
+ /**
142
+ * `strio_each` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1366`) with no
143
+ * separator argument: yields each remaining line and leaves the stream at EOF.
144
+ *
145
+ * @noRailsEquivalent PERMANENT
146
+ */
147
+ each(block: (line: S) => void): this;
148
+ isEof(): boolean;
149
+ close(): void;
150
+ /**
151
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#close_read`
152
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:520`).
153
+ */
154
+ closeRead(): null;
155
+ /**
156
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#close_write`
157
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:541`).
158
+ */
159
+ closeWrite(): null;
160
+ /**
161
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#closed?`
162
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:559`).
163
+ */
164
+ isClosed(): boolean;
165
+ }
166
+ //# sourceMappingURL=string-io.d.ts.map
@@ -0,0 +1,248 @@
1
+ import { Encoding } from "./encoding.js";
2
+ import { EOFError } from "./eof-error.js";
3
+ import { IOError } from "./io-error.js";
4
+ import { print as ioPrint, puts as ioPuts } from "./io.js";
5
+ import { b } from "./string/b.js";
6
+ import { strNew } from "./string/bytes.js";
7
+ import { rbDefineAllocFunc } from "./include.js";
8
+ /**
9
+ * Ruby's `StringIO` (stdlib), the readable/writable in-memory IO that
10
+ * `XmlMini._parse_file` (`activesupport/lib/active_support/xml_mini.rb:180-186`)
11
+ * and `Rack::MockRequest` hand to their callers. Only the members Ruby code in
12
+ * this repo sends are ported.
13
+ *
14
+ * The buffer holds bytes, so `size`, `read`'s length and `write`'s return
15
+ * value count bytes exactly as Ruby's do. A StringIO opened on an ASCII-8BIT
16
+ * String, a `Uint8Array`, answers its whole-buffer reads as one, and every
17
+ * other answers them as the UTF-8 text the bytes spell; `read`'s length arm
18
+ * answers a `Uint8Array` whatever the buffer, as `strio_read`
19
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1539`) tags it ASCII-8BIT.
20
+ *
21
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails: `StringIO`
22
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1432`) ships with the interpreter, so
23
+ * no Rails file defines it and no port can remove the need for it while
24
+ * `_parse_file` and `Rack::MockRequest` hand callers an IO.
25
+ */
26
+ export class StringIO {
27
+ /** `DATA_PTR`, the `struct StringIO` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:36-43`). */
28
+ #ptr;
29
+ #_readable = true;
30
+ #_writable = true;
31
+ constructor(string = "") {
32
+ this.#ptr = {
33
+ string: new Uint8Array(0),
34
+ binary: string instanceof Uint8Array,
35
+ pos: 0,
36
+ enc: null,
37
+ };
38
+ this.write(string);
39
+ this.#ptr.pos = 0;
40
+ }
41
+ /**
42
+ * `strio_copy` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:620`), bound to
43
+ * `initialize_copy` (`:1869`): the copy shares the original's struct, so
44
+ * both read and write one buffer and one position.
45
+ *
46
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails: `StringIO#initialize_copy`.
47
+ */
48
+ initializeCopy(orig) {
49
+ if (this === orig)
50
+ return this;
51
+ this.#ptr = orig.#ptr;
52
+ this.#_readable = orig.#_readable;
53
+ this.#_writable = orig.#_writable;
54
+ return this;
55
+ }
56
+ string() {
57
+ const bytes = this.#ptr.string.slice();
58
+ return (this.#ptr.binary ? bytes : strNew(Array.from(bytes)));
59
+ }
60
+ size() {
61
+ return this.#ptr.string.length;
62
+ }
63
+ read(length, str) {
64
+ if (length == null) {
65
+ const rest = this.#ptr.string.slice(this.#ptr.pos);
66
+ this.#ptr.pos = this.#ptr.string.length;
67
+ return (this.#ptr.binary ? rest : strNew(rest));
68
+ }
69
+ if (this.isEof()) {
70
+ if (str)
71
+ str.fill(0);
72
+ return length === 0 ? new Uint8Array(0) : null;
73
+ }
74
+ const chunk = this.#ptr.string.slice(this.#ptr.pos, this.#ptr.pos + length);
75
+ this.#ptr.pos += chunk.length;
76
+ if (str)
77
+ str.set(chunk.subarray(0, str.length));
78
+ return chunk;
79
+ }
80
+ write(string) {
81
+ const bytes = typeof string === "string" ? b(string) : string;
82
+ const end = this.#ptr.pos + bytes.length;
83
+ if (end > this.#ptr.string.length) {
84
+ const grown = new Uint8Array(end);
85
+ grown.set(this.#ptr.string);
86
+ this.#ptr.string = grown;
87
+ }
88
+ this.#ptr.string.set(bytes, this.#ptr.pos);
89
+ this.#ptr.pos = end;
90
+ return bytes.length;
91
+ }
92
+ /**
93
+ * `IO::generic_writable#<<` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1955`
94
+ * `strio_addstr`, which is `rb_io_addstr`, `vendor/ruby/v3.3.11/io.c:2323-2327`).
95
+ *
96
+ * @noRailsEquivalent PERMANENT
97
+ */
98
+ append(str) {
99
+ this.write(str);
100
+ return this;
101
+ }
102
+ /**
103
+ * @noRailsEquivalent PERMANENT — Ruby stdlib, not Rails: `strio_flush`
104
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1891`) returns the StringIO itself,
105
+ * which is how `Rack::ShowExceptions#call` flushes `rack.errors`.
106
+ */
107
+ flush() {
108
+ return this;
109
+ }
110
+ /**
111
+ * `strio_get_pos` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:940`), the offset
112
+ * {@link rewind} puts back to zero.
113
+ *
114
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#pos`
115
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:940`).
116
+ */
117
+ get pos() {
118
+ return this.#ptr.pos;
119
+ }
120
+ rewind() {
121
+ this.#ptr.pos = 0;
122
+ return 0;
123
+ }
124
+ /**
125
+ * `strio_binmode` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1863`) — it records
126
+ * ASCII-8BIT on the stream and, when the StringIO is writable, associates it
127
+ * with the buffer String, then answers the StringIO, whose whole-buffer reads
128
+ * then answer a `Uint8Array` (see the class comment).
129
+ *
130
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#binmode`
131
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1879`).
132
+ */
133
+ binmode() {
134
+ this.#ptr.enc = Encoding.ASCII_8BIT;
135
+ this.#ptr.binary = true;
136
+ return this;
137
+ }
138
+ /**
139
+ * `strio_set_encoding` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1801`) in its
140
+ * one-argument form — the encoding is recorded on the stream and, when the
141
+ * StringIO is writable, associated with the buffer String
142
+ * (`stringio.c:1823-1826`); it answers the StringIO. `int_enc` and `opt` are
143
+ * ignored by MRI itself (`stringio.c:1796-1797`), so neither is ported.
144
+ *
145
+ * Associated with `BINARY`, the buffer's whole-buffer reads answer a
146
+ * `Uint8Array` (see the class comment), and the recorded encoding is what
147
+ * `Rack::Test::Utils.build_file_part`'s `set_encoding(Encoding::BINARY)`
148
+ * (`vendor/rack-test/v2.2.0/lib/rack/test/utils.rb:148`) is asking for.
149
+ *
150
+ * `rb_find_encoding` (`vendor/ruby/v3.3.11/encoding.c:325-332`) answers a NULL
151
+ * `rb_encoding *` for a name that resolves to `UNSPECIFIED_ENCODING` — the
152
+ * `internal` alias while `Encoding.default_internal` is unset — and
153
+ * `strio_set_encoding` then falls through the mode-string path to no
154
+ * encoding at all, which the stream reports as `ASCII-8BIT` (verified
155
+ * against ruby 3.3: `StringIO.new("x").set_encoding("internal")
156
+ * .external_encoding` is `#<Encoding:ASCII-8BIT>`).
157
+ *
158
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#set_encoding`
159
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1801`).
160
+ */
161
+ setEncoding(extEnc) {
162
+ this.#ptr.enc = Encoding.find(extEnc) ?? Encoding.BINARY;
163
+ this.#ptr.binary = this.#ptr.enc === Encoding.BINARY;
164
+ return this;
165
+ }
166
+ /**
167
+ * `strio_sysread` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1664`), which
168
+ * `StringIO#readpartial` is defined as (`stringio.c:1949`): `read` with a
169
+ * `rb_eof_error()` (`vendor/ruby/v3.3.11/io.c:756`) where that answers `nil` — the
170
+ * member
171
+ * `Rack::Test::UploadedFile#append_to`
172
+ * (`vendor/rack-test/v2.2.0/lib/rack/test/uploaded_file.rb:64`) walks a StringIO
173
+ * body with.
174
+ *
175
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#readpartial`
176
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1949`).
177
+ */
178
+ readpartial(maxlen, outbuf) {
179
+ const ret = this.read(maxlen, outbuf);
180
+ if (ret === null)
181
+ throw new EOFError("end of file reached");
182
+ return ret;
183
+ }
184
+ /**
185
+ * `strio_gets` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1322`) with no
186
+ * separator argument: the next line, newline included, or `nil` at EOF.
187
+ *
188
+ * @noRailsEquivalent PERMANENT
189
+ */
190
+ gets() {
191
+ if (this.isEof())
192
+ return null;
193
+ const newline = this.#ptr.string.indexOf(0x0a, this.#ptr.pos);
194
+ const end = newline === -1 ? this.#ptr.string.length : newline + 1;
195
+ const bytes = this.#ptr.string.slice(this.#ptr.pos, end);
196
+ this.#ptr.pos = end;
197
+ return (this.#ptr.binary ? bytes : strNew(Array.from(bytes)));
198
+ }
199
+ /**
200
+ * `strio_each` (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:1366`) with no
201
+ * separator argument: yields each remaining line and leaves the stream at EOF.
202
+ *
203
+ * @noRailsEquivalent PERMANENT
204
+ */
205
+ each(block) {
206
+ while (!this.isEof())
207
+ block(this.gets());
208
+ return this;
209
+ }
210
+ isEof() {
211
+ return this.#ptr.pos >= this.#ptr.string.length;
212
+ }
213
+ close() {
214
+ this.#_readable = false;
215
+ this.#_writable = false;
216
+ }
217
+ /**
218
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#close_read`
219
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:520`).
220
+ */
221
+ closeRead() {
222
+ if (!this.#_readable)
223
+ throw new IOError("closing non-duplex IO for reading");
224
+ this.#_readable = false;
225
+ return null;
226
+ }
227
+ /**
228
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#close_write`
229
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:541`).
230
+ */
231
+ closeWrite() {
232
+ if (!this.#_writable)
233
+ throw new IOError("closing non-duplex IO for writing");
234
+ this.#_writable = false;
235
+ return null;
236
+ }
237
+ /**
238
+ * @noRailsEquivalent PERMANENT — Ruby stdlib `StringIO#closed?`
239
+ * (`vendor/ruby/v3.3.11/ext/stringio/stringio.c:559`).
240
+ */
241
+ isClosed() {
242
+ return !this.#_readable && !this.#_writable;
243
+ }
244
+ }
245
+ rbDefineAllocFunc(StringIO, (klass) => new klass());
246
+ StringIO.prototype.puts = ioPuts;
247
+ StringIO.prototype.print = ioPrint;
248
+ //# sourceMappingURL=string-io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-io.js","sourceRoot":"","sources":["../lib/string-io.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,QAAQ;IACnB,+FAA+F;IAC/F,IAAI,CAA6E;IACjF,UAAU,GAAG,IAAI,CAAC;IAClB,UAAU,GAAG,IAAI,CAAC;IAElB,YAAY,MAAM,GAAM,EAAO;QAC7B,IAAI,CAAC,IAAI,GAAG;YACV,MAAM,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,MAAM,YAAY,UAAU;YACpC,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,IAAI;SACV,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,cAAc,CAAC,IAAiB;QAC9B,IAAK,IAAoB,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,CA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AK,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AAEpD,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC;AACjC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1667` `rb_define_class("StringScanner", rb_cObject)`.
3
+ *
4
+ * @noRailsEquivalent PERMANENT
5
+ */
6
+ export declare class StringScanner {
7
+ #private;
8
+ /**
9
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:233` `strscan_initialize`.
10
+ *
11
+ * @noRailsEquivalent PERMANENT
12
+ */
13
+ constructor(str: string);
14
+ /**
15
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:357` `strscan_get_string`.
16
+ *
17
+ * @noRailsEquivalent PERMANENT
18
+ */
19
+ get string(): string;
20
+ /**
21
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:372` `strscan_set_string`, which
22
+ * also resets the scan pointer and clears the match.
23
+ *
24
+ * @noRailsEquivalent PERMANENT
25
+ */
26
+ set string(str: string);
27
+ /**
28
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:314` `strscan_reset`.
29
+ *
30
+ * @noRailsEquivalent PERMANENT
31
+ */
32
+ reset(): this;
33
+ /**
34
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:423` `strscan_get_pos`.
35
+ *
36
+ * @noRailsEquivalent PERMANENT
37
+ */
38
+ get pos(): number;
39
+ /**
40
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:681` `strscan_scan`. The match
41
+ * runs over the rest of the string (`strscan_do_scan`, `:605`), so `^` and
42
+ * `\A` anchor at the scan pointer.
43
+ *
44
+ * @noRailsEquivalent PERMANENT
45
+ */
46
+ scan(pattern: RegExp): string | null;
47
+ /**
48
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:884` `strscan_getch`.
49
+ *
50
+ * @noRailsEquivalent PERMANENT
51
+ */
52
+ getch(): string | null;
53
+ /**
54
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1000` `strscan_unscan`.
55
+ *
56
+ * @noRailsEquivalent PERMANENT
57
+ */
58
+ unscan(): this;
59
+ /**
60
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:778` `strscan_scan_until`: the
61
+ * match is searched for over the rest of the string (`strscan_do_scan`,
62
+ * `:605`, with `headonly` false), and the answer runs from the old scan
63
+ * pointer to the end of the match.
64
+ *
65
+ * @noRailsEquivalent PERMANENT
66
+ */
67
+ scanUntil(pattern: RegExp): string | null;
68
+ /**
69
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:797` `strscan_exist_p`: a
70
+ * search over the rest of the string (`strscan_do_scan` with `succptr` and
71
+ * `getstr` false) that records the match but leaves the scan pointer, and
72
+ * answers the distance from it to the end of the match.
73
+ *
74
+ * @noRailsEquivalent PERMANENT
75
+ */
76
+ isExist(pattern: RegExp): number | null;
77
+ /**
78
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1132` `strscan_matched_size`.
79
+ *
80
+ * @noRailsEquivalent PERMANENT
81
+ */
82
+ matchedSize(): number | null;
83
+ /**
84
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1186` `strscan_aref`, `StringScanner#[]`
85
+ * by group number.
86
+ *
87
+ * @noRailsEquivalent PERMANENT
88
+ */
89
+ get(idx: number): string | null;
90
+ /**
91
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:723` `strscan_skip`.
92
+ *
93
+ * @noRailsEquivalent PERMANENT
94
+ */
95
+ skip(pattern: RegExp): number | null;
96
+ /**
97
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:962` `strscan_peek`.
98
+ *
99
+ * @noRailsEquivalent PERMANENT
100
+ */
101
+ peek(len: number): string;
102
+ /**
103
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1046` `strscan_eos_p`.
104
+ *
105
+ * @noRailsEquivalent PERMANENT
106
+ */
107
+ isEos(): boolean;
108
+ /**
109
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:332` `strscan_terminate`.
110
+ *
111
+ * @noRailsEquivalent PERMANENT
112
+ */
113
+ terminate(): this;
114
+ /**
115
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1109` `strscan_matched`.
116
+ *
117
+ * @noRailsEquivalent PERMANENT
118
+ */
119
+ matched(): string | null;
120
+ /**
121
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1320` `strscan_pre_match`.
122
+ *
123
+ * @noRailsEquivalent PERMANENT
124
+ */
125
+ preMatch(): string | null;
126
+ /**
127
+ * `vendor/ruby/v3.3.11/ext/strscan/strscan.c:1357` `strscan_rest`.
128
+ *
129
+ * @noRailsEquivalent PERMANENT
130
+ */
131
+ rest(): string;
132
+ }
133
+ //# sourceMappingURL=string-scanner.d.ts.map