@blazetrails/ruby-compat 0.0.0-stage → 0.1.0-alpha0.1
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.
- package/LICENSE +21 -0
- package/NOTICE +6 -0
- package/README.md +440 -2
- package/dist/argument-error.d.ts +15 -0
- package/dist/argument-error.js +15 -0
- package/dist/argument-error.js.map +1 -0
- package/dist/array.d.ts +415 -0
- package/dist/array.js +1330 -0
- package/dist/array.js.map +1 -0
- package/dist/async-context-adapter.d.ts +19 -0
- package/dist/async-context-adapter.js +139 -0
- package/dist/async-context-adapter.js.map +1 -0
- package/dist/backtrace-location.d.ts +77 -0
- package/dist/backtrace-location.js +155 -0
- package/dist/backtrace-location.js.map +1 -0
- package/dist/base64.d.ts +73 -0
- package/dist/base64.js +164 -0
- package/dist/base64.js.map +1 -0
- package/dist/benchmark.d.ts +19 -0
- package/dist/benchmark.js +16 -0
- package/dist/benchmark.js.map +1 -0
- package/dist/big-decimal.d.ts +110 -0
- package/dist/big-decimal.js +582 -0
- package/dist/big-decimal.js.map +1 -0
- package/dist/bundler.d.ts +44 -0
- package/dist/bundler.js +101 -0
- package/dist/bundler.js.map +1 -0
- package/dist/cgi.d.ts +89 -0
- package/dist/cgi.js +168 -0
- package/dist/cgi.js.map +1 -0
- package/dist/child-process-adapter.d.ts +110 -0
- package/dist/child-process-adapter.js +272 -0
- package/dist/child-process-adapter.js.map +1 -0
- package/dist/class-module.d.ts +10 -0
- package/dist/class-module.js +10 -0
- package/dist/class-module.js.map +1 -0
- package/dist/classpath.d.ts +90 -0
- package/dist/classpath.js +207 -0
- package/dist/classpath.js.map +1 -0
- package/dist/closed-queue-error.d.ts +10 -0
- package/dist/closed-queue-error.js +10 -0
- package/dist/closed-queue-error.js.map +1 -0
- package/dist/comparable.d.ts +127 -0
- package/dist/comparable.js +376 -0
- package/dist/comparable.js.map +1 -0
- package/dist/complex.d.ts +48 -0
- package/dist/complex.js +162 -0
- package/dist/complex.js.map +1 -0
- package/dist/concurrent/atomic-boolean.d.ts +24 -0
- package/dist/concurrent/atomic-boolean.js +43 -0
- package/dist/concurrent/atomic-boolean.js.map +1 -0
- package/dist/concurrent/atomic-fixnum.d.ts +21 -0
- package/dist/concurrent/atomic-fixnum.js +35 -0
- package/dist/concurrent/atomic-fixnum.js.map +1 -0
- package/dist/concurrent/count-down-latch.d.ts +20 -0
- package/dist/concurrent/count-down-latch.js +50 -0
- package/dist/concurrent/count-down-latch.js.map +1 -0
- package/dist/concurrent/cyclic-barrier.d.ts +18 -0
- package/dist/concurrent/cyclic-barrier.js +50 -0
- package/dist/concurrent/cyclic-barrier.js.map +1 -0
- package/dist/concurrent/event.d.ts +19 -0
- package/dist/concurrent/event.js +31 -0
- package/dist/concurrent/event.js.map +1 -0
- package/dist/concurrent/map.d.ts +149 -0
- package/dist/concurrent/map.js +202 -0
- package/dist/concurrent/map.js.map +1 -0
- package/dist/concurrent/read-write-lock.d.ts +25 -0
- package/dist/concurrent/read-write-lock.js +70 -0
- package/dist/concurrent/read-write-lock.js.map +1 -0
- package/dist/concurrent/semaphore.d.ts +24 -0
- package/dist/concurrent/semaphore.js +74 -0
- package/dist/concurrent/semaphore.js.map +1 -0
- package/dist/concurrent/timer-task.d.ts +52 -0
- package/dist/concurrent/timer-task.js +112 -0
- package/dist/concurrent/timer-task.js.map +1 -0
- package/dist/constants.generated.d.ts +2 -0
- package/dist/constants.generated.js +64 -0
- package/dist/constants.generated.js.map +1 -0
- package/dist/converter-not-found-error.d.ts +14 -0
- package/dist/converter-not-found-error.js +14 -0
- package/dist/converter-not-found-error.js.map +1 -0
- package/dist/crypto-adapter.d.ts +64 -0
- package/dist/crypto-adapter.js +365 -0
- package/dist/crypto-adapter.js.map +1 -0
- package/dist/delegate.d.ts +156 -0
- package/dist/delegate.js +306 -0
- package/dist/delegate.js.map +1 -0
- package/dist/digest.d.ts +99 -0
- package/dist/digest.js +131 -0
- package/dist/digest.js.map +1 -0
- package/dist/dir.d.ts +218 -0
- package/dist/dir.js +599 -0
- package/dist/dir.js.map +1 -0
- package/dist/encoding-error.d.ts +14 -0
- package/dist/encoding-error.js +17 -0
- package/dist/encoding-error.js.map +1 -0
- package/dist/encoding.d.ts +121 -0
- package/dist/encoding.js +306 -0
- package/dist/encoding.js.map +1 -0
- package/dist/ensure.d.ts +15 -0
- package/dist/ensure.js +35 -0
- package/dist/ensure.js.map +1 -0
- package/dist/enumerable.d.ts +375 -0
- package/dist/enumerable.js +1100 -0
- package/dist/enumerable.js.map +1 -0
- package/dist/enumerator.d.ts +321 -0
- package/dist/enumerator.js +642 -0
- package/dist/enumerator.js.map +1 -0
- package/dist/eof-error.d.ts +14 -0
- package/dist/eof-error.js +14 -0
- package/dist/eof-error.js.map +1 -0
- package/dist/errno.d.ts +327 -0
- package/dist/errno.js +452 -0
- package/dist/errno.js.map +1 -0
- package/dist/exc-detailed-message.d.ts +15 -0
- package/dist/exc-detailed-message.js +106 -0
- package/dist/exc-detailed-message.js.map +1 -0
- package/dist/exc-to-s.d.ts +10 -0
- package/dist/exc-to-s.js +21 -0
- package/dist/exc-to-s.js.map +1 -0
- package/dist/exception.d.ts +34 -0
- package/dist/exception.js +99 -0
- package/dist/exception.js.map +1 -0
- package/dist/fiber-error.d.ts +12 -0
- package/dist/fiber-error.js +12 -0
- package/dist/fiber-error.js.map +1 -0
- package/dist/fiber.d.ts +51 -0
- package/dist/fiber.js +178 -0
- package/dist/fiber.js.map +1 -0
- package/dist/file-utils.d.ts +480 -0
- package/dist/file-utils.js +1823 -0
- package/dist/file-utils.js.map +1 -0
- package/dist/file.d.ts +635 -0
- package/dist/file.js +1312 -0
- package/dist/file.js.map +1 -0
- package/dist/float-domain-error.d.ts +17 -0
- package/dist/float-domain-error.js +17 -0
- package/dist/float-domain-error.js.map +1 -0
- package/dist/fork-children.d.ts +23 -0
- package/dist/fork-children.js +32 -0
- package/dist/fork-children.js.map +1 -0
- package/dist/frozen-error.d.ts +33 -0
- package/dist/frozen-error.js +42 -0
- package/dist/frozen-error.js.map +1 -0
- package/dist/fs-adapter.d.ts +158 -0
- package/dist/fs-adapter.js +253 -0
- package/dist/fs-adapter.js.map +1 -0
- package/dist/gem/deprecate.d.ts +10 -0
- package/dist/gem/deprecate.js +8 -0
- package/dist/gem/deprecate.js.map +1 -0
- package/dist/gem/requirement.d.ts +64 -0
- package/dist/gem/requirement.js +91 -0
- package/dist/gem/requirement.js.map +1 -0
- package/dist/gem/version.d.ts +50 -0
- package/dist/gem/version.js +148 -0
- package/dist/gem/version.js.map +1 -0
- package/dist/gem.d.ts +59 -0
- package/dist/gem.js +82 -0
- package/dist/gem.js.map +1 -0
- package/dist/hash.d.ts +967 -0
- package/dist/hash.js +1572 -0
- package/dist/hash.js.map +1 -0
- package/dist/http-adapter.d.ts +123 -0
- package/dist/http-adapter.js +220 -0
- package/dist/http-adapter.js.map +1 -0
- package/dist/immediate-executor.d.ts +20 -0
- package/dist/immediate-executor.js +39 -0
- package/dist/immediate-executor.js.map +1 -0
- package/dist/include.d.ts +778 -0
- package/dist/include.js +2195 -0
- package/dist/include.js.map +1 -0
- package/dist/index-error.d.ts +13 -0
- package/dist/index-error.js +13 -0
- package/dist/index-error.js.map +1 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +166 -0
- package/dist/index.js.map +1 -0
- package/dist/invalid-byte-sequence-error.d.ts +62 -0
- package/dist/invalid-byte-sequence-error.js +75 -0
- package/dist/invalid-byte-sequence-error.js.map +1 -0
- package/dist/io-error.d.ts +14 -0
- package/dist/io-error.js +17 -0
- package/dist/io-error.js.map +1 -0
- package/dist/io.d.ts +867 -0
- package/dist/io.js +1960 -0
- package/dist/io.js.map +1 -0
- package/dist/ipaddr.d.ts +79 -0
- package/dist/ipaddr.js +405 -0
- package/dist/ipaddr.js.map +1 -0
- package/dist/json.d.ts +67 -0
- package/dist/json.js +185 -0
- package/dist/json.js.map +1 -0
- package/dist/kernel-catch.d.ts +59 -0
- package/dist/kernel-catch.js +184 -0
- package/dist/kernel-catch.js.map +1 -0
- package/dist/kernel-float.d.ts +19 -0
- package/dist/kernel-float.js +54 -0
- package/dist/kernel-float.js.map +1 -0
- package/dist/kernel-fork.d.ts +30 -0
- package/dist/kernel-fork.js +72 -0
- package/dist/kernel-fork.js.map +1 -0
- package/dist/kernel-format.d.ts +27 -0
- package/dist/kernel-format.js +901 -0
- package/dist/kernel-format.js.map +1 -0
- package/dist/kernel-hash.d.ts +7 -0
- package/dist/kernel-hash.js +33 -0
- package/dist/kernel-hash.js.map +1 -0
- package/dist/kernel-integer.d.ts +49 -0
- package/dist/kernel-integer.js +170 -0
- package/dist/kernel-integer.js.map +1 -0
- package/dist/kernel-rand.d.ts +16 -0
- package/dist/kernel-rand.js +237 -0
- package/dist/kernel-rand.js.map +1 -0
- package/dist/kernel-system.d.ts +40 -0
- package/dist/kernel-system.js +97 -0
- package/dist/kernel-system.js.map +1 -0
- package/dist/kernel-warn.d.ts +35 -0
- package/dist/kernel-warn.js +73 -0
- package/dist/kernel-warn.js.map +1 -0
- package/dist/key-error.d.ts +44 -0
- package/dist/key-error.js +59 -0
- package/dist/key-error.js.map +1 -0
- package/dist/keyword-splat.d.ts +41 -0
- package/dist/keyword-splat.js +65 -0
- package/dist/keyword-splat.js.map +1 -0
- package/dist/load-error.d.ts +19 -0
- package/dist/load-error.js +19 -0
- package/dist/load-error.js.map +1 -0
- package/dist/load.d.ts +121 -0
- package/dist/load.js +263 -0
- package/dist/load.js.map +1 -0
- package/dist/loaded-features.d.ts +13 -0
- package/dist/loaded-features.js +15 -0
- package/dist/loaded-features.js.map +1 -0
- package/dist/local-jump-error.d.ts +12 -0
- package/dist/local-jump-error.js +12 -0
- package/dist/local-jump-error.js.map +1 -0
- package/dist/logger/formatter.d.ts +21 -0
- package/dist/logger/formatter.js +43 -0
- package/dist/logger/formatter.js.map +1 -0
- package/dist/logger/log-device.d.ts +52 -0
- package/dist/logger/log-device.js +104 -0
- package/dist/logger/log-device.js.map +1 -0
- package/dist/logger/severity.d.ts +23 -0
- package/dist/logger/severity.js +42 -0
- package/dist/logger/severity.js.map +1 -0
- package/dist/logger.d.ts +127 -0
- package/dist/logger.js +215 -0
- package/dist/logger.js.map +1 -0
- package/dist/marshal.d.ts +83 -0
- package/dist/marshal.js +1487 -0
- package/dist/marshal.js.map +1 -0
- package/dist/match-data.d.ts +161 -0
- package/dist/match-data.js +284 -0
- package/dist/match-data.js.map +1 -0
- package/dist/method-cache.d.ts +17 -0
- package/dist/method-cache.js +19 -0
- package/dist/method-cache.js.map +1 -0
- package/dist/method-missing-proxy.d.ts +53 -0
- package/dist/method-missing-proxy.js +154 -0
- package/dist/method-missing-proxy.js.map +1 -0
- package/dist/method.d.ts +132 -0
- package/dist/method.js +320 -0
- package/dist/method.js.map +1 -0
- package/dist/monitor.d.ts +114 -0
- package/dist/monitor.js +270 -0
- package/dist/monitor.js.map +1 -0
- package/dist/mutex.d.ts +51 -0
- package/dist/mutex.js +150 -0
- package/dist/mutex.js.map +1 -0
- package/dist/name-error.d.ts +45 -0
- package/dist/name-error.js +54 -0
- package/dist/name-error.js.map +1 -0
- package/dist/net/http/exceptions.d.ts +31 -0
- package/dist/net/http/exceptions.js +46 -0
- package/dist/net/http/exceptions.js.map +1 -0
- package/dist/net/http/request.d.ts +137 -0
- package/dist/net/http/request.js +559 -0
- package/dist/net/http/request.js.map +1 -0
- package/dist/net/http/requests.d.ts +197 -0
- package/dist/net/http/requests.js +197 -0
- package/dist/net/http/requests.js.map +1 -0
- package/dist/net/http/response.d.ts +141 -0
- package/dist/net/http/response.js +416 -0
- package/dist/net/http/response.js.map +1 -0
- package/dist/net/http/responses.d.ts +345 -0
- package/dist/net/http/responses.js +486 -0
- package/dist/net/http/responses.js.map +1 -0
- package/dist/net/http.d.ts +278 -0
- package/dist/net/http.js +760 -0
- package/dist/net/http.js.map +1 -0
- package/dist/net/protocol.d.ts +227 -0
- package/dist/net/protocol.js +392 -0
- package/dist/net/protocol.js.map +1 -0
- package/dist/nil-class.d.ts +10 -0
- package/dist/nil-class.js +27 -0
- package/dist/nil-class.js.map +1 -0
- package/dist/no-method-error.d.ts +38 -0
- package/dist/no-method-error.js +45 -0
- package/dist/no-method-error.js.map +1 -0
- package/dist/not-implemented-error.d.ts +13 -0
- package/dist/not-implemented-error.js +14 -0
- package/dist/not-implemented-error.js.map +1 -0
- package/dist/numeric.d.ts +211 -0
- package/dist/numeric.js +802 -0
- package/dist/numeric.js.map +1 -0
- package/dist/object-space.d.ts +34 -0
- package/dist/object-space.js +152 -0
- package/dist/object-space.js.map +1 -0
- package/dist/object.d.ts +908 -0
- package/dist/object.js +2238 -0
- package/dist/object.js.map +1 -0
- package/dist/open-uri.d.ts +180 -0
- package/dist/open-uri.js +402 -0
- package/dist/open-uri.js.map +1 -0
- package/dist/open3.d.ts +69 -0
- package/dist/open3.js +134 -0
- package/dist/open3.js.map +1 -0
- package/dist/openssl.d.ts +479 -0
- package/dist/openssl.js +1052 -0
- package/dist/openssl.js.map +1 -0
- package/dist/optparse.d.ts +130 -0
- package/dist/optparse.js +457 -0
- package/dist/optparse.js.map +1 -0
- package/dist/os-adapter.d.ts +20 -0
- package/dist/os-adapter.js +95 -0
- package/dist/os-adapter.js.map +1 -0
- package/dist/pathname.d.ts +71 -0
- package/dist/pathname.js +394 -0
- package/dist/pathname.js.map +1 -0
- package/dist/pp.d.ts +60 -0
- package/dist/pp.js +195 -0
- package/dist/pp.js.map +1 -0
- package/dist/pretty-print.d.ts +89 -0
- package/dist/pretty-print.js +232 -0
- package/dist/pretty-print.js.map +1 -0
- package/dist/process-adapter.d.ts +224 -0
- package/dist/process-adapter.js +878 -0
- package/dist/process-adapter.js.map +1 -0
- package/dist/process.d.ts +192 -0
- package/dist/process.js +403 -0
- package/dist/process.js.map +1 -0
- package/dist/psych/class-loader.d.ts +92 -0
- package/dist/psych/class-loader.js +139 -0
- package/dist/psych/class-loader.js.map +1 -0
- package/dist/psych/coder.d.ts +144 -0
- package/dist/psych/coder.js +176 -0
- package/dist/psych/coder.js.map +1 -0
- package/dist/psych/core-ext.d.ts +8 -0
- package/dist/psych/core-ext.js +10 -0
- package/dist/psych/core-ext.js.map +1 -0
- package/dist/psych/emitter.d.ts +116 -0
- package/dist/psych/emitter.js +1130 -0
- package/dist/psych/emitter.js.map +1 -0
- package/dist/psych/exception.d.ts +43 -0
- package/dist/psych/exception.js +54 -0
- package/dist/psych/exception.js.map +1 -0
- package/dist/psych/handler.d.ts +59 -0
- package/dist/psych/handler.js +95 -0
- package/dist/psych/handler.js.map +1 -0
- package/dist/psych/handlers/document-stream.d.ts +17 -0
- package/dist/psych/handlers/document-stream.js +26 -0
- package/dist/psych/handlers/document-stream.js.map +1 -0
- package/dist/psych/nodes/alias.d.ts +15 -0
- package/dist/psych/nodes/alias.js +22 -0
- package/dist/psych/nodes/alias.js.map +1 -0
- package/dist/psych/nodes/document.d.ts +23 -0
- package/dist/psych/nodes/document.js +35 -0
- package/dist/psych/nodes/document.js.map +1 -0
- package/dist/psych/nodes/mapping.d.ts +25 -0
- package/dist/psych/nodes/mapping.js +35 -0
- package/dist/psych/nodes/mapping.js.map +1 -0
- package/dist/psych/nodes/node.d.ts +59 -0
- package/dist/psych/nodes/node.js +79 -0
- package/dist/psych/nodes/node.js.map +1 -0
- package/dist/psych/nodes/scalar.d.ts +35 -0
- package/dist/psych/nodes/scalar.js +47 -0
- package/dist/psych/nodes/scalar.js.map +1 -0
- package/dist/psych/nodes/sequence.d.ts +25 -0
- package/dist/psych/nodes/sequence.js +35 -0
- package/dist/psych/nodes/sequence.js.map +1 -0
- package/dist/psych/nodes/stream.d.ts +23 -0
- package/dist/psych/nodes/stream.js +31 -0
- package/dist/psych/nodes/stream.js.map +1 -0
- package/dist/psych/omap.d.ts +9 -0
- package/dist/psych/omap.js +9 -0
- package/dist/psych/omap.js.map +1 -0
- package/dist/psych/parser.d.ts +41 -0
- package/dist/psych/parser.js +139 -0
- package/dist/psych/parser.js.map +1 -0
- package/dist/psych/scalar-scanner.d.ts +35 -0
- package/dist/psych/scalar-scanner.js +173 -0
- package/dist/psych/scalar-scanner.js.map +1 -0
- package/dist/psych/syntax-error.d.ts +23 -0
- package/dist/psych/syntax-error.js +35 -0
- package/dist/psych/syntax-error.js.map +1 -0
- package/dist/psych/tree-builder.d.ts +51 -0
- package/dist/psych/tree-builder.js +118 -0
- package/dist/psych/tree-builder.js.map +1 -0
- package/dist/psych/visitors/depth-first.d.ts +27 -0
- package/dist/psych/visitors/depth-first.js +37 -0
- package/dist/psych/visitors/depth-first.js.map +1 -0
- package/dist/psych/visitors/emitter.d.ts +32 -0
- package/dist/psych/visitors/emitter.js +63 -0
- package/dist/psych/visitors/emitter.js.map +1 -0
- package/dist/psych/visitors/to-ruby.d.ts +110 -0
- package/dist/psych/visitors/to-ruby.js +396 -0
- package/dist/psych/visitors/to-ruby.js.map +1 -0
- package/dist/psych/visitors/visitor.d.ts +11 -0
- package/dist/psych/visitors/visitor.js +17 -0
- package/dist/psych/visitors/visitor.js.map +1 -0
- package/dist/psych/visitors/yaml-tree.d.ts +182 -0
- package/dist/psych/visitors/yaml-tree.js +593 -0
- package/dist/psych/visitors/yaml-tree.js.map +1 -0
- package/dist/psych-adapter.d.ts +65 -0
- package/dist/psych-adapter.js +121 -0
- package/dist/psych-adapter.js.map +1 -0
- package/dist/psych-yaml.d.ts +2 -0
- package/dist/psych-yaml.js +5 -0
- package/dist/psych-yaml.js.map +1 -0
- package/dist/psych.d.ts +257 -0
- package/dist/psych.js +332 -0
- package/dist/psych.js.map +1 -0
- package/dist/queue.d.ts +129 -0
- package/dist/queue.js +215 -0
- package/dist/queue.js.map +1 -0
- package/dist/racc/parser.d.ts +70 -0
- package/dist/racc/parser.js +206 -0
- package/dist/racc/parser.js.map +1 -0
- package/dist/range-error.d.ts +15 -0
- package/dist/range-error.js +15 -0
- package/dist/range-error.js.map +1 -0
- package/dist/range.d.ts +166 -0
- package/dist/range.js +421 -0
- package/dist/range.js.map +1 -0
- package/dist/rational.d.ts +167 -0
- package/dist/rational.js +379 -0
- package/dist/rational.js.map +1 -0
- package/dist/rb-config.d.ts +33 -0
- package/dist/rb-config.js +53 -0
- package/dist/rb-config.js.map +1 -0
- package/dist/rb-equal.d.ts +66 -0
- package/dist/rb-equal.js +261 -0
- package/dist/rb-equal.js.map +1 -0
- package/dist/rb-hash.d.ts +26 -0
- package/dist/rb-hash.js +108 -0
- package/dist/rb-hash.js.map +1 -0
- package/dist/regexp.d.ts +82 -0
- package/dist/regexp.js +191 -0
- package/dist/regexp.js.map +1 -0
- package/dist/repl-adapter.d.ts +188 -0
- package/dist/repl-adapter.js +388 -0
- package/dist/repl-adapter.js.map +1 -0
- package/dist/resolv.d.ts +30 -0
- package/dist/resolv.js +48 -0
- package/dist/resolv.js.map +1 -0
- package/dist/ruby-empty.d.ts +28 -0
- package/dist/ruby-empty.js +40 -0
- package/dist/ruby-empty.js.map +1 -0
- package/dist/ruby-platform.d.ts +39 -0
- package/dist/ruby-platform.js +49 -0
- package/dist/ruby-platform.js.map +1 -0
- package/dist/runtime-error.d.ts +15 -0
- package/dist/runtime-error.js +16 -0
- package/dist/runtime-error.js.map +1 -0
- package/dist/scheduled-task.d.ts +73 -0
- package/dist/scheduled-task.js +150 -0
- package/dist/scheduled-task.js.map +1 -0
- package/dist/secure-random.d.ts +33 -0
- package/dist/secure-random.js +78 -0
- package/dist/secure-random.js.map +1 -0
- package/dist/set.d.ts +158 -0
- package/dist/set.js +352 -0
- package/dist/set.js.map +1 -0
- package/dist/shellwords.d.ts +27 -0
- package/dist/shellwords.js +53 -0
- package/dist/shellwords.js.map +1 -0
- package/dist/signal-exception.d.ts +21 -0
- package/dist/signal-exception.js +21 -0
- package/dist/signal-exception.js.map +1 -0
- package/dist/socket.d.ts +230 -0
- package/dist/socket.js +484 -0
- package/dist/socket.js.map +1 -0
- package/dist/standard-error.d.ts +18 -0
- package/dist/standard-error.js +23 -0
- package/dist/standard-error.js.map +1 -0
- package/dist/stop-iteration.d.ts +10 -0
- package/dist/stop-iteration.js +10 -0
- package/dist/stop-iteration.js.map +1 -0
- package/dist/string/b.d.ts +19 -0
- package/dist/string/b.js +28 -0
- package/dist/string/b.js.map +1 -0
- package/dist/string/byte-methods.d.ts +57 -0
- package/dist/string/byte-methods.js +266 -0
- package/dist/string/byte-methods.js.map +1 -0
- package/dist/string/bytes.d.ts +35 -0
- package/dist/string/bytes.js +123 -0
- package/dist/string/bytes.js.map +1 -0
- package/dist/string/case-mapping.d.ts +57 -0
- package/dist/string/case-mapping.js +192 -0
- package/dist/string/case-mapping.js.map +1 -0
- package/dist/string/chomp.d.ts +15 -0
- package/dist/string/chomp.js +32 -0
- package/dist/string/chomp.js.map +1 -0
- package/dist/string/convert.d.ts +55 -0
- package/dist/string/convert.js +316 -0
- package/dist/string/convert.js.map +1 -0
- package/dist/string/delete.d.ts +14 -0
- package/dist/string/delete.js +17 -0
- package/dist/string/delete.js.map +1 -0
- package/dist/string/each.d.ts +108 -0
- package/dist/string/each.js +305 -0
- package/dist/string/each.js.map +1 -0
- package/dist/string/encode.d.ts +37 -0
- package/dist/string/encode.js +268 -0
- package/dist/string/encode.js.map +1 -0
- package/dist/string/force-encoding.d.ts +72 -0
- package/dist/string/force-encoding.js +147 -0
- package/dist/string/force-encoding.js.map +1 -0
- package/dist/string/inspect.d.ts +17 -0
- package/dist/string/inspect.js +81 -0
- package/dist/string/inspect.js.map +1 -0
- package/dist/string/method-table.d.ts +174 -0
- package/dist/string/method-table.js +805 -0
- package/dist/string/method-table.js.map +1 -0
- package/dist/string/scrub.d.ts +12 -0
- package/dist/string/scrub.js +33 -0
- package/dist/string/scrub.js.map +1 -0
- package/dist/string/slice.d.ts +26 -0
- package/dist/string/slice.js +73 -0
- package/dist/string/slice.js.map +1 -0
- package/dist/string/split.d.ts +11 -0
- package/dist/string/split.js +44 -0
- package/dist/string/split.js.map +1 -0
- package/dist/string/sub.d.ts +114 -0
- package/dist/string/sub.js +371 -0
- package/dist/string/sub.js.map +1 -0
- package/dist/string/succ.d.ts +14 -0
- package/dist/string/succ.js +118 -0
- package/dist/string/succ.js.map +1 -0
- package/dist/string/support.d.ts +135 -0
- package/dist/string/support.js +283 -0
- package/dist/string/support.js.map +1 -0
- package/dist/string/tr.d.ts +46 -0
- package/dist/string/tr.js +156 -0
- package/dist/string/tr.js.map +1 -0
- package/dist/string-io.d.ts +166 -0
- package/dist/string-io.js +248 -0
- package/dist/string-io.js.map +1 -0
- package/dist/string-scanner.d.ts +133 -0
- package/dist/string-scanner.js +248 -0
- package/dist/string-scanner.js.map +1 -0
- package/dist/struct.d.ts +54 -0
- package/dist/struct.js +222 -0
- package/dist/struct.js.map +1 -0
- package/dist/symbol.d.ts +48 -0
- package/dist/symbol.js +107 -0
- package/dist/symbol.js.map +1 -0
- package/dist/tempfile.d.ts +173 -0
- package/dist/tempfile.js +290 -0
- package/dist/tempfile.js.map +1 -0
- package/dist/temporal-tag.d.ts +23 -0
- package/dist/temporal-tag.js +29 -0
- package/dist/temporal-tag.js.map +1 -0
- package/dist/thread-error.d.ts +13 -0
- package/dist/thread-error.js +13 -0
- package/dist/thread-error.js.map +1 -0
- package/dist/thread-pool-executor.d.ts +119 -0
- package/dist/thread-pool-executor.js +250 -0
- package/dist/thread-pool-executor.js.map +1 -0
- package/dist/thread.d.ts +211 -0
- package/dist/thread.js +495 -0
- package/dist/thread.js.map +1 -0
- package/dist/timeout.d.ts +29 -0
- package/dist/timeout.js +41 -0
- package/dist/timeout.js.map +1 -0
- package/dist/tse.d.ts +40 -0
- package/dist/tse.js +62 -0
- package/dist/tse.js.map +1 -0
- package/dist/type-error.d.ts +14 -0
- package/dist/type-error.js +15 -0
- package/dist/type-error.js.map +1 -0
- package/dist/undefined-conversion-error.d.ts +10 -0
- package/dist/undefined-conversion-error.js +10 -0
- package/dist/undefined-conversion-error.js.map +1 -0
- package/dist/uri/common.d.ts +209 -0
- package/dist/uri/common.js +369 -0
- package/dist/uri/common.js.map +1 -0
- package/dist/uri/generic.d.ts +283 -0
- package/dist/uri/generic.js +810 -0
- package/dist/uri/generic.js.map +1 -0
- package/dist/uri/http.d.ts +23 -0
- package/dist/uri/http.js +30 -0
- package/dist/uri/http.js.map +1 -0
- package/dist/uri/https.d.ts +13 -0
- package/dist/uri/https.js +15 -0
- package/dist/uri/https.js.map +1 -0
- package/dist/uri/rfc2396-parser.d.ts +70 -0
- package/dist/uri/rfc2396-parser.js +264 -0
- package/dist/uri/rfc2396-parser.js.map +1 -0
- package/dist/uri/rfc3986-parser.d.ts +46 -0
- package/dist/uri/rfc3986-parser.js +171 -0
- package/dist/uri/rfc3986-parser.js.map +1 -0
- package/dist/uri.d.ts +13 -0
- package/dist/uri.js +13 -0
- package/dist/uri.js.map +1 -0
- package/dist/variable.d.ts +183 -0
- package/dist/variable.js +463 -0
- package/dist/variable.js.map +1 -0
- package/dist/verbose.d.ts +21 -0
- package/dist/verbose.js +26 -0
- package/dist/verbose.js.map +1 -0
- package/dist/yaml.d.ts +9 -0
- package/dist/yaml.js +9 -0
- package/dist/yaml.js.map +1 -0
- package/dist/zlib-adapter.d.ts +117 -0
- package/dist/zlib-adapter.js +250 -0
- package/dist/zlib-adapter.js.map +1 -0
- package/dist/zlib.d.ts +248 -0
- package/dist/zlib.js +362 -0
- package/dist/zlib.js.map +1 -0
- package/package.json +82 -3
package/dist/object.d.ts
ADDED
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
import { classpaths } from "./classpath.js";
|
|
2
|
+
/**
|
|
3
|
+
* Each method's `super` slot, which {@link rbSeatSuper} writes and
|
|
4
|
+
* `rbCallSuper` reads (MRI `vm_search_super_method`,
|
|
5
|
+
* `vendor/ruby/v3.3.11/vm_insnhelper.c:4680`).
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
* @noRailsEquivalent PERMANENT
|
|
9
|
+
*/
|
|
10
|
+
export declare const superSlots: WeakMap<(...args: never[]) => unknown, {
|
|
11
|
+
slot: symbol;
|
|
12
|
+
key: string;
|
|
13
|
+
seats?: number;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* A method's own copy of its {@link superSlots} slot (MRI
|
|
17
|
+
* `vm_search_super_method`, `vendor/ruby/v3.3.11/vm_insnhelper.c:4680`).
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
* @noRailsEquivalent PERMANENT
|
|
21
|
+
* @perf 10ns — PERMANENT
|
|
22
|
+
*/
|
|
23
|
+
export declare const _superSlot: unique symbol;
|
|
24
|
+
/**
|
|
25
|
+
* `method`'s entry in {@link superSlots}, made on first use under the `key`
|
|
26
|
+
* it is being installed as, the `original_id` MRI's `vm_search_super_method`
|
|
27
|
+
* (`vendor/ruby/v3.3.11/vm_insnhelper.c:4680`) searches by.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
* @noRailsEquivalent PERMANENT
|
|
31
|
+
*/
|
|
32
|
+
export declare function superSlotFor(method: (...args: never[]) => unknown, key: string): {
|
|
33
|
+
slot: symbol;
|
|
34
|
+
key: string;
|
|
35
|
+
seats?: number;
|
|
36
|
+
};
|
|
37
|
+
type Klass = abstract new (...args: never) => unknown;
|
|
38
|
+
/**
|
|
39
|
+
* `rb_obj_class` (`vendor/ruby/v3.3.11/object.c:265`), `Object#class`: the
|
|
40
|
+
* class object, read as `rb_class_of`
|
|
41
|
+
* (`vendor/ruby/v3.3.11/include/ruby/internal/globals.h:172`) reads it for the
|
|
42
|
+
* immediates Ruby answers a class for without a heap object, and otherwise
|
|
43
|
+
* the constructor, which a singleton class leaves naming the real class.
|
|
44
|
+
*
|
|
45
|
+
* @boundary: a JS `number` is the seat for both `Integer` and `Float`, so
|
|
46
|
+
* which one it is is read off the value; a `Uint8Array` is the binary
|
|
47
|
+
* `String` seat, and an instance of a `Uint8Array` subclass is an instance of
|
|
48
|
+
* that String subclass, whose ancestry `class_search_ancestor` continues
|
|
49
|
+
* into `String`'s at `Uint8Array.prototype`; a Temporal value carrying an instant
|
|
50
|
+
* is a Ruby `Time`, by the same reading `cmp` orders it with, and so are a JS
|
|
51
|
+
* `Date` and a `Temporal.PlainTime`. A function is a `Class` when its
|
|
52
|
+
* `prototype` is non-writable and a `Proc` otherwise. `Temporal.PlainDate` and
|
|
53
|
+
* `Temporal.PlainDateTime` are the seats of `Date` and `DateTime`, and a
|
|
54
|
+
* record whose prototype chain holds no class is a `Hash`, or a `Module` when
|
|
55
|
+
* `const_set` or `defineModule` marked it (`rb_obj_class`,
|
|
56
|
+
* `vendor/ruby/v3.3.11/object.c:296`). `-0` is a whole
|
|
57
|
+
* `number` and so an `Integer`, though Ruby has no negative Integer zero: JS
|
|
58
|
+
* integer arithmetic answers `-0` (`Math.round(-0.4)`, `0 * -1`) where Ruby
|
|
59
|
+
* answers `0`, so reading it as `-0.0` would turn those into Floats. The
|
|
60
|
+
* Float `-0.0` is the boxed `new Number(-0)`.
|
|
61
|
+
*
|
|
62
|
+
* @noRailsEquivalent PERMANENT
|
|
63
|
+
*/
|
|
64
|
+
export declare function rbObjClass(obj: unknown): Klass;
|
|
65
|
+
/**
|
|
66
|
+
* The receiver phrase of `name_err_mesg_to_str`
|
|
67
|
+
* (`vendor/ruby/v3.3.11/error.c:2325-2390`), the `%3$s%4$s` of an
|
|
68
|
+
* `undefined method '…' for …` message: `nil`, `true` or `false` for those
|
|
69
|
+
* receivers, `module M` / `class C` for a module or class, and
|
|
70
|
+
* `an instance of C` otherwise.
|
|
71
|
+
*
|
|
72
|
+
* @noRailsEquivalent PERMANENT
|
|
73
|
+
*/
|
|
74
|
+
export declare function nameErrMesgReceiver(obj: unknown): string;
|
|
75
|
+
/**
|
|
76
|
+
* `rb_obj_classname` (`vendor/ruby/v3.3.11/variable.c:498`): the
|
|
77
|
+
* {@link rbModToS} of the class {@link rbObjClass} answers, which is how Ruby
|
|
78
|
+
* interpolates `obj.class`.
|
|
79
|
+
*
|
|
80
|
+
* @noRailsEquivalent PERMANENT
|
|
81
|
+
*/
|
|
82
|
+
export declare function rbObjClassname(x: unknown): string;
|
|
83
|
+
/**
|
|
84
|
+
* `rb_set_class_path_string` (`vendor/ruby/v3.3.11/variable.c:407`), by which
|
|
85
|
+
* `declare_under` (`vendor/ruby/v3.3.11/vm_insnhelper.c:5375`) paths a class
|
|
86
|
+
* after the cbase it is declared in: `under`'s path, `::`, and `name`.
|
|
87
|
+
*
|
|
88
|
+
* @noRailsEquivalent PERMANENT
|
|
89
|
+
*/
|
|
90
|
+
export declare function rbSetClassPathString(klass: abstract new (...args: never) => unknown, under: {
|
|
91
|
+
readonly name: string | null;
|
|
92
|
+
}, name: string): void;
|
|
93
|
+
/** @noRailsEquivalent PERMANENT */
|
|
94
|
+
export interface TopLevelConstants {
|
|
95
|
+
ENV?: typeof import("./process-adapter.js").env;
|
|
96
|
+
Net?: import("./net/protocol.js").NetModule;
|
|
97
|
+
Object?: ObjectConstructor;
|
|
98
|
+
Psych?: typeof import("./psych.js").Psych;
|
|
99
|
+
URI?: typeof import("./uri/common.js").URI;
|
|
100
|
+
TSREPL?: typeof import("./repl-adapter.js").TSREPL;
|
|
101
|
+
}
|
|
102
|
+
/** @noRailsEquivalent PERMANENT */
|
|
103
|
+
export interface ConstantTable {
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Ruby's top-level `Object`, whose constant table is
|
|
107
|
+
* `RCLASS_CONST_TBL(rb_cObject)` (`vendor/ruby/v3.3.11/internal/class.h:95`). It
|
|
108
|
+
* lives with `rb_cObject` so `object.ts` reads it without importing
|
|
109
|
+
* `variable.ts`, whose load-time core-class seats need this module
|
|
110
|
+
* evaluated first. It has no prototype, so a name such as `constructor` is
|
|
111
|
+
* not a constant.
|
|
112
|
+
*
|
|
113
|
+
* @noRailsEquivalent PERMANENT
|
|
114
|
+
*/
|
|
115
|
+
export declare const TopLevel: TopLevelConstants;
|
|
116
|
+
/**
|
|
117
|
+
* The one class object a core class has once a gem reopens it
|
|
118
|
+
* (`class Date extends rbCDate`, seated on `TopLevel`): MRI has one
|
|
119
|
+
* `cDate` (`vendor/ruby/v3.3.11/ext/date/date_core.c:9604`), so the seat and
|
|
120
|
+
* the class reopening it are the same class. A class nothing reopens is
|
|
121
|
+
* answered as it is.
|
|
122
|
+
*
|
|
123
|
+
* @noRailsEquivalent PERMANENT
|
|
124
|
+
*/
|
|
125
|
+
export declare function reopened(klass: object): object;
|
|
126
|
+
/**
|
|
127
|
+
* `FL_SINGLETON` (`vendor/ruby/v3.3.11/include/ruby/internal/fl_type.h:58`), the
|
|
128
|
+
* flag marking a class as some object's singleton class.
|
|
129
|
+
*
|
|
130
|
+
* @noRailsEquivalent PERMANENT
|
|
131
|
+
*/
|
|
132
|
+
export declare const FL_SINGLETON: unique symbol;
|
|
133
|
+
/**
|
|
134
|
+
* `rb_obj_singleton_class` (`vendor/ruby/v3.3.11/object.c:288`), Ruby's
|
|
135
|
+
* `Kernel#singleton_class`, over `singleton_class_of` (`vendor/ruby/v3.3.11/class.c:2215`):
|
|
136
|
+
* the receiver's own class, created on first call and inserted between the
|
|
137
|
+
* object and its class. The JS seat is a subclass of `obj.constructor` that
|
|
138
|
+
* becomes the object's prototype. Its `prototype.constructor` stays the
|
|
139
|
+
* attached object's class, because `rb_obj_class` skips a singleton class
|
|
140
|
+
* (`vendor/ruby/v3.3.11/object.c:296`): `obj.constructor` keeps answering Ruby's
|
|
141
|
+
* `obj.class`. Ruby gives a class receiver a metaclass
|
|
142
|
+
* (`vendor/ruby/v3.3.11/class.c:2240`); a JS class has none apart from its own
|
|
143
|
+
* statics, so a class receiver is unsupported here and raises `TypeError`,
|
|
144
|
+
* a trails limitation rather than Ruby behavior.
|
|
145
|
+
*
|
|
146
|
+
* @noRailsEquivalent PERMANENT
|
|
147
|
+
*/
|
|
148
|
+
export declare function rbObjSingletonClass(obj: object): abstract new (...args: never) => object;
|
|
149
|
+
/**
|
|
150
|
+
* `rb_singleton_class` (`vendor/ruby/v3.3.11/class.c:2286`). An object
|
|
151
|
+
* receiver answers {@link rbObjSingletonClass}. A class receiver answers its
|
|
152
|
+
* metaclass (`make_metaclass`, `vendor/ruby/v3.3.11/class.c:757`): a JS class's
|
|
153
|
+
* singleton methods are its own statics, so the metaclass's method table, its
|
|
154
|
+
* `prototype`, is the class itself, and `prepend` onto it writes the statics.
|
|
155
|
+
*
|
|
156
|
+
* @noRailsEquivalent PERMANENT
|
|
157
|
+
*/
|
|
158
|
+
export declare function rbSingletonClass(obj: object): abstract new (...args: never) => object;
|
|
159
|
+
/**
|
|
160
|
+
* `rb_class_of` (`vendor/ruby/v3.3.11/include/ruby/internal/globals.h:172`):
|
|
161
|
+
* the singleton class when the object has one, where {@link rbObjClass}
|
|
162
|
+
* skips it, and the class {@link rbObjClass} answers otherwise.
|
|
163
|
+
*
|
|
164
|
+
* @noRailsEquivalent PERMANENT
|
|
165
|
+
*/
|
|
166
|
+
export declare function rbClassOf(obj: unknown): Klass;
|
|
167
|
+
/**
|
|
168
|
+
* `T_ICLASS` (`vendor/ruby/v3.3.11/include/ruby/internal/value_type.h:140`), the
|
|
169
|
+
* type of the hidden class an `include` or `extend` splices into an ancestry. A link
|
|
170
|
+
* carries the module it stands for under this key.
|
|
171
|
+
*
|
|
172
|
+
* @noRailsEquivalent PERMANENT
|
|
173
|
+
*/
|
|
174
|
+
export declare const T_ICLASS: unique symbol;
|
|
175
|
+
/**
|
|
176
|
+
* `rb_class_superclass` (`vendor/ruby/v3.3.11/object.c:2191`), `Class#superclass`:
|
|
177
|
+
* the next `T_CLASS` in the ancestry, so the iclass an `extend` put above the
|
|
178
|
+
* class is skipped, where `Object.getPrototypeOf` answers it.
|
|
179
|
+
*
|
|
180
|
+
* @noRailsEquivalent PERMANENT
|
|
181
|
+
*/
|
|
182
|
+
export declare function rbClassSuperclass<T extends object>(klass: T): T | null;
|
|
183
|
+
export { classpaths };
|
|
184
|
+
/**
|
|
185
|
+
* `rb_cBasicObject` (`vendor/ruby/v3.3.11/object.c:4200`). `Object.prototype`
|
|
186
|
+
* is the seat of `Object`, so this prototype has no parent.
|
|
187
|
+
* @noRailsEquivalent PERMANENT
|
|
188
|
+
*/
|
|
189
|
+
export declare const rbCBasicObject: new () => object;
|
|
190
|
+
/**
|
|
191
|
+
* `rb_cClass` (`vendor/ruby/v3.3.11/object.c:4203`), a `Module` once include.ts loads.
|
|
192
|
+
* @noRailsEquivalent PERMANENT
|
|
193
|
+
*/
|
|
194
|
+
export declare const rbCClass: new () => object;
|
|
195
|
+
/**
|
|
196
|
+
* `rb_cNumeric` (`vendor/ruby/v3.3.11/numeric.c:6156`). `Rational`
|
|
197
|
+
* (`vendor/ruby/v3.3.11/rational.c:2759`), `Complex`
|
|
198
|
+
* (`vendor/ruby/v3.3.11/complex.c:2529`) and `BigDecimal`
|
|
199
|
+
* (`vendor/ruby/v3.3.11/ext/bigdecimal/bigdecimal.c:4407`) are seated beneath
|
|
200
|
+
* it at the foot of include.ts, not by `extends`: this module reaches
|
|
201
|
+
* rational.ts through string/method-table.ts and kernel-format.ts, so an
|
|
202
|
+
* `extends rbCNumeric` reads the binding before this module body has run
|
|
203
|
+
* whenever this module is entered first.
|
|
204
|
+
* @noRailsEquivalent PERMANENT
|
|
205
|
+
*/
|
|
206
|
+
export declare const rbCNumeric: new () => object;
|
|
207
|
+
/**
|
|
208
|
+
* `rb_cString` (`vendor/ruby/v3.3.11/string.c:12121`).
|
|
209
|
+
* @noRailsEquivalent PERMANENT
|
|
210
|
+
*/
|
|
211
|
+
export declare const rbCString: new () => object;
|
|
212
|
+
/**
|
|
213
|
+
* `rb_cSymbol` (`vendor/ruby/v3.3.11/string.c:12290`).
|
|
214
|
+
* @noRailsEquivalent PERMANENT
|
|
215
|
+
*/
|
|
216
|
+
export declare const rbCSymbol: new () => object;
|
|
217
|
+
/**
|
|
218
|
+
* `rb_cTime` (`vendor/ruby/v3.3.11/time.c:5832`).
|
|
219
|
+
* @noRailsEquivalent PERMANENT
|
|
220
|
+
*/
|
|
221
|
+
export declare const rbCTime: new () => object;
|
|
222
|
+
/**
|
|
223
|
+
* `cDate` (`vendor/ruby/v3.3.11/ext/date/date_core.c:9604`).
|
|
224
|
+
* @noRailsEquivalent PERMANENT
|
|
225
|
+
*/
|
|
226
|
+
export declare const rbCDate: new () => object;
|
|
227
|
+
/**
|
|
228
|
+
* `cDateTime` (`vendor/ruby/v3.3.11/ext/date/date_core.c:9984`).
|
|
229
|
+
* @noRailsEquivalent PERMANENT
|
|
230
|
+
*/
|
|
231
|
+
export declare const rbCDateTime: new () => object;
|
|
232
|
+
/**
|
|
233
|
+
* `rb_cNilClass` (`vendor/ruby/v3.3.11/object.c:4412`).
|
|
234
|
+
* @noRailsEquivalent PERMANENT
|
|
235
|
+
*/
|
|
236
|
+
export declare const rbCNilClass: new () => object;
|
|
237
|
+
/**
|
|
238
|
+
* `rb_cTrueClass` (`vendor/ruby/v3.3.11/object.c:4498`).
|
|
239
|
+
* @noRailsEquivalent PERMANENT
|
|
240
|
+
*/
|
|
241
|
+
export declare const rbCTrueClass: new () => object;
|
|
242
|
+
/**
|
|
243
|
+
* `rb_cFalseClass` (`vendor/ruby/v3.3.11/object.c:4510`).
|
|
244
|
+
* @noRailsEquivalent PERMANENT
|
|
245
|
+
*/
|
|
246
|
+
export declare const rbCFalseClass: new () => object;
|
|
247
|
+
/**
|
|
248
|
+
* `rb_cInteger` (`vendor/ruby/v3.3.11/numeric.c:6190`).
|
|
249
|
+
* @noRailsEquivalent PERMANENT
|
|
250
|
+
*/
|
|
251
|
+
export declare const rbCInteger: new () => object;
|
|
252
|
+
/**
|
|
253
|
+
* `rb_cFloat` (`vendor/ruby/v3.3.11/numeric.c:6259`).
|
|
254
|
+
* @noRailsEquivalent PERMANENT
|
|
255
|
+
*/
|
|
256
|
+
export declare const rbCFloat: new () => object;
|
|
257
|
+
/**
|
|
258
|
+
* `rb_cArray` (`vendor/ruby/v3.3.11/array.c:8605`): the seat a reopened
|
|
259
|
+
* `class Array` defines its methods on, since a JS array's prototype is the
|
|
260
|
+
* global `Array.prototype`.
|
|
261
|
+
* @noRailsEquivalent PERMANENT
|
|
262
|
+
*/
|
|
263
|
+
export declare const rbCArray: new () => object;
|
|
264
|
+
/**
|
|
265
|
+
* `rb_cProc` (`vendor/ruby/v3.3.11/proc.c:4290`).
|
|
266
|
+
* @noRailsEquivalent PERMANENT
|
|
267
|
+
*/
|
|
268
|
+
export declare const rbCProc: new () => object;
|
|
269
|
+
/**
|
|
270
|
+
* `rb_mod_singleton_p` (`vendor/ruby/v3.3.11/object.c:3050`), `Module#singleton_class?`.
|
|
271
|
+
*
|
|
272
|
+
* @noRailsEquivalent PERMANENT
|
|
273
|
+
*/
|
|
274
|
+
export declare function rbModSingletonP(klass: unknown): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* `rb_class_attached_object` (`vendor/ruby/v3.3.11/class.c:1707-1714`),
|
|
277
|
+
* `Class#attached_object`.
|
|
278
|
+
*
|
|
279
|
+
* @noRailsEquivalent PERMANENT
|
|
280
|
+
*/
|
|
281
|
+
export declare function rbClassAttachedObject(klass: abstract new (...args: never) => unknown): unknown;
|
|
282
|
+
/**
|
|
283
|
+
* `rb_mod_to_s` (`vendor/ruby/v3.3.11/object.c:1710-1742`), `Module#to_s` /
|
|
284
|
+
* `Module#inspect`: a singleton class renders `#<Class:` plus its attached
|
|
285
|
+
* object — `rb_inspect` for a class or module, `rb_any_to_s` otherwise — and
|
|
286
|
+
* `>`; any other class renders `rb_class_name`: its name, or for an anonymous
|
|
287
|
+
* class the `#<Class:0x…>` path `make_temporary_path`
|
|
288
|
+
* (`vendor/ruby/v3.3.11/variable.c:320-336`) gives it. Ruby's refinement arm
|
|
289
|
+
* has no JS seat.
|
|
290
|
+
*
|
|
291
|
+
* @noRailsEquivalent PERMANENT
|
|
292
|
+
*/
|
|
293
|
+
export declare function rbModToS(klass: abstract new (...args: never) => unknown): string;
|
|
294
|
+
/**
|
|
295
|
+
* `rb_mod_name` (`vendor/ruby/v3.3.11/variable.c:122-127`), `Module#name`: the
|
|
296
|
+
* classpath a `const_set` or a module-eval seat gave the class, else the path
|
|
297
|
+
* its package's generated table holds (RFC 0205), else the name its
|
|
298
|
+
* definition gave it, or `nil` while it is anonymous.
|
|
299
|
+
*
|
|
300
|
+
* A class expression with no identifier is Ruby's `Class.new`, which JS names
|
|
301
|
+
* after the binding it is assigned to. Like Ruby, that names the class only
|
|
302
|
+
* when the binding is a constant name (`Foo = Class.new`), not a local
|
|
303
|
+
* (`klass = Class.new`).
|
|
304
|
+
*
|
|
305
|
+
* A minifier that mangles class names is out of scope, as it is for every
|
|
306
|
+
* reader of `name`. A bundle keeps its classes named by preserving names
|
|
307
|
+
* (esbuild `keepNames`) or by seating them.
|
|
308
|
+
*
|
|
309
|
+
* @noRailsEquivalent PERMANENT
|
|
310
|
+
*/
|
|
311
|
+
export declare function rbModName(klass: object): string | null;
|
|
312
|
+
/**
|
|
313
|
+
* The methods a package defines on `Object`, as `rb_define_method` on
|
|
314
|
+
* `rb_cObject` (`vendor/ruby/v3.3.11/class.c:2134`) does, keyed by the camelCased Ruby
|
|
315
|
+
* name, which {@link rbFSend} dispatches for a receiver whose own class
|
|
316
|
+
* defines none: ActiveSupport's `Object#in?`
|
|
317
|
+
* (`activesupport/lib/active_support/core_ext/object/inclusion.rb:15`) is
|
|
318
|
+
* reached by `value.public_send(:in?, range)` on an Integer.
|
|
319
|
+
*
|
|
320
|
+
* @noRailsEquivalent PERMANENT
|
|
321
|
+
*/
|
|
322
|
+
export declare const OBJECT_METHOD_TABLE: Record<string, (self: never, ...args: never[]) => unknown>;
|
|
323
|
+
/**
|
|
324
|
+
* The methods a package defines on `Enumerable`, keyed by the camelCased Ruby
|
|
325
|
+
* name, which {@link rbFSend} dispatches and {@link basicObjRespondTo} answers
|
|
326
|
+
* for on the receivers `each` is bound for: a JS array, a `Set`, and a `Map`
|
|
327
|
+
* or plain hash, whose Ruby classes include `Enumerable`
|
|
328
|
+
* (`vendor/ruby/v3.3.11/array.c:8606`, `lib/set.rb:221`, `hash.c:7184`), and
|
|
329
|
+
* an object that defines `Symbol.iterator`, a class's
|
|
330
|
+
* `include Enumerable` (`enum.c:5061`).
|
|
331
|
+
* ActiveSupport's `Enumerable#maximum`
|
|
332
|
+
* (`activesupport/lib/active_support/core_ext/enumerable.rb:40`) is reached by
|
|
333
|
+
* `object.try(:maximum, :updated_at)` on an Array of records.
|
|
334
|
+
*
|
|
335
|
+
* @noRailsEquivalent PERMANENT
|
|
336
|
+
*/
|
|
337
|
+
export declare const ENUMERABLE_METHOD_TABLE: Record<string, (self: never, ...args: never[]) => unknown>;
|
|
338
|
+
/**
|
|
339
|
+
* `rb_obj_is_proc` (`vendor/ruby/v3.3.11/proc.c:120`): a function that is not
|
|
340
|
+
* a class, which is what a block or a lambda is.
|
|
341
|
+
*
|
|
342
|
+
* @noRailsEquivalent PERMANENT
|
|
343
|
+
*/
|
|
344
|
+
export declare function rbObjIsProc(proc: unknown): proc is AnyFunction;
|
|
345
|
+
/**
|
|
346
|
+
* Ruby's `callable.call(*args)`: `rb_proc_call` (`vendor/ruby/v3.3.11/proc.c:990`)
|
|
347
|
+
* applies a proc to the arguments, where JS `Function.prototype.call` would
|
|
348
|
+
* take the first as `this`; any other receiver answers its own `call`, and one
|
|
349
|
+
* with no `call` member is sent `call`, so it reaches `method_missing` or
|
|
350
|
+
* raises `NoMethodError` as {@link rbFSend} does.
|
|
351
|
+
*
|
|
352
|
+
* @noRailsEquivalent PERMANENT
|
|
353
|
+
*/
|
|
354
|
+
export declare function rbProcCall(callable: unknown, ...args: unknown[]): unknown;
|
|
355
|
+
/**
|
|
356
|
+
* The methods a package defines on `Class`, as `rb_define_method` on
|
|
357
|
+
* `rb_cClass` (`vendor/ruby/v3.3.11/class.c:2134`) does, keyed by the camelCased Ruby
|
|
358
|
+
* name, which {@link basicObjRespondTo} answers for a class receiver:
|
|
359
|
+
* ActiveSupport's `Class#class_attribute`
|
|
360
|
+
* (`activesupport/lib/active_support/core_ext/class/attribute.rb:86`) is what
|
|
361
|
+
* `respond_to?(:class_attribute)` asks of a class and not of a module.
|
|
362
|
+
*
|
|
363
|
+
* @noRailsEquivalent PERMANENT
|
|
364
|
+
*/
|
|
365
|
+
export declare const CLASS_METHOD_TABLE: Record<string, (self: never, ...args: never[]) => unknown>;
|
|
366
|
+
/**
|
|
367
|
+
* The methods bound on a Temporal seat, keyed by its `Symbol.toStringTag` and
|
|
368
|
+
* then by the camelCased Ruby name, which {@link rbFSend} dispatches and
|
|
369
|
+
* {@link basicObjRespondTo} answers for: a Temporal value's prototype carries
|
|
370
|
+
* none of them. `to_date` is Ruby's own, for Date and DateTime
|
|
371
|
+
* (`date_to_date` and `datetime_to_date`,
|
|
372
|
+
* `vendor/ruby/v3.3.11/ext/date/date_core.c:10054,10058`). A package that
|
|
373
|
+
* reopens one of those classes, as ActiveSupport's `core_ext/date_time` does,
|
|
374
|
+
* assigns an entry, as it does on `STRING_METHOD_TABLE`. A JS `Date`, which
|
|
375
|
+
* spells a Ruby Time at the boundary and has no such tag, is keyed `"Date"`:
|
|
376
|
+
* the date package seats `Time#utc?`, `#getutc` and `#getlocal`
|
|
377
|
+
* (`vendor/ruby/v3.3.11/time.c:4340,4425,4374`) there and on
|
|
378
|
+
* `Temporal.Instant`. An instance of {@link rbCDate} (the date package's
|
|
379
|
+
* `Date` and its subclasses) is keyed `"rbCDate"`, for the private methods
|
|
380
|
+
* `Date` defines (`hour` and the rest, `date_core.c:9773-9777`): they answer
|
|
381
|
+
* `send` but not a JS `name in object`, and a subclass's own member, such as
|
|
382
|
+
* `DateTime#hour`, is found first.
|
|
383
|
+
*
|
|
384
|
+
* @noRailsEquivalent PERMANENT
|
|
385
|
+
*/
|
|
386
|
+
export declare const TEMPORAL_METHOD_TABLE: Record<string, Record<string, (self: never, ...args: never[]) => unknown>>;
|
|
387
|
+
/**
|
|
388
|
+
* `basic_obj_respond_to` (`vendor/ruby/v3.3.11/vm_method.c:2864`) — the default
|
|
389
|
+
* `Object#respond_to?`, which answers whether the receiver's class defines the
|
|
390
|
+
* method. A JS object answers a name whether it carries a method or a
|
|
391
|
+
* property, so the prototype-chain lookup is the whole `method_boundp` here,
|
|
392
|
+
* and an own `undefined` value is its `2` (undefined method) case. An unbound
|
|
393
|
+
* name falls through to the receiver's `respond_to_missing?`
|
|
394
|
+
* (`basic_obj_respond_to_missing`, `vm_method.c:2850-2861`).
|
|
395
|
+
* Like `callable_method_entry` there, the entry is found by descriptor lookup,
|
|
396
|
+
* never by a property read a `methodMissingPrototype` `get` trap would answer.
|
|
397
|
+
* `isEmpty` is bound for the core receivers `ruby-empty.ts`'s `isEmpty` answers
|
|
398
|
+
* `empty?` for (`array.c:2686`, `hash.c:3023`, `string.c:2243`), whose JS
|
|
399
|
+
* values carry no such member. `isInclude` is bound for the same receivers and
|
|
400
|
+
* `Set`, which define `include?` (`array.c:8679`, `hash.c:7255`,
|
|
401
|
+
* `string.c:12215`, `lib/set.rb:393`), and `toSym` for every JS string
|
|
402
|
+
* (`string.c:12212`), which spells both a Ruby String and a Ruby Symbol
|
|
403
|
+
* (`":name"`); Symbol answers `to_sym` too (`symbol.rb:8`). `toAry` is bound for a JS array
|
|
404
|
+
* (`array.c:8619`), whose prototype carries no such member. `each` is bound
|
|
405
|
+
* for a JS array, a `Set`, and a `Map` or plain hash (`array.c:8642`,
|
|
406
|
+
* `lib/set.rb:499`, `hash.c:7219`), and `eachPair` for a `Map` or plain hash
|
|
407
|
+
* (`hash.c:7218`). `isInfinite` and
|
|
408
|
+
* `isFinite` are bound for a JS number and bigint, which spell Float
|
|
409
|
+
* (`numeric.c:6376-6377`) and Integer (`numeric.rb:39-48`). `toYaml` is bound for
|
|
410
|
+
* every receiver: Psych defines `to_yaml` on `Object` (`ext/psych/lib/psych/core_ext.rb:12-14`),
|
|
411
|
+
* and trails ports it as the free `toYaml` in `psych/core-ext.ts`. A Temporal seat answers for the methods
|
|
412
|
+
* {@link TEMPORAL_METHOD_TABLE} binds on it.
|
|
413
|
+
*
|
|
414
|
+
* A class receiver (a non-writable `prototype`, which a plain function, the
|
|
415
|
+
* JS spelling of a `Proc`, does not have) answers `Module#respond_to?`: its static data fields hold
|
|
416
|
+
* what Ruby keeps in class-level ivars, not methods, and the lookup stops
|
|
417
|
+
* short of `Function.prototype`, whose `call` / `apply` / `bind` no Ruby
|
|
418
|
+
* `Module` defines. A plain function's own `length` and `name` are its JS
|
|
419
|
+
* arity and function name, which no Ruby `Proc` defines.
|
|
420
|
+
*
|
|
421
|
+
* A writer `name=` is answered by a JS accessor's setter or by a `setName`
|
|
422
|
+
* method, the conventions table's two writer spellings and the entries
|
|
423
|
+
* {@link rbFSend} dispatches it to. An underscore-prefixed writer
|
|
424
|
+
* (`_reflections=`) is a `class_attribute` storage slot and has no `set*`
|
|
425
|
+
* spelling.
|
|
426
|
+
*
|
|
427
|
+
* `method_boundp` (`vm_method.c:1788-1818`) answers `0` for a PRIVATE entry,
|
|
428
|
+
* and under `BOUND_RESPONDS` a PROTECTED one, when `pub` is set. A JS entry
|
|
429
|
+
* carries no visibility, so there is no `pub` to pass (see CLAUDE.md, "Method
|
|
430
|
+
* visibility is compile-time only").
|
|
431
|
+
*
|
|
432
|
+
* @noRailsEquivalent PERMANENT — Ruby core `basic_obj_respond_to`
|
|
433
|
+
* (`vendor/ruby/v3.3.11/vm_method.c:2864`).
|
|
434
|
+
*/
|
|
435
|
+
export declare function basicObjRespondTo(obj: unknown, mid: string): boolean;
|
|
436
|
+
/**
|
|
437
|
+
* `Object#respond_to_missing?` (`obj_respond_to_missing`,
|
|
438
|
+
* `vendor/ruby/v3.3.11/vm_method.c:3009`), the default a class's own
|
|
439
|
+
* `respond_to_missing?` reaches through `super`: it answers false for every
|
|
440
|
+
* name.
|
|
441
|
+
*
|
|
442
|
+
* @noRailsEquivalent PERMANENT — Ruby core `obj_respond_to_missing`
|
|
443
|
+
* (`vendor/ruby/v3.3.11/vm_method.c:3009`).
|
|
444
|
+
*/
|
|
445
|
+
export declare function objRespondToMissing(_obj: unknown, _mid: string, _priv: boolean): boolean;
|
|
446
|
+
/**
|
|
447
|
+
* The `setName` method that answers a Ruby writer `name=` (`rb_id_attrset`,
|
|
448
|
+
* `vendor/ruby/v3.3.11/vm_method.c:1895`) when it is not a JS accessor's
|
|
449
|
+
* setter, as {@link rbFSend} and {@link rbObjRespondTo} look it up.
|
|
450
|
+
*
|
|
451
|
+
* @noRailsEquivalent PERMANENT
|
|
452
|
+
*/
|
|
453
|
+
export declare function writerSpelling(attr: string | undefined): string | undefined;
|
|
454
|
+
/**
|
|
455
|
+
* The `snake_case` to `camelCase` spelling of a Ruby ID `rb_f_send`
|
|
456
|
+
* (`vendor/ruby/v3.3.11/vm_eval.c:1330`) would dispatch.
|
|
457
|
+
*
|
|
458
|
+
* @noRailsEquivalent PERMANENT
|
|
459
|
+
*/
|
|
460
|
+
export declare function camelized(name: string): string;
|
|
461
|
+
/**
|
|
462
|
+
* Thor's `name.tr("-", "_")` reversed (`rb_str_tr`,
|
|
463
|
+
* `vendor/ruby/v3.3.11/string.c:8226`) for a CLI name: RFC 0171 decision 6.
|
|
464
|
+
*
|
|
465
|
+
* @noRailsEquivalent PERMANENT
|
|
466
|
+
*/
|
|
467
|
+
export declare function kebabCase(name: string): string;
|
|
468
|
+
/**
|
|
469
|
+
* `Module#method_defined?` (`rb_mod_method_defined`,
|
|
470
|
+
* `vendor/ruby/v3.3.11/vm_method.c:2055`). A JS entry carries no visibility, so
|
|
471
|
+
* every defined entry answers. A writer `name=` is
|
|
472
|
+
* answered by a JS accessor's setter or a `setName` method, the entries
|
|
473
|
+
* {@link rbFSend} dispatches to. A false `inherit` answers for `mod`'s
|
|
474
|
+
* own method table only (`check_definition_visibility`, `vm_method.c:2000-2013`).
|
|
475
|
+
* A `Module` instance keeps its method table on a private carrier and answers
|
|
476
|
+
* through its own `isMethodDefined`, for that table only whatever `inherit` is:
|
|
477
|
+
* a ruby-compat `Module` copies an included module's methods into its includer
|
|
478
|
+
* and records no ancestor to walk. A plain-object module answers for its own
|
|
479
|
+
* enumerable members, its instance methods, and with `inherit` for the
|
|
480
|
+
* modules it recorded including.
|
|
481
|
+
*
|
|
482
|
+
* @noRailsEquivalent PERMANENT
|
|
483
|
+
*/
|
|
484
|
+
export declare function rbModMethodDefined(mod: {
|
|
485
|
+
prototype: object;
|
|
486
|
+
} | {
|
|
487
|
+
isMethodDefined(mid: string): boolean;
|
|
488
|
+
} | object, mid: string, inherit?: boolean): boolean;
|
|
489
|
+
/**
|
|
490
|
+
* Seats on `target`, in `descriptors`, the `key` method `method` is about to
|
|
491
|
+
* shadow, for {@link rbCallSuper}. A function keeps the key it was first
|
|
492
|
+
* installed under, as MRI's `super` searches by the method's `original_id`
|
|
493
|
+
* (`vendor/ruby/v3.3.11/vm_insnhelper.c:4680`, `vm_search_super_method`).
|
|
494
|
+
* An accessor's `get` and `set` are seated one `half` at a time, as Ruby's
|
|
495
|
+
* `name` and `name=` are two methods.
|
|
496
|
+
*
|
|
497
|
+
* @noRailsEquivalent PERMANENT
|
|
498
|
+
*/
|
|
499
|
+
export declare function rbSeatSuper(target: object, key: string, method: unknown, descriptors: PropertyDescriptorMap, half?: "value" | "get" | "set"): void;
|
|
500
|
+
/**
|
|
501
|
+
* `Module#define_method` on a class receiver (`rb_mod_define_method`,
|
|
502
|
+
* `vendor/ruby/v3.3.11/proc.c:2325`): binds `body` as `mod`'s instance method
|
|
503
|
+
* `mid`. `body` is the block, or the method `define_method(symbol, method)`
|
|
504
|
+
* takes, whose JS carrier is a property descriptor (see
|
|
505
|
+
* `Module#instanceMethod`), so a zero-argument reader can be defined as the
|
|
506
|
+
* accessor it ports to. A JS class has no metaclass apart from its own
|
|
507
|
+
* statics (CLAUDE.md, "`singleton_class` is a per-object subclass"), so a
|
|
508
|
+
* class's `singleton_class.define_method` passes `{ prototype: klass }`.
|
|
509
|
+
*
|
|
510
|
+
* It replaces `mod`'s own `mid`, and its `super` reaches the next `mid` in
|
|
511
|
+
* the ancestry ({@link rbCallSuper}).
|
|
512
|
+
*
|
|
513
|
+
* @noRailsEquivalent PERMANENT
|
|
514
|
+
*/
|
|
515
|
+
export declare function rbModDefineMethod(mod: {
|
|
516
|
+
prototype: object;
|
|
517
|
+
}, mid: string, body: ((...args: never[]) => unknown) | PropertyDescriptor): string;
|
|
518
|
+
/**
|
|
519
|
+
* Whether `half` is the getter or setter {@link defineAccessorHalf} seats for
|
|
520
|
+
* a method the table does not define. Ruby keeps `x` and `x=` as two method
|
|
521
|
+
* entries (`rb_add_method`, `vendor/ruby/v3.3.11/vm_method.c:1146`), so a table
|
|
522
|
+
* with only one of them leaves the other to the next table in the ancestry;
|
|
523
|
+
* every method lookup reads such a half as no entry and keeps walking.
|
|
524
|
+
*
|
|
525
|
+
* @noRailsEquivalent PERMANENT
|
|
526
|
+
*/
|
|
527
|
+
export declare function isAbsentHalf(half: unknown): boolean;
|
|
528
|
+
/**
|
|
529
|
+
* Seats one half of the accessor `name` on `target`, the JS spelling of adding
|
|
530
|
+
* the method entry `name` or `name=` to a method table (`rb_add_method`,
|
|
531
|
+
* `vendor/ruby/v3.3.11/vm_method.c:1146`). A JS accessor is one descriptor, so
|
|
532
|
+
* the half not given keeps `target`'s own, and where `target` has none it
|
|
533
|
+
* defers to the next table up the prototype chain, as Ruby's method search
|
|
534
|
+
* does for an entry the table lacks. `enumerable` is set on a plain-object
|
|
535
|
+
* module, whose enumerable members are the instance methods `include()` copies
|
|
536
|
+
* (CLAUDE.md, "A Ruby module is a JS object or a JS class").
|
|
537
|
+
*
|
|
538
|
+
* @noRailsEquivalent PERMANENT
|
|
539
|
+
*/
|
|
540
|
+
export declare function defineAccessorHalf(target: object, name: string, half: {
|
|
541
|
+
get?: () => unknown;
|
|
542
|
+
set?: (value: unknown) => void;
|
|
543
|
+
enumerable?: boolean;
|
|
544
|
+
}): void;
|
|
545
|
+
/**
|
|
546
|
+
* `Module#undef_method` (`rb_mod_undef_method`,
|
|
547
|
+
* `vendor/ruby/v3.3.11/vm_method.c:1973`). An undefined name raises `NameError`.
|
|
548
|
+
* `name` and `name=` are one JS descriptor, so `name=` is undefined by a `"name="`
|
|
549
|
+
* entry, which every lookup reads first, and `name` by a reader half that stops
|
|
550
|
+
* the search and keeps the writer.
|
|
551
|
+
*
|
|
552
|
+
* @noRailsEquivalent PERMANENT
|
|
553
|
+
*/
|
|
554
|
+
export declare function rbModUndefMethod<K extends {
|
|
555
|
+
prototype: object;
|
|
556
|
+
}>(klass: K, ...names: string[]): K;
|
|
557
|
+
/**
|
|
558
|
+
* `Module#attr_reader` (`rb_mod_attr_reader`, `vendor/ruby/v3.3.11/object.c:2279`).
|
|
559
|
+
*
|
|
560
|
+
* @noRailsEquivalent PERMANENT
|
|
561
|
+
*/
|
|
562
|
+
export declare function rbModAttrReader(klass: {
|
|
563
|
+
prototype: object;
|
|
564
|
+
}, ...argv: string[]): void;
|
|
565
|
+
/**
|
|
566
|
+
* `Module#attr_writer` (`rb_mod_attr_writer`, `vendor/ruby/v3.3.11/object.c:2335`).
|
|
567
|
+
*
|
|
568
|
+
* @noRailsEquivalent PERMANENT
|
|
569
|
+
*/
|
|
570
|
+
export declare function rbModAttrWriter(klass: {
|
|
571
|
+
prototype: object;
|
|
572
|
+
}, ...argv: string[]): void;
|
|
573
|
+
/**
|
|
574
|
+
* Ruby's `obj.to_sym` send: `String#to_sym` (`rb_str_intern`,
|
|
575
|
+
* `vendor/ruby/v3.3.11/symbol.c:862`, bound at `vendor/ruby/v3.3.11/string.c:12212`)
|
|
576
|
+
* and `Symbol#to_sym` (`vendor/ruby/v3.3.11/symbol.rb:8`). A JS string spells
|
|
577
|
+
* both receivers and answers the Symbol's colon spelling (`":name"`); no other
|
|
578
|
+
* core receiver defines `to_sym`, so the send dispatches to a receiver's own
|
|
579
|
+
* `toSym` and otherwise raises `NoMethodError`. It is
|
|
580
|
+
* the send, where {@link stringToSym} is `rb_str_intern` on a known String,
|
|
581
|
+
* as `toI` is to `rbStrToI`.
|
|
582
|
+
*
|
|
583
|
+
* @noRailsEquivalent PERMANENT
|
|
584
|
+
*/
|
|
585
|
+
export declare function toSym(obj: unknown): string;
|
|
586
|
+
/**
|
|
587
|
+
* Ruby's `obj.to_s` send for a receiver that may be a Symbol: `Symbol#to_s`
|
|
588
|
+
* (`rb_sym_to_s`, `vendor/ruby/v3.3.11/string.c:11734`) answers the name of a
|
|
589
|
+
* colon-spelled Symbol (`":name"`), and every other receiver answers as
|
|
590
|
+
* {@link rbObjAsString} does (`String#to_s` is `rb_str_to_s`,
|
|
591
|
+
* `vendor/ruby/v3.3.11/string.c:6648`). It is the send, where
|
|
592
|
+
* {@link symbolToS} is `rb_sym_to_s` on a known Symbol, as `toSym` is to
|
|
593
|
+
* `stringToSym`.
|
|
594
|
+
*
|
|
595
|
+
* @noRailsEquivalent PERMANENT
|
|
596
|
+
*/
|
|
597
|
+
export declare function toS(obj: string): string;
|
|
598
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `rb_str_to_s` (`vendor/ruby/v3.3.11/string.c:6648`). */
|
|
599
|
+
export declare function toS(obj: Uint8Array): Uint8Array;
|
|
600
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `rb_str_to_s` (`vendor/ruby/v3.3.11/string.c:6648`). */
|
|
601
|
+
export declare function toS(obj: string | Uint8Array): string | Uint8Array;
|
|
602
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `rb_str_to_s` (`vendor/ruby/v3.3.11/string.c:6648`). */
|
|
603
|
+
export declare function toS(obj: unknown): string;
|
|
604
|
+
/**
|
|
605
|
+
* `Kernel#send` (`rb_f_send`, `vendor/ruby/v3.3.11/vm_eval.c:1330`): calls the nearest
|
|
606
|
+
* entry for `mid` whatever its visibility. A zero-argument reader ported as a
|
|
607
|
+
* JS accessor or a field answers through its getter or its value, as the Ruby
|
|
608
|
+
* reader it ports would. `infinite?` is dispatched for a JS number and bigint,
|
|
609
|
+
* whose prototypes carry no such member: `Float#infinite?`
|
|
610
|
+
* (`rb_flo_is_infinite_p`, `vendor/ruby/v3.3.11/numeric.c:1992`) answers `1` /
|
|
611
|
+
* `-1` for an infinity and `nil` otherwise, as `Integer#infinite?`
|
|
612
|
+
* (`vendor/ruby/v3.3.11/numeric.rb:48`) always does. `odd?` and `even?` are
|
|
613
|
+
* dispatched for an Integer alone (`rb_int_odd_p` / `rb_int_even_p`,
|
|
614
|
+
* `vendor/ruby/v3.3.11/numeric.c:3564,3588`): a Float defines neither. A
|
|
615
|
+
* predicate sent by its Ruby name (`:odd?`, the value Rails' `NUMBER_CHECKS`
|
|
616
|
+
* holds) reaches those two arms and `OBJECT_METHOD_TABLE` by its `is`-prefixed
|
|
617
|
+
* TS spelling; every other lookup, `method_missing` included, sees the name as
|
|
618
|
+
* sent. An operator is sent by its
|
|
619
|
+
* Ruby name (`">"`), which has no TS method spelling. `==` is {@link rbEqual},
|
|
620
|
+
* which sends the receiver's own `==`, and `!=` its negation
|
|
621
|
+
* (`rb_obj_not_equal`, `vendor/ruby/v3.3.11/object.c:248`). The four ordering
|
|
622
|
+
* operators answer for the receivers that define them in Ruby: between two
|
|
623
|
+
* numbers they are `Integer`'s and `Float`'s own (`rb_int_gt`,
|
|
624
|
+
* `vendor/ruby/v3.3.11/numeric.c:4743`, and `rb_float_gt`, `:1753`), false for
|
|
625
|
+
* a NaN operand and never raising; a number against
|
|
626
|
+
* anything else, and any other `Comparable` receiver (a String, a Time or
|
|
627
|
+
* Date, or an object defining `<=>`), go through `cmpint`
|
|
628
|
+
* (`vendor/ruby/v3.3.11/compar.c:105-147`) and raise `ArgumentError` for a pair
|
|
629
|
+
* `<=>` cannot place. Any other receiver, `nil` included, has no such method
|
|
630
|
+
* and raises `NoMethodError`. `include?` is dispatched for the core receivers
|
|
631
|
+
* {@link basicObjRespondTo} binds it for, when no entry of their own answers
|
|
632
|
+
* (`vendor/ruby/v3.3.11/string.c:12215`, `array.c:8679`, `hash.c:7255`,
|
|
633
|
+
* `lib/set.rb:393`). A Set or Hash looks a member up by `eql?`, so an object a
|
|
634
|
+
* JS `has` misses by identity is compared with `rb_eql` against each key.
|
|
635
|
+
*
|
|
636
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Kernel#send` (`vendor/ruby/v3.3.11/vm_eval.c:1330`).
|
|
637
|
+
*/
|
|
638
|
+
export declare function rbFSend(recv: unknown, mid: unknown, ...args: unknown[]): unknown;
|
|
639
|
+
/**
|
|
640
|
+
* `conversion_mismatch` (`vendor/ruby/v3.3.11/object.c:3132`): the `TypeError`
|
|
641
|
+
* a conversion method raises for answering the wrong type.
|
|
642
|
+
*
|
|
643
|
+
* @noRailsEquivalent PERMANENT
|
|
644
|
+
*/
|
|
645
|
+
export declare function conversionMismatch(val: unknown, tname: string, method: string, result: unknown): never;
|
|
646
|
+
/**
|
|
647
|
+
* The method tables `Module#undef_method` writes its entries into: a data
|
|
648
|
+
* property holding `undefined` on one of them is `VM_METHOD_TYPE_UNDEF`
|
|
649
|
+
* (`vendor/ruby/v3.3.11/vm_method.c:1973` `rb_mod_undef_method`), where the
|
|
650
|
+
* lookup stops and `send` goes to `method_missing`.
|
|
651
|
+
*
|
|
652
|
+
* @noRailsEquivalent PERMANENT
|
|
653
|
+
*/
|
|
654
|
+
export declare const UNDEF_METHOD_TABLES: WeakSet<object>;
|
|
655
|
+
type AnyFunction = (...args: unknown[]) => unknown;
|
|
656
|
+
/**
|
|
657
|
+
* `rb_check_funcall` (`vendor/ruby/v3.3.11/vm_eval.c:687`): the call when the
|
|
658
|
+
* receiver responds to `mid`, else `undefined`, MRI's `Qundef`.
|
|
659
|
+
*
|
|
660
|
+
* @noRailsEquivalent PERMANENT
|
|
661
|
+
*/
|
|
662
|
+
export declare function rbCheckFuncall(recv: unknown, mid: string, ...args: unknown[]): unknown;
|
|
663
|
+
/**
|
|
664
|
+
* `rb_obj_respond_to` (`vendor/ruby/v3.3.11/vm_method.c:2934`) — the SEND of
|
|
665
|
+
* `respond_to?`, which `vm_respond_to` (`vm_method.c:2882`) routes through an
|
|
666
|
+
* overridden `respond_to?` when the receiver's class defines one (as
|
|
667
|
+
* `ActiveModel::AttributeMethods` does) — with no private-methods argument,
|
|
668
|
+
* since a JS entry carries no visibility (`vm_method.c:2896-2905`) — and otherwise
|
|
669
|
+
* falls back to {@link basicObjRespondTo} (`vm_method.c:2945`). Like
|
|
670
|
+
* `method_entry_get` there, `respond_to?` is found by descriptor lookup, never
|
|
671
|
+
* by a property read a `method_missing` Proxy's `get` trap would answer. An
|
|
672
|
+
* overridden `respond_to?` is spelled `isRespondTo`, never `respondTo`, which
|
|
673
|
+
* is a Rails method of its own (`MimeResponds#respond_to`).
|
|
674
|
+
*
|
|
675
|
+
* @noRailsEquivalent PERMANENT — Ruby core `rb_obj_respond_to`
|
|
676
|
+
* (`vendor/ruby/v3.3.11/vm_method.c:2934`).
|
|
677
|
+
*/
|
|
678
|
+
export declare function rbObjRespondTo(obj: unknown, mid: string): boolean;
|
|
679
|
+
/**
|
|
680
|
+
* `rb_builtin_class_name` (`vendor/ruby/v3.3.11/error.c:1216`), which the conversion
|
|
681
|
+
* errors name their operand by: `builtin_class_name` (`error.c:1189`) answers
|
|
682
|
+
* the LOWERCASE `"nil"` / `"true"` / `"false"` for those three immediates —
|
|
683
|
+
* `Float(nil)` is `can't convert nil into Float`, not `NilClass` — and
|
|
684
|
+
* everything else falls through to {@link rbObjClassname}.
|
|
685
|
+
*
|
|
686
|
+
* @noRailsEquivalent PERMANENT — Ruby core `rb_builtin_class_name` (`vendor/ruby/v3.3.11/error.c:1216`).
|
|
687
|
+
*/
|
|
688
|
+
export declare function rbBuiltinClassName(x: unknown): string;
|
|
689
|
+
/**
|
|
690
|
+
* `rb_inspect` (`vendor/ruby/v3.3.11/object.c:704`) over the core classes a JS value
|
|
691
|
+
* can be: `nil`, `true` / `false`, Integer and Float, Symbol, String (an
|
|
692
|
+
* ASCII-8BIT one is a `Uint8Array`, its high bytes `\xHH`), Array and Hash.
|
|
693
|
+
* Anything else falls through to the receiver's own `inspect`.
|
|
694
|
+
*
|
|
695
|
+
* The default arm is `to_s`, not Ruby's `#<Foo:0x… @a=1>` (`rb_obj_inspect`,
|
|
696
|
+
* `vendor/ruby/v3.3.11/object.c:764`): reproducing that needs an object id JS does not
|
|
697
|
+
* expose. Callers hand this plain data structures only, so the arm is unreached
|
|
698
|
+
* today — a caller that does pass a class instance gets its `to_s`.
|
|
699
|
+
*
|
|
700
|
+
* @noRailsEquivalent PERMANENT — Ruby core `rb_inspect` (`vendor/ruby/v3.3.11/object.c:704`).
|
|
701
|
+
*/
|
|
702
|
+
export declare function rbInspect(value: unknown): string;
|
|
703
|
+
/**
|
|
704
|
+
* Node's `util.inspect` (`console.log`, an assertion diff, a spy matcher)
|
|
705
|
+
* renders an object by walking its fields, where Ruby's `p`
|
|
706
|
+
* (`rb_p`, `vendor/ruby/v3.3.11/io.c:9023`) prints `rb_inspect(obj)`. This
|
|
707
|
+
* defines the `nodejs.util.inspect.custom` hook on `klass` as its own
|
|
708
|
+
* `inspect`, so a class that ports `inspect` is printed by it.
|
|
709
|
+
*
|
|
710
|
+
* @noRailsEquivalent PERMANENT
|
|
711
|
+
*/
|
|
712
|
+
export declare function rbDefineInspectCustom(klass: {
|
|
713
|
+
prototype: {
|
|
714
|
+
inspect(): unknown;
|
|
715
|
+
};
|
|
716
|
+
}): void;
|
|
717
|
+
/**
|
|
718
|
+
* `rb_obj_inspect` (`vendor/ruby/v3.3.11/object.c:783-795`), Ruby's `Kernel#inspect`:
|
|
719
|
+
* `#<Class:0x… @ivar=value, …>`, or `rb_any_to_s` when there are no ivars.
|
|
720
|
+
* A trails field `fooBar` / `_fooBar` is Ruby's `@foo_bar`. JS exposes no
|
|
721
|
+
* object address, so each object is assigned a stable one on first inspection.
|
|
722
|
+
*
|
|
723
|
+
* @noRailsEquivalent PERMANENT
|
|
724
|
+
*/
|
|
725
|
+
export declare function rbObjInspect(obj: object): string;
|
|
726
|
+
/**
|
|
727
|
+
* `rb_any_to_s` (`vendor/ruby/v3.3.11/object.c:693-701`), `Kernel#to_s`:
|
|
728
|
+
* `#<Class:0x…>`. JS exposes no object address, so each object is assigned a
|
|
729
|
+
* stable one on first use. A JS function is Ruby's `Proc`, whose `to_s`
|
|
730
|
+
* (`proc_to_s`, `vendor/ruby/v3.3.11/proc.c:1595`) opens the same way.
|
|
731
|
+
*
|
|
732
|
+
* @noRailsEquivalent PERMANENT
|
|
733
|
+
*/
|
|
734
|
+
export declare function rbAnyToS(obj: object): string;
|
|
735
|
+
/**
|
|
736
|
+
* `rb_obj_id` (`vendor/ruby/v3.3.11/gc.c:4975`), `Kernel#object_id`. A heap
|
|
737
|
+
* object answers a stable integer handed out on first use, starting at
|
|
738
|
+
* `OBJ_ID_INITIAL` and `OBJ_ID_INCREMENT` apart (`gc.c:3826-3827`, a 40-byte
|
|
739
|
+
* `RVALUE` on 64-bit). A special constant answers its own `VALUE`
|
|
740
|
+
* (`rb_find_object_id`, `gc.c:4883-4898`): `nil` is 4, `true` 20, `false` 0
|
|
741
|
+
* (`vendor/ruby/v3.3.11/include/ruby/internal/special_consts.h:98-100`), a
|
|
742
|
+
* Fixnum `n` is `2n + 1`, and a flonum is the rotated bits
|
|
743
|
+
* `rb_float_new_inline` packs it into
|
|
744
|
+
* (`vendor/ruby/v3.3.11/internal/numeric.h:243-262`).
|
|
745
|
+
*
|
|
746
|
+
* @boundary: a JS `number` is the seat for both `Integer` and `Float`, read
|
|
747
|
+
* off the value as {@link rbObjClassname} reads it, so `1.0`, `0.0` and `-0`
|
|
748
|
+
* answer the Fixnum id where MRI answers a flonum's. A JS string has no
|
|
749
|
+
* identity, so each send hands out a fresh id, as a fresh `String` would get;
|
|
750
|
+
* a Symbol's static id is not modelled. A Bignum and a Float outside the
|
|
751
|
+
* flonum range are heap objects in MRI and get a fresh id the same way. An id
|
|
752
|
+
* past `Number.MAX_SAFE_INTEGER` is a bigint.
|
|
753
|
+
*
|
|
754
|
+
* @noRailsEquivalent PERMANENT
|
|
755
|
+
*/
|
|
756
|
+
export declare function rbObjId(obj: object): number;
|
|
757
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `rb_obj_id` (`vendor/ruby/v3.3.11/gc.c:4975`). */
|
|
758
|
+
export declare function rbObjId(obj: unknown): number | bigint;
|
|
759
|
+
/**
|
|
760
|
+
* `RB_TYPE_P(obj, T_HASH)` (`vendor/ruby/v3.3.11/include/ruby/internal/value_type.h:122`)
|
|
761
|
+
* for the object-literal half of a trails Hash: an object whose prototype
|
|
762
|
+
* chain reaches `Object.prototype` through no class.
|
|
763
|
+
*
|
|
764
|
+
* @noRailsEquivalent PERMANENT
|
|
765
|
+
*/
|
|
766
|
+
export declare function isPlainHash(value: unknown): value is Record<string, unknown>;
|
|
767
|
+
/**
|
|
768
|
+
* `RTEST` (`vendor/ruby/v3.3.11/include/ruby/internal/special_consts.h:138` `RB_TEST`):
|
|
769
|
+
* false only for `nil` and `false`, where a JS truthiness test is also false
|
|
770
|
+
* for `0`, `""` and `NaN`.
|
|
771
|
+
*
|
|
772
|
+
* @noRailsEquivalent PERMANENT
|
|
773
|
+
*/
|
|
774
|
+
export declare function rtest<T>(obj: T): obj is Exclude<T, null | undefined | false>;
|
|
775
|
+
/**
|
|
776
|
+
* Ruby's `obj.nil?` send: `NilClass#nil?` is `rb_true`
|
|
777
|
+
* (`vendor/ruby/v3.3.11/object.c:4425`) and `Kernel#nil?` is `rb_false`
|
|
778
|
+
* (`object.c:4371`), which a class may override
|
|
779
|
+
* (`ActiveRecord::Relation::QueryAttribute#nil?`). JS has no method on `null`
|
|
780
|
+
* or `undefined`, the two spellings of Ruby's `nil`, so the send is a
|
|
781
|
+
* function; an override is spelled `isNil`.
|
|
782
|
+
*
|
|
783
|
+
* @noRailsEquivalent PERMANENT
|
|
784
|
+
*/
|
|
785
|
+
export declare function isNil(obj: unknown): boolean;
|
|
786
|
+
/**
|
|
787
|
+
* `rb_obj_as_string` (`vendor/ruby/v3.3.11/string.c:1653`) — the `to_s` of any value.
|
|
788
|
+
* `Array#to_s` and `Hash#to_s` are aliases of `inspect`
|
|
789
|
+
* (`vendor/ruby/v3.3.11/array.c:8616`, `vendor/ruby/v3.3.11/hash.c:7197`), so those two classes
|
|
790
|
+
* render through {@link rbInspect}; every other value — a String above all,
|
|
791
|
+
* which `rb_obj_as_string` returns unquoted — is its own `to_s`. A
|
|
792
|
+
* `Uint8Array` is the binary String seat (see {@link rbEqual}), so it is
|
|
793
|
+
* returned as it is (`string.c:1658`), and so is one a receiver's `to_s`
|
|
794
|
+
* answers (`rb_obj_as_string_result`, `string.c:1666`). Otherwise
|
|
795
|
+
* it is a send (`rb_funcall(obj, idTo_s, 0)`, `string.c:1661`): a ported class
|
|
796
|
+
* defining `toS` answers it, and an answer that is not a String falls back to
|
|
797
|
+
* {@link rbAnyToS}. A ported `String` subclass that is not a JS string
|
|
798
|
+
* (`ActiveSupport::SafeBuffer`) is an instance of {@link rbCString}, which is
|
|
799
|
+
* the `T_STRING` test on a `toS` answer, as it is for any class built on
|
|
800
|
+
* `rbCString`; `to_str` is never called. MRI returns that String itself, and
|
|
801
|
+
* the port returns its contents, since a Ruby String is a JS string primitive
|
|
802
|
+
* (CLAUDE.md, "Ruby Strings are JS string primitives").
|
|
803
|
+
*
|
|
804
|
+
* @noRailsEquivalent PERMANENT — Ruby core `rb_obj_as_string`
|
|
805
|
+
* (`vendor/ruby/v3.3.11/string.c:1653`); JS `String(x)` is not the same function, since
|
|
806
|
+
* it gives the comma-joined form for a nested Array and `[object Object]` for a
|
|
807
|
+
* Hash.
|
|
808
|
+
*/
|
|
809
|
+
export declare function rbObjAsString(value: Uint8Array | {
|
|
810
|
+
toString(): Uint8Array;
|
|
811
|
+
}): Uint8Array;
|
|
812
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `rb_obj_as_string` (`vendor/ruby/v3.3.11/string.c:1653`). */
|
|
813
|
+
export declare function rbObjAsString(value: unknown): string;
|
|
814
|
+
/**
|
|
815
|
+
* The ivar-table entry `rb_ivar_set` (`vendor/ruby/v3.3.11/variable.c:1923`) writes
|
|
816
|
+
* for `iv`, located on `klass`'s instances: the JS field holding it, where that
|
|
817
|
+
* is not the field-name rule's spelling. An ivar behind a same-named reader
|
|
818
|
+
* lives in the `_`-prefixed field. {@link rbObjIvarGet}, {@link rbObjIvarSet}
|
|
819
|
+
* and {@link rbObjInstanceVariables} read the declaration, which subclasses
|
|
820
|
+
* inherit.
|
|
821
|
+
*
|
|
822
|
+
* @noRailsEquivalent PERMANENT — Ruby core ivar table (`vendor/ruby/v3.3.11/variable.c:1923`).
|
|
823
|
+
*/
|
|
824
|
+
export declare function rbDeclareIvar(klass: {
|
|
825
|
+
prototype: object;
|
|
826
|
+
}, iv: string, field: string): void;
|
|
827
|
+
/**
|
|
828
|
+
* `Kernel#instance_variables` (`rb_obj_instance_variables`,
|
|
829
|
+
* `vendor/ruby/v3.3.11/variable.c:2259`): the ivar names of `obj`'s own
|
|
830
|
+
* enumerable fields, each spelled by its {@link rbDeclareIvar} declaration or
|
|
831
|
+
* the field-name rule (`fooBar` is `@foo_bar`).
|
|
832
|
+
*
|
|
833
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Kernel#instance_variables`
|
|
834
|
+
* (`vendor/ruby/v3.3.11/variable.c:2259`).
|
|
835
|
+
*/
|
|
836
|
+
export declare function rbObjInstanceVariables(obj: object): string[];
|
|
837
|
+
/**
|
|
838
|
+
* `Kernel#instance_variable_get` (`rb_obj_ivar_get`, `vendor/ruby/v3.3.11/object.c:2880`):
|
|
839
|
+
* the value of ivar `iv`, or `nil` when `obj` has no own field for it
|
|
840
|
+
* (`rb_ivar_get`, `vendor/ruby/v3.3.11/variable.c:1405`), never an inherited
|
|
841
|
+
* method or accessor. A name that is not an ivar name (`rb_is_instance_name`,
|
|
842
|
+
* where a non-ASCII character is an identifier character) raises `NameError`.
|
|
843
|
+
*
|
|
844
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Kernel#instance_variable_get`
|
|
845
|
+
* (`vendor/ruby/v3.3.11/object.c:2880`).
|
|
846
|
+
*/
|
|
847
|
+
export declare function rbObjIvarGet(obj: object, iv: string): unknown;
|
|
848
|
+
/**
|
|
849
|
+
* `Kernel#instance_variable_defined?` (`rb_obj_ivar_defined`, `vendor/ruby/v3.3.11/object.c:2942`):
|
|
850
|
+
* whether `obj` has an own field for ivar `iv`, a `nil`-valued one included.
|
|
851
|
+
*
|
|
852
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Kernel#instance_variable_defined?`
|
|
853
|
+
* (`vendor/ruby/v3.3.11/object.c:2942`).
|
|
854
|
+
*/
|
|
855
|
+
export declare function rbObjIvarDefined(obj: object, iv: string): boolean;
|
|
856
|
+
/**
|
|
857
|
+
* `Kernel#instance_variable_set` (`rb_obj_ivar_set_m`, `vendor/ruby/v3.3.11/object.c:2914`):
|
|
858
|
+
* sets ivar `iv` as an own field of `obj`, never through a setter, as
|
|
859
|
+
* `rb_ivar_set` (`vendor/ruby/v3.3.11/variable.c:1923`) writes the ivar table
|
|
860
|
+
* directly after `rb_check_frozen`. `iv` is a Symbol (`":@foo"`) or a String,
|
|
861
|
+
* as `id_for_var`'s `rb_check_id` (`vendor/ruby/v3.3.11/object.c:2225`) takes either.
|
|
862
|
+
*
|
|
863
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Kernel#instance_variable_set`
|
|
864
|
+
* (`vendor/ruby/v3.3.11/object.c:2914`).
|
|
865
|
+
*/
|
|
866
|
+
export declare function rbObjIvarSet(obj: object, iv: string, val: unknown): unknown;
|
|
867
|
+
/**
|
|
868
|
+
* A T_OBJECT of class `Object` (`struct RObject`,
|
|
869
|
+
* `vendor/ruby/v3.3.11/include/ruby/internal/core/robject.h:83`). A plain JS
|
|
870
|
+
* object reads as a Hash, so `rb_obj_alloc(rb_cObject)` is one of these where
|
|
871
|
+
* a compat dumper builds it (`range_dumper`, `vendor/ruby/v3.3.11/range.c:2180`).
|
|
872
|
+
*
|
|
873
|
+
* @noRailsEquivalent PERMANENT
|
|
874
|
+
*/
|
|
875
|
+
export declare class RObject {
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* `rb_ivar_set` (`vendor/ruby/v3.3.11/variable.c:1923`). An `@` name is the
|
|
879
|
+
* object's own field; any other ID is a hidden ivar (`id_excl`, `id_beg`,
|
|
880
|
+
* `id_end`), which `instance_variables` never lists.
|
|
881
|
+
*
|
|
882
|
+
* @noRailsEquivalent PERMANENT
|
|
883
|
+
*/
|
|
884
|
+
export declare function rbIvarSet(obj: object, id: string, val: unknown): unknown;
|
|
885
|
+
/**
|
|
886
|
+
* `rb_ivar_get` (`vendor/ruby/v3.3.11/variable.c:1405`), reading a hidden ivar
|
|
887
|
+
* {@link rbIvarSet} wrote as well as an `@` one.
|
|
888
|
+
*
|
|
889
|
+
* @noRailsEquivalent PERMANENT
|
|
890
|
+
*/
|
|
891
|
+
export declare function rbIvarGet(obj: object, id: string): unknown;
|
|
892
|
+
/**
|
|
893
|
+
* `rb_ivar_foreach` (`vendor/ruby/v3.3.11/variable.c:2182`): every ivar of
|
|
894
|
+
* `obj`, the hidden ones included.
|
|
895
|
+
*
|
|
896
|
+
* @noRailsEquivalent PERMANENT
|
|
897
|
+
*/
|
|
898
|
+
export declare function rbIvarForeach(obj: object, func: (id: string, val: unknown) => void): void;
|
|
899
|
+
/**
|
|
900
|
+
* `Kernel#remove_instance_variable` (`rb_obj_remove_instance_variable`,
|
|
901
|
+
* `vendor/ruby/v3.3.11/variable.c:2314`): deletes `obj`'s own field for ivar
|
|
902
|
+
* `iv` and answers its value, raising `NameError` when it is not defined.
|
|
903
|
+
*
|
|
904
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Kernel#remove_instance_variable`
|
|
905
|
+
* (`vendor/ruby/v3.3.11/variable.c:2314`).
|
|
906
|
+
*/
|
|
907
|
+
export declare function rbObjRemoveInstanceVariable(obj: object, iv: string): unknown;
|
|
908
|
+
//# sourceMappingURL=object.d.ts.map
|