Expand description
Contains all items that are not yet categorized by ABI stability.
These items are candidates for promotion to stable or unstable
in the future.
Structs§
- Onig
Case Fold Code Item
- Onig
Compile Info
- Onig
Encoding TypeST
- Onig
Error Info
- Onig
Meta Char Table Type
- Onig
Repeat Range
- Onig
Syntax Type
- RArray__
bindgen_ ty_ 1__ bindgen_ ty_ 1 - Arrays that use separated memory region for elements use this pattern.
- RBasic
- Ruby’s object’s, base components. Every single ruby objects have them in common.
- RClass
- RFile
- Ruby’s File and IO. Ruby’s IO are not just file descriptors. They have buffers. They also have encodings. Various information are controlled using this struct.
- RMatch
- Regular expression execution context. When a regular expression “matches”
to a string, it generates capture groups etc. This struct holds that info.
Visible from Ruby as an instance of
MatchData. - RObject
- Ruby’s ordinal objects. Unless otherwise special cased, all predefined and user-defined classes share this struct to hold their instances.
- RObject__
bindgen_ ty_ 1__ bindgen_ ty_ 1 - Object that use separated memory region for instance variables use this pattern.
- RRegexp
- Ruby’s regular expression. A regexp is compiled into its own intermediate representation. This one holds that info. Regexp “match” operation then executes that IR.
- RString__
bindgen_ ty_ 1__ bindgen_ ty_ 1 - Strings that use separated memory region for contents use this pattern.
- RString__
bindgen_ ty_ 1__ bindgen_ ty_ 2 - Embedded contents.
- _IO_
FILE
- _IO_
codecvt
- _IO_
marker
- _IO_
wide_ data
- __
Bindgen Bitfield Unit
- __
atomic_ wide_ counter__ bindgen_ ty_ 1
- __
pthread_ cond_ s
- __
pthread_ internal_ list
- __
pthread_ mutex_ s
- __
va_ list_ tag
- fd_set
- rb_
arithmetic_ sequence_ components_ t - Decomposed
Enumerator::ArithmeicSequence. This is a subclass of ::rb_cEnumerator, which represents a sequence of numbers with common difference. Internal data structure of the class is opaque to users, but you can obtain a decomposed one usingrb_arithmetic_sequence_extract. - rb_
data_ type_ struct - @copydoc
rb_data_type_t - rb_
data_ type_ struct__ bindgen_ ty_ 1 - Function pointers. Resembles C++
vtbl. - rb_
debug_ inspector_ struct
- rb_
econv_ t
- rb_
fdset_ t - The data structure which wraps the fd_set bitmap used by select(2). This allows Ruby to use FD sets larger than that allowed by historic limitations on modern platforms.
- rb_
id_ table - This is a table that holds instance variable name to index mapping. Used when accessing instance variables using names.
- rb_
internal_ thread_ event_ hook
- rb_
io_ buffer_ t - IO buffers. This is an implementation detail of ::
rb_io_t::wbuf and ::rb_io_t::rbuf. People don’t manipulate it directly. - rb_
io_ enc_ t - Decomposed encoding flags (e.g.
"enc:enc2""). - rb_io_t
- Ruby’s IO, metadata and buffers.
- rb_
memory_ view_ entry - Operations applied to a specific kind of a memory view.
- rb_
memory_ view_ item_ component_ t - Memory view component metadata.
- rb_
memory_ view_ t - A MemoryView structure,
[rb_memory_view_t], is used for exporting objects’ MemoryView. - rb_
memory_ view_ t__ bindgen_ ty_ 1 - Description of each components.
- rb_
ractor_ local_ key_ struct
- rb_
ractor_ local_ storage_ type - Type that defines a ractor-local storage.
- rb_
random_ interface_ t - PRNG algorithmic interface, analogous to Ruby level classes.
- rb_
random_ interface_ t__ bindgen_ ty_ 1 - Major/minor versions of this interface
- rb_
random_ struct - Base components of the random interface.
- rb_
trace_ arg_ struct
- rb_
vm_ struct
- re_
patter_ buffer - @endcond
- re_
pattern_ buffer
- re_
registers
- rmatch
- Represents a match.
- rmatch_
offset - Represents the region of a capture group. This is basically for caching
purpose. re_registers have similar concepts (
begandend) but they are inptrdiff_t*. In order for us to implementMatchData#offsetthat info has to be converted to offset integers. This is the struct to hold such things. - st_
hash_ type
- st_
table
- st_
table_ entry
- stat
- timespec
- timeval
- @endcond
Enums§
- _bindgen_
ty_ 24
- rb_
econv_ result_ t - return value of
rb_econv_convert - rb_
event_ hook_ flag_ t - @cond INTERNAL_MACRO
- rb_
io_ buffer_ endian
- rb_
io_ buffer_ flags
- rb_
io_ event_ t - Type of events that an IO can wait.
- rb_
io_ wait_ readwrite - for
rb_readwrite_sys_failfirst argument - rb_
warning_ category_ t - Warning categories. A warning issued using this API can be selectively
requested / suppressed by the end-users. For instance passing
-W:no-deprecatedto the ruby process would suppress those warnings in deprecated category. - ruby_
coderange_ type - What
rb_enc_str_coderangereturns. - ruby_
econv_ flag_ type - This enum is kind of omnibus. Gathers various constants.
- ruby_
encoding_ consts
- ruby_
fl_ type - The flags. Each ruby objects have their own characteristics apart from their classes. For instance whether an object is frozen or not is not controlled by its class. This is the type that represents such properties.
- ruby_
fl_ ushift - This is an enum because GDB wants it (rather than a macro). People need not bother.
- ruby_
memory_ view_ flags - Flags passed to
rb_memory_view_get, then to ::rb_memory_view_get_func_t. - ruby_
rarray_ consts - This is an enum because GDB wants it (rather than a macro). People need not bother.
- ruby_
rarray_ flags
- ruby_
rmodule_ flags
- ruby_
robject_ flags
- ruby_
rstring_ flags
- ruby_
rvalue_ flags - This is an enum because GDB wants it (rather than a macro). People need not bother.
- ruby_
special_ consts - special constants - i.e. non-zero and non-fixnum constants
- ruby_
value_ type - C-level type of an object.
- st_
retval
Constants§
- ATAN2_
INF_ C99 - CASEFOLD_
FILESYSTEM - COROUTINE_
H - DLEXT
- DLEXT_
MAXLEN - ENABLE_
MULTIARCH - ENUM_
OVER_ INT - FALSE
- FMODE_
APPEND - FMODE_
BINMODE - FMODE_
CREATE - FMODE_
DUPLEX - FMODE_
EXCL - FMODE_
READABLE - FMODE_
READWRITE - FMODE_
SETENC_ BY_ BOM - FMODE_
SYNC - FMODE_
TEXTMODE - FMODE_
TRUNC - FMODE_
TTY - FMODE_
WRITABLE - HAVE_
ACOSH - HAVE_
ALLOCA - HAVE_
ALLOCA_ H - HAVE_
ARC4RANDOM_ BUF - HAVE_
ATAN2F - HAVE_
ATAN2L - HAVE_
ATTRIBUTE_ ERRORFUNC - HAVE_
ATTRIBUTE_ FUNCTION_ ALIAS - HAVE_
ATTRIBUTE_ WARNINGFUNC - HAVE_
BACKTRACE - HAVE_
BUILTIN___ BUILTIN_ ADD_ OVERFLOW - HAVE_
BUILTIN___ BUILTIN_ ALLOCA_ WITH_ ALIGN - HAVE_
BUILTIN___ BUILTIN_ ASSUME_ ALIGNED - HAVE_
BUILTIN___ BUILTIN_ BSWA P16 - HAVE_
BUILTIN___ BUILTIN_ BSWA P32 - HAVE_
BUILTIN___ BUILTIN_ BSWA P64 - HAVE_
BUILTIN___ BUILTIN_ CHOOSE_ EXPR - HAVE_
BUILTIN___ BUILTIN_ CHOOSE_ EXPR_ CONSTANT_ P - HAVE_
BUILTIN___ BUILTIN_ CLZ - HAVE_
BUILTIN___ BUILTIN_ CLZL - HAVE_
BUILTIN___ BUILTIN_ CLZLL - HAVE_
BUILTIN___ BUILTIN_ CONSTANT_ P - HAVE_
BUILTIN___ BUILTIN_ CTZ - HAVE_
BUILTIN___ BUILTIN_ CTZLL - HAVE_
BUILTIN___ BUILTIN_ EXPECT - HAVE_
BUILTIN___ BUILTIN_ MUL_ OVERFLOW - HAVE_
BUILTIN___ BUILTIN_ MUL_ OVERFLOW_ P - HAVE_
BUILTIN___ BUILTIN_ POPCOUNT - HAVE_
BUILTIN___ BUILTIN_ POPCOUNTLL - HAVE_
BUILTIN___ BUILTIN_ SUB_ OVERFLOW - HAVE_
BUILTIN___ BUILTIN_ TRAP - HAVE_
BUILTIN___ BUILTIN_ TYPES_ COMPATIBLE_ P - HAVE_
CBRT - HAVE_
CHMOD - HAVE_
CHOWN - HAVE_
CHROOT - HAVE_
CLOCKID_ T - HAVE_
CLOCK_ GETRES - HAVE_
CLOCK_ GETTIME - HAVE_
CONST_ PAGE_ SIZE - HAVE_
COPY_ FILE_ RANGE - HAVE_
COSH - HAVE_
CRYPT - HAVE_
CRYPT_ H - HAVE_
CRYPT_ R - HAVE_
DAYLIGHT - HAVE_
DECL_ GETENV - HAVE_
DECL_ SYS_ NERR - HAVE_
DEV_ T - HAVE_
DIRENT_ H - HAVE_
DIRFD - HAVE_
DLADDR - HAVE_
DLOPEN - HAVE_
DL_ ITERATE_ PHDR - HAVE_
DUP - HAVE_
DUP2 - HAVE_
DUP3 - HAVE_
EACCESS - HAVE_
ELF_ H - HAVE_
ENDGRENT - HAVE_
ERF - HAVE_
EVENTFD - HAVE_
EXECL - HAVE_
EXECLE - HAVE_
EXECV - HAVE_
EXECVE - HAVE_
EXPLICIT_ BZERO - HAVE_
FCHMOD - HAVE_
FCHOWN - HAVE_
FCNTL - HAVE_
FCNTL_ H - HAVE_
FDATASYNC - HAVE_
FDOPENDIR - HAVE_
FFS - HAVE_
FINITE - HAVE_
FLOAT_ H - HAVE_
FLOCK - HAVE_
FMOD - HAVE_
FORK - HAVE_
FSTATAT - HAVE_
FSYNC - HAVE_
FTRUNCATE - HAVE_
FTRUNCAT E64 - HAVE_
FUNC_ WEAK - HAVE_
GCC_ ATOMIC_ BUILTINS - HAVE_
GCC_ SYNC_ BUILTINS - HAVE_
GETCONTEXT - HAVE_
GETCWD - HAVE_
GETEGID - HAVE_
GETENTROPY - HAVE_
GETEUID - HAVE_
GETGID - HAVE_
GETGRNAM - HAVE_
GETGRNAM_ R - HAVE_
GETGROUPS - HAVE_
GETLOGIN - HAVE_
GETLOGIN_ R - HAVE_
GETPGID - HAVE_
GETPGRP - HAVE_
GETPPID - HAVE_
GETPRIORITY - HAVE_
GETPWNAM - HAVE_
GETPWNAM_ R - HAVE_
GETPWUID - HAVE_
GETPWUID_ R - HAVE_
GETRANDOM - HAVE_
GETRESGID - HAVE_
GETRESUID - HAVE_
GETRLIMIT - HAVE_
GETSID - HAVE_
GETTIMEOFDAY - HAVE_
GETUID - HAVE_
GID_ T - HAVE_
GMP_ H - HAVE_
GMTIME_ R - HAVE_
GNU_ QSORT_ R - HAVE_
GRANTPT - HAVE_
GRP_ H - HAVE_
HYPOT - HAVE_
INITGROUPS - HAVE_
INT8_ T - HAVE_
INT16_ T - HAVE_
INT32_ T - HAVE_
INT64_ T - HAVE_
INT128_ T - HAVE_
INTPTR_ T - HAVE_
INTTYPES_ H - HAVE_
IOCTL - HAVE_
ISFINITE - HAVE_
KILL - HAVE_
KILLPG - HAVE_
LANGINFO_ H - HAVE_
LCHMOD - HAVE_
LCHOWN - HAVE_
LGAMMA_ R - HAVE_
LIBCRYPT - HAVE_
LIBDL - HAVE_
LIBGMP - HAVE_
LIBPTHREAD - HAVE_
LIBRT - HAVE_
LIBZ - HAVE_
LIMITS_ H - HAVE_
LINK - HAVE_
LLABS - HAVE_
LOCALE_ H - HAVE_
LOCKF - HAVE_
LOG2 - HAVE_
LONG_ LONG - HAVE_
LSTAT - HAVE_
LUTIMES - HAVE_
MALLOC_ H - HAVE_
MALLOC_ USABLE_ SIZE - HAVE_
MBLEN - HAVE_
MEMALIGN - HAVE_
MEMMEM - HAVE_
MEMMOVE - HAVE_
MEMRCHR - HAVE_
MKFIFO - HAVE_
MKNOD - HAVE_
MKTIME - HAVE_
MMAP - HAVE_
MODE_ T - HAVE_
MREMAP - HAVE_
NAN - HAVE_
NEXTAFTER - HAVE_
NULLPTR - HAVE_
OFF_ T - HAVE_
OPENAT - HAVE_
PCLOSE - HAVE_
PID_ T - HAVE_
PIPE - HAVE_
PIPE2 - HAVE_
POLL - HAVE_
POPEN - HAVE_
POSIX_ FADVISE - HAVE_
POSIX_ MADVISE - HAVE_
POSIX_ MEMALIGN - HAVE_
PPOLL - HAVE_
PREAD - HAVE_
PROTOTYPES - HAVE_
PTHREAD_ ATTR_ GETGUARDSIZE - HAVE_
PTHREAD_ ATTR_ GETSTACK - HAVE_
PTHREAD_ ATTR_ SETINHERITSCHED - HAVE_
PTHREAD_ CONDATTR_ SETCLOCK - HAVE_
PTHREAD_ GETATTR_ NP - HAVE_
PTHREAD_ H - HAVE_
PTHREAD_ SETNAME_ NP - HAVE_
PTHREAD_ SIGMASK - HAVE_
PWD_ H - HAVE_
PWRITE - HAVE_
QSORT_ R - HAVE_
RB_ DATA_ TYPE_ T_ FUNCTION - HAVE_
RB_ DATA_ TYPE_ T_ PARENT - HAVE_
RB_ DEFINE_ ALLOC_ FUNC - HAVE_
RB_ EXT_ RACTOR_ SAFE - HAVE_
RB_ FD_ INIT - HAVE_
RB_ IO_ T - HAVE_
RB_ REG_ NEW_ STR - HAVE_
RB_ SCAN_ ARGS_ OPTIONAL_ HASH - HAVE_
READLINK - HAVE_
REALPATH - HAVE_
RLIM_ T - HAVE_
ROUND - HAVE_
RUBY_ ATOMIC_ H - HAVE_
RUBY_ DEBUG_ H - HAVE_
RUBY_ DEFINES_ H - HAVE_
RUBY_ ENCODING_ H - HAVE_
RUBY_ FIBER_ SCHEDULER_ H - HAVE_
RUBY_ INTERN_ H - HAVE_
RUBY_ IO_ H - HAVE_
RUBY_ MEMORY_ VIEW_ H - HAVE_
RUBY_ MISSING_ H - HAVE_
RUBY_ ONIGMO_ H - HAVE_
RUBY_ ONIGURUMA_ H - HAVE_
RUBY_ RACTOR_ H - HAVE_
RUBY_ RANDOM_ H - HAVE_
RUBY_ REGEX_ H - HAVE_
RUBY_ RE_ H - HAVE_
RUBY_ RUBY_ H - HAVE_
RUBY_ ST_ H - HAVE_
RUBY_ THREAD_ H - HAVE_
RUBY_ THREAD_ NATIVE_ H - HAVE_
RUBY_ UTIL_ H - HAVE_
RUBY_ VERSION_ H - HAVE_
RUBY_ VM_ H - HAVE_
SANITIZER_ ASAN_ INTERFACE_ H - HAVE_
SCHED_ GETAFFINITY - HAVE_
SCHED_ YIELD - HAVE_
SEEKDIR - HAVE_
SENDFILE - HAVE_
SETCONTEXT - HAVE_
SETEGID - HAVE_
SETENV - HAVE_
SETEUID - HAVE_
SETGID - HAVE_
SETGROUPS - HAVE_
SETPGID - HAVE_
SETPGRP - HAVE_
SETREGID - HAVE_
SETRESGID - HAVE_
SETRESUID - HAVE_
SETREUID - HAVE_
SETRLIMIT - HAVE_
SETSID - HAVE_
SETUID - HAVE_
SHUTDOWN - HAVE_
SIGACTION - HAVE_
SIGALTSTACK - HAVE_
SIGNBIT - HAVE_
SIGPROCMASK - HAVE_
SIG_ T - HAVE_
SINH - HAVE_
SSIZE_ T - HAVE_
STATX - HAVE_
STDALIGN_ H - HAVE_
STDARG_ PROTOTYPES - HAVE_
STDBOOL_ H - HAVE_
STDINT_ H - HAVE_
STDIO_ H - HAVE_
STDLIB_ H - HAVE_
STMT_ AND_ DECL_ IN_ EXPR - HAVE_
STRCHR - HAVE_
STRERROR - HAVE_
STRINGS_ H - HAVE_
STRING_ H - HAVE_
STRLCAT - HAVE_
STRLCPY - HAVE_
STRSTR - HAVE_
STRUCT_ CRYPT_ DATA_ INITIALIZED - HAVE_
STRUCT_ STATX_ STX_ BTIME - HAVE_
STRUCT_ STAT_ ST_ ATIM - HAVE_
STRUCT_ STAT_ ST_ BLKSIZE - HAVE_
STRUCT_ STAT_ ST_ BLOCKS - HAVE_
STRUCT_ STAT_ ST_ CTIM - HAVE_
STRUCT_ STAT_ ST_ MTIM - HAVE_
STRUCT_ STAT_ ST_ RDEV - HAVE_
STRUCT_ TIMESPEC - HAVE_
STRUCT_ TIMEVAL - HAVE_
STRUCT_ TIMEZONE - HAVE_
STRUCT_ TM_ TM_ GMTOFF - HAVE_
STRUCT_ TM_ TM_ ZONE - HAVE_
SYMLINK - HAVE_
SYSCALL - HAVE_
SYSCALL_ H - HAVE_
SYSCONF - HAVE_
SYSTEM - HAVE_
SYS_ EVENTFD_ H - HAVE_
SYS_ FCNTL_ H - HAVE_
SYS_ FILE_ H - HAVE_
SYS_ IOCTL_ H - HAVE_
SYS_ PARAM_ H - HAVE_
SYS_ PRCTL_ H - HAVE_
SYS_ RANDOM_ H - HAVE_
SYS_ RESOURCE_ H - HAVE_
SYS_ SELECT_ H - HAVE_
SYS_ SENDFILE_ H - HAVE_
SYS_ SOCKET_ H - HAVE_
SYS_ STAT_ H - HAVE_
SYS_ SYSCALL_ H - HAVE_
SYS_ SYSMACROS_ H - HAVE_
SYS_ TIMES_ H - HAVE_
SYS_ TIME_ H - HAVE_
SYS_ TYPES_ H - HAVE_
SYS_ UIO_ H - HAVE_
SYS_ USER_ H - HAVE_
SYS_ WAIT_ H - HAVE_
TANH - HAVE_
TELLDIR - HAVE_
TGAMMA - HAVE_
TIMEGM - HAVE_
TIMER_ CREATE - HAVE_
TIMER_ SETTIME - HAVE_
TIMES - HAVE_
TIME_ H - HAVE_
TIME_ T - HAVE_
TM_ ZONE - HAVE_
TRUE_ LONG_ LONG - HAVE_
TRUNCATE - HAVE_
TRUNCAT E64 - HAVE_
TYPEOF - HAVE_
TYPE_ RB_ DATA_ TYPE_ T - HAVE_
TZSET - HAVE_
UCONTEXT_ H - HAVE_
UID_ T - HAVE_
UINT8_ T - HAVE_
UINT16_ T - HAVE_
UINT32_ T - HAVE_
UINT64_ T - HAVE_
UINT128_ T - HAVE_
UINTPTR_ T - HAVE_
UMASK - HAVE_
UNISTD_ H - HAVE_
UNSETENV - HAVE_
UTIMENSAT - HAVE_
UTIMES - HAVE_
UTIME_ H - HAVE_
VA_ ARGS_ MACRO - HAVE_
VFORK - HAVE_
WAIT4 - HAVE_
WAITPID - HAVE_
WCHAR_ H - HAVE_
WORKING_ FORK - HAVE_
WORKING_ VFORK - HAVE_
WRITEV - HAVE_
X86INTRIN_ H - HAVE__
ALIGNOF - HAVE__
BOOL - HAVE__
LONGJMP - HAVE__
SC_ CLK_ TCK - HAVE__
SETJMP - HAVE___
BUILTIN_ UNREACHABLE - INCLUDE_
RUBY_ CONFIG_ H - INTEGER_
PACK_ 2COMP - INTEGER_
PACK_ BIG_ ENDIAN - INTEGER_
PACK_ FORCE_ BIGNUM - INTEGER_
PACK_ FORCE_ GENERIC_ IMPLEMENTATION - INTEGER_
PACK_ LITTLE_ ENDIAN - INTEGER_
PACK_ LSBYTE_ FIRST - INTEGER_
PACK_ LSWORD_ FIRST - INTEGER_
PACK_ MSBYTE_ FIRST - INTEGER_
PACK_ MSWORD_ FIRST - INTEGER_
PACK_ NATIVE_ BYTE_ ORDER - INTEGER_
PACK_ NEGATIVE - INTERNAL_
ONIGENC_ CASE_ FOLD_ MULTI_ CHAR - LIBDIR_
BASENAME - NEGATIVE_
TIME_ T - ONIGENC_
CASE_ ASCII_ ONLY - ONIGENC_
CASE_ DOWNCASE - ONIGENC_
CASE_ DOWN_ SPECIAL - ONIGENC_
CASE_ FOLD - ONIGENC_
CASE_ FOLD_ LITHUANIAN - ONIGENC_
CASE_ FOLD_ MIN - ONIGENC_
CASE_ FOLD_ TURKISH_ AZERI - ONIGENC_
CASE_ IS_ TITLECASE - ONIGENC_
CASE_ MODIFIED - ONIGENC_
CASE_ SPECIAL_ OFFSET - ONIGENC_
CASE_ TITLECASE - ONIGENC_
CASE_ UPCASE - ONIGENC_
CASE_ UP_ SPECIAL - ONIGENC_
CODE_ TO_ MBC_ MAXLEN - ONIGENC_
CTYPE_ ALNUM - ONIGENC_
CTYPE_ ALPHA - ONIGENC_
CTYPE_ ASCII - ONIGENC_
CTYPE_ BLANK - ONIGENC_
CTYPE_ CNTRL - ONIGENC_
CTYPE_ DIGIT - ONIGENC_
CTYPE_ GRAPH - ONIGENC_
CTYPE_ LOWER - ONIGENC_
CTYPE_ NEWLINE - ONIGENC_
CTYPE_ PRINT - ONIGENC_
CTYPE_ PUNCT - ONIGENC_
CTYPE_ SPACE - ONIGENC_
CTYPE_ UPPER - ONIGENC_
CTYPE_ WORD - ONIGENC_
CTYPE_ XDIGIT - ONIGENC_
FLAG_ NONE - ONIGENC_
FLAG_ UNICODE - ONIGENC_
GET_ CASE_ FOLD_ CODES_ MAX_ NUM - ONIGENC_
MAX_ COMP_ CASE_ FOLD_ CODE_ LEN - ONIGENC_
MAX_ STD_ CTYPE - ONIGENC_
MBC_ CASE_ FOLD_ MAXLEN - ONIGERR_
CHAR_ CLASS_ VALUE_ AT_ END_ OF_ RANGE - ONIGERR_
CHAR_ CLASS_ VALUE_ AT_ START_ OF_ RANGE - ONIGERR_
CONTROL_ CODE_ SYNTAX - ONIGERR_
DEFAULT_ ENCODING_ IS_ NOT_ SET - ONIGERR_
EMPTY_ CHAR_ CLASS - ONIGERR_
EMPTY_ GROUP_ NAME - ONIGERR_
EMPTY_ RANGE_ IN_ CHAR_ CLASS - ONIGERR_
END_ PATTERN_ AT_ CONTROL - ONIGERR_
END_ PATTERN_ AT_ ESCAPE - ONIGERR_
END_ PATTERN_ AT_ LEFT_ BRACE - ONIGERR_
END_ PATTERN_ AT_ LEFT_ BRACKET - ONIGERR_
END_ PATTERN_ AT_ META - ONIGERR_
END_ PATTERN_ IN_ GROUP - ONIGERR_
END_ PATTERN_ WITH_ UNMATCHED_ PARENTHESIS - ONIGERR_
GROUP_ NUMBER_ OVER_ FOR_ CAPTURE_ HISTORY - ONIGERR_
INVALID_ ARGUMENT - ONIGERR_
INVALID_ BACKREF - ONIGERR_
INVALID_ CHAR_ IN_ GROUP_ NAME - ONIGERR_
INVALID_ CHAR_ PROPERTY_ NAME - ONIGERR_
INVALID_ CODE_ POINT_ VALUE - ONIGERR_
INVALID_ COMBINATION_ OF_ OPTIONS - ONIGERR_
INVALID_ CONDITION_ PATTERN - ONIGERR_
INVALID_ GROUP_ NAME - ONIGERR_
INVALID_ LOOK_ BEHIND_ PATTERN - ONIGERR_
INVALID_ POSIX_ BRACKET_ TYPE - ONIGERR_
INVALID_ REPEAT_ RANGE_ PATTERN - ONIGERR_
INVALID_ WIDE_ CHAR_ VALUE - ONIGERR_
MATCH_ STACK_ LIMIT_ OVER - ONIGERR_
MEMORY - ONIGERR_
META_ CODE_ SYNTAX - ONIGERR_
MISMATCH_ CODE_ LENGTH_ IN_ CLASS_ RANGE - ONIGERR_
MULTIPLEX_ DEFINED_ NAME - ONIGERR_
MULTIPLEX_ DEFINITION_ NAME_ CALL - ONIGERR_
NESTED_ REPEAT_ OPERATOR - ONIGERR_
NEVER_ ENDING_ RECURSION - ONIGERR_
NOT_ SUPPORTED_ ENCODING_ COMBINATION - ONIGERR_
NUMBERED_ BACKREF_ OR_ CALL_ NOT_ ALLOWED - ONIGERR_
PARSER_ BUG - ONIGERR_
PARSE_ DEPTH_ LIMIT_ OVER - ONIGERR_
PREMATURE_ END_ OF_ CHAR_ CLASS - ONIGERR_
SPECIFIED_ ENCODING_ CANT_ CONVERT_ TO_ WIDE_ CHAR - ONIGERR_
STACK_ BUG - ONIGERR_
TARGET_ OF_ REPEAT_ OPERATOR_ INVALID - ONIGERR_
TARGET_ OF_ REPEAT_ OPERATOR_ NOT_ SPECIFIED - ONIGERR_
TOO_ BIG_ BACKREF_ NUMBER - ONIGERR_
TOO_ BIG_ NUMBER - ONIGERR_
TOO_ BIG_ NUMBER_ FOR_ REPEAT_ RANGE - ONIGERR_
TOO_ BIG_ WIDE_ CHAR_ VALUE - ONIGERR_
TOO_ LONG_ WIDE_ CHAR_ VALUE - ONIGERR_
TOO_ MANY_ CAPTURE_ GROUPS - ONIGERR_
TOO_ MANY_ MULTI_ BYTE_ RANGES - ONIGERR_
TOO_ SHORT_ DIGITS - ONIGERR_
TOO_ SHORT_ MULTI_ BYTE_ STRING - ONIGERR_
TYPE_ BUG - ONIGERR_
UNDEFINED_ BYTECODE - ONIGERR_
UNDEFINED_ GROUP_ OPTION - ONIGERR_
UNDEFINED_ GROUP_ REFERENCE - ONIGERR_
UNDEFINED_ NAME_ REFERENCE - ONIGERR_
UNEXPECTED_ BYTECODE - ONIGERR_
UNMATCHED_ CLOSE_ PARENTHESIS - ONIGERR_
UNMATCHED_ RANGE_ SPECIFIER_ IN_ CHAR_ CLASS - ONIGERR_
UPPER_ SMALLER_ THAN_ LOWER_ IN_ REPEAT_ RANGE - ONIGMO_
VERSION_ MAJOR - ONIGMO_
VERSION_ MINOR - ONIGMO_
VERSION_ TEENY - ONIGURUMA_
REGEX_ H - ONIGURUMA_
VERSION_ MAJOR - ONIGURUMA_
VERSION_ MINOR - ONIGURUMA_
VERSION_ TEENY - ONIG_
CHAR_ TABLE_ SIZE - ONIG_
INEFFECTIVE_ META_ CHAR - ONIG_
MAX_ BACKREF_ NUM - ONIG_
MAX_ CAPTURE_ GROUP_ NUM - ONIG_
MAX_ CAPTURE_ HISTORY_ GROUP - ONIG_
MAX_ ERROR_ MESSAGE_ LEN - ONIG_
MAX_ MULTI_ BYTE_ RANGES_ NUM - ONIG_
MAX_ REPEAT_ NUM - ONIG_
META_ CHAR_ ANYCHAR - ONIG_
META_ CHAR_ ANYCHAR_ ANYTIME - ONIG_
META_ CHAR_ ANYTIME - ONIG_
META_ CHAR_ ESCAPE - ONIG_
META_ CHAR_ ONE_ OR_ MORE_ TIME - ONIG_
META_ CHAR_ ZERO_ OR_ ONE_ TIME - ONIG_
MISMATCH - ONIG_
NORMAL - ONIG_
NO_ SUPPORT_ CONFIG - ONIG_
NREGION - ONIG_
OPTION_ ASCII_ RANGE - ONIG_
OPTION_ CAPTURE_ GROUP - ONIG_
OPTION_ DONT_ CAPTURE_ GROUP - ONIG_
OPTION_ DOTALL - ONIG_
OPTION_ EXTEND - ONIG_
OPTION_ FIND_ LONGEST - ONIG_
OPTION_ FIND_ NOT_ EMPTY - ONIG_
OPTION_ IGNORECASE - ONIG_
OPTION_ MAXBIT - ONIG_
OPTION_ MULTILINE - ONIG_
OPTION_ NEGATE_ SINGLELINE - ONIG_
OPTION_ NEWLINE_ CRLF - ONIG_
OPTION_ NONE - ONIG_
OPTION_ NOTBOL - ONIG_
OPTION_ NOTBOS - ONIG_
OPTION_ NOTEOL - ONIG_
OPTION_ NOTEOS - ONIG_
OPTION_ POSIX_ BRACKET_ ALL_ RANGE - ONIG_
OPTION_ SINGLELINE - ONIG_
OPTION_ WORD_ BOUND_ ALL_ RANGE - ONIG_
REGION_ NOTPOS - ONIG_
SYN_ ALLOW_ DOUBLE_ RANGE_ OP_ IN_ CC - ONIG_
SYN_ ALLOW_ EMPTY_ RANGE_ IN_ CC - ONIG_
SYN_ ALLOW_ INTERVAL_ LOW_ ABBREV - ONIG_
SYN_ ALLOW_ INVALID_ INTERVAL - ONIG_
SYN_ ALLOW_ MULTIPLEX_ DEFINITION_ NAME - ONIG_
SYN_ ALLOW_ MULTIPLEX_ DEFINITION_ NAME_ CALL - ONIG_
SYN_ ALLOW_ UNMATCHED_ CLOSE_ SUBEXP - ONIG_
SYN_ BACKSLASH_ ESCAPE_ IN_ CC - ONIG_
SYN_ CAPTURE_ ONLY_ NAMED_ GROUP - ONIG_
SYN_ CONTEXT_ INDEP_ ANCHORS - ONIG_
SYN_ CONTEXT_ INDEP_ REPEAT_ OPS - ONIG_
SYN_ CONTEXT_ INVALID_ REPEAT_ OPS - ONIG_
SYN_ DIFFERENT_ LEN_ ALT_ LOOK_ BEHIND - ONIG_
SYN_ FIXED_ INTERVAL_ IS_ GREEDY_ ONLY - ONIG_
SYN_ NOT_ NEWLINE_ IN_ NEGATIVE_ CC - ONIG_
SYN_ OP2_ ATMARK_ CAPTURE_ HISTORY - ONIG_
SYN_ OP2_ CCLASS_ SET_ OP - ONIG_
SYN_ OP2_ ESC_ CAPITAL_ C_ BAR_ CONTROL - ONIG_
SYN_ OP2_ ESC_ CAPITAL_ K_ KEEP - ONIG_
SYN_ OP2_ ESC_ CAPITAL_ M_ BAR_ META - ONIG_
SYN_ OP2_ ESC_ CAPITAL_ Q_ QUOTE - ONIG_
SYN_ OP2_ ESC_ CAPITAL_ R_ LINEBREAK - ONIG_
SYN_ OP2_ ESC_ CAPITAL_ X_ EXTENDED_ GRAPHEME_ CLUSTER - ONIG_
SYN_ OP2_ ESC_ GNU_ BUF_ ANCHOR - ONIG_
SYN_ OP2_ ESC_ G_ BRACE_ BACKREF - ONIG_
SYN_ OP2_ ESC_ G_ SUBEXP_ CALL - ONIG_
SYN_ OP2_ ESC_ H_ HORIZONTAL_ WHITESPACE - ONIG_
SYN_ OP2_ ESC_ H_ XDIGIT - ONIG_
SYN_ OP2_ ESC_ K_ NAMED_ BACKREF - ONIG_
SYN_ OP2_ ESC_ P_ BRACE_ CHAR_ PROPERTY - ONIG_
SYN_ OP2_ ESC_ P_ BRACE_ CIRCUMFLEX_ NOT - ONIG_
SYN_ OP2_ ESC_ U_ HEX4 - ONIG_
SYN_ OP2_ ESC_ V_ VERTICAL_ WHITESPACE - ONIG_
SYN_ OP2_ ESC_ V_ VTAB - ONIG_
SYN_ OP2_ INEFFECTIVE_ ESCAPE - ONIG_
SYN_ OP2_ OPTION_ PERL - ONIG_
SYN_ OP2_ OPTION_ RUBY - ONIG_
SYN_ OP2_ PLUS_ POSSESSIVE_ INTERVAL - ONIG_
SYN_ OP2_ PLUS_ POSSESSIVE_ REPEAT - ONIG_
SYN_ OP2_ QMARK_ CAPITAL_ P_ NAMED_ GROUP - ONIG_
SYN_ OP2_ QMARK_ GROUP_ EFFECT - ONIG_
SYN_ OP2_ QMARK_ LPAREN_ CONDITION - ONIG_
SYN_ OP2_ QMARK_ LT_ NAMED_ GROUP - ONIG_
SYN_ OP2_ QMARK_ SUBEXP_ CALL - ONIG_
SYN_ OP2_ QMARK_ TILDE_ ABSENT - ONIG_
SYN_ OP2_ QMARK_ VBAR_ BRANCH_ RESET - ONIG_
SYN_ OP_ ASTERISK_ ZERO_ INF - ONIG_
SYN_ OP_ BRACE_ INTERVAL - ONIG_
SYN_ OP_ BRACKET_ CC - ONIG_
SYN_ OP_ DECIMAL_ BACKREF - ONIG_
SYN_ OP_ DOT_ ANYCHAR - ONIG_
SYN_ OP_ ESC_ ASTERISK_ ZERO_ INF - ONIG_
SYN_ OP_ ESC_ AZ_ BUF_ ANCHOR - ONIG_
SYN_ OP_ ESC_ BRACE_ INTERVAL - ONIG_
SYN_ OP_ ESC_ B_ WORD_ BOUND - ONIG_
SYN_ OP_ ESC_ CAPITAL_ G_ BEGIN_ ANCHOR - ONIG_
SYN_ OP_ ESC_ CONTROL_ CHARS - ONIG_
SYN_ OP_ ESC_ C_ CONTROL - ONIG_
SYN_ OP_ ESC_ D_ DIGIT - ONIG_
SYN_ OP_ ESC_ LPAREN_ SUBEXP - ONIG_
SYN_ OP_ ESC_ LTGT_ WORD_ BEGIN_ END - ONIG_
SYN_ OP_ ESC_ OCTA L3 - ONIG_
SYN_ OP_ ESC_ O_ BRACE_ OCTAL - ONIG_
SYN_ OP_ ESC_ PLUS_ ONE_ INF - ONIG_
SYN_ OP_ ESC_ QMARK_ ZERO_ ONE - ONIG_
SYN_ OP_ ESC_ S_ WHITE_ SPACE - ONIG_
SYN_ OP_ ESC_ VBAR_ ALT - ONIG_
SYN_ OP_ ESC_ W_ WORD - ONIG_
SYN_ OP_ ESC_ X_ BRACE_ HEX8 - ONIG_
SYN_ OP_ ESC_ X_ HEX2 - ONIG_
SYN_ OP_ LINE_ ANCHOR - ONIG_
SYN_ OP_ LPAREN_ SUBEXP - ONIG_
SYN_ OP_ PLUS_ ONE_ INF - ONIG_
SYN_ OP_ POSIX_ BRACKET - ONIG_
SYN_ OP_ QMARK_ NON_ GREEDY - ONIG_
SYN_ OP_ QMARK_ ZERO_ ONE - ONIG_
SYN_ OP_ VARIABLE_ META_ CHARACTERS - ONIG_
SYN_ OP_ VBAR_ ALT - ONIG_
SYN_ STRICT_ CHECK_ BACKREF - ONIG_
SYN_ USE_ LEFT_ MOST_ NAMED_ GROUP - ONIG_
SYN_ WARN_ CC_ DUP - ONIG_
SYN_ WARN_ CC_ OP_ NOT_ ESCAPED - ONIG_
SYN_ WARN_ REDUNDANT_ NESTED_ REPEAT - ONIG_
TRAVERSE_ CALLBACK_ AT_ BOTH - ONIG_
TRAVERSE_ CALLBACK_ AT_ FIRST - ONIG_
TRAVERSE_ CALLBACK_ AT_ LAST - Onig
Code Point Mask - Onig
Code Point Mask Width - Onig
Special Index Shift - Onig
Special Index Width - PATH_
ENV - PATH_
SEP - POSIX_
SIGNAL - PRIXPTRDIFF
- PRIXSIZE
- PRIXVALUE
- PRI_
64_ PREFIX - PRI_
INT_ PREFIX - PRI_
LL_ PREFIX - PRI_
LONG_ PREFIX - PRI_
PTRDIFF_ PREFIX - PRI_
SHORT_ PREFIX - PRI_
SIZE_ PREFIX - PRI_
VALUE_ PREFIX - PRIdPTRDIFF
- PRIdSIZE
- PRIdVALUE
- PRIiPTRDIFF
- PRIiSIZE
- PRIoPTRDIFF
- PRIoSIZE
- PRIoVALUE
- PRIsVALUE
- PRIuPTRDIFF
- PRIuSIZE
- PRIuVALUE
- PRIxPTRDIFF
- PRIxSIZE
- PRIxVALUE
- RB_
BLOCK_ CALL_ FUNC_ STRICT - RB_
DEBUG_ H - RB_
EVENT_ HOOKS_ HAVE_ CALLBACK_ DATA - RB_
IO_ BUFFER_ EXPERIMENTAL - RB_
NOGVL_ INTR_ FAIL - RB_
NOGVL_ UBF_ ASYNC_ SAFE - RB_
NO_ KEYWORDS - RB_
NUM_ COERCE_ FUNCS_ NEED_ OPID - RB_
PASS_ KEYWORDS - RB_
SCAN_ ARGS_ KEYWORDS - RB_
SCAN_ ARGS_ LAST_ HASH_ KEYWORDS - RB_
SCAN_ ARGS_ PASS_ CALLED_ KEYWORDS - RB_
WAITFD_ IN - RB_
WAITFD_ OUT - RB_
WAITFD_ PRI - RGENGC_
WB_ PROTECTED_ ARRAY - RGENGC_
WB_ PROTECTED_ BIGNUM - RGENGC_
WB_ PROTECTED_ CLASS - RGENGC_
WB_ PROTECTED_ COMPLEX - RGENGC_
WB_ PROTECTED_ FLOAT - RGENGC_
WB_ PROTECTED_ HASH - RGENGC_
WB_ PROTECTED_ NODE_ CREF - RGENGC_
WB_ PROTECTED_ OBJECT - RGENGC_
WB_ PROTECTED_ RATIONAL - RGENGC_
WB_ PROTECTED_ REGEXP - RGENGC_
WB_ PROTECTED_ STRING - RGENGC_
WB_ PROTECTED_ STRUCT - ROBJECT_
OFFSET_ AS_ ARY - ROBJECT_
OFFSET_ AS_ HEAP_ IVPTR - ROBJECT_
OFFSET_ AS_ HEAP_ IV_ INDEX_ TBL - RUBY_
ALLOCV_ LIMIT - RUBY_
API_ VERSION_ CODE - RUBY_
API_ VERSION_ MAJOR - RUBY_
API_ VERSION_ MINOR - RUBY_
API_ VERSION_ TEENY - RUBY_
ATOMIC_ GENERIC_ MACRO - RUBY_
AUTHOR - RUBY_
BIRTH_ DAY - RUBY_
BIRTH_ MONTH - RUBY_
BIRTH_ YEAR - RUBY_
BLOCK_ CALL_ FUNC_ TAKES_ BLOCKARG - RUBY_
CALL_ WO_ GVL_ FLAG_ SKIP_ CHECK_ INTS_ AFTER - RUBY_
DEBUG - RUBY_
DEFINES_ H - RUBY_
ENCODING_ H - RUBY_
EVENT_ ALL - RUBY_
EVENT_ B_ CALL - RUBY_
EVENT_ B_ RETURN - RUBY_
EVENT_ CALL - RUBY_
EVENT_ CLASS - RUBY_
EVENT_ C_ CALL - RUBY_
EVENT_ C_ RETURN - RUBY_
EVENT_ END - RUBY_
EVENT_ FIBER_ SWITCH - RUBY_
EVENT_ LINE - RUBY_
EVENT_ NONE - RUBY_
EVENT_ RAISE - RUBY_
EVENT_ RESERVED_ FOR_ INTERNAL_ USE - RUBY_
EVENT_ RETURN - RUBY_
EVENT_ SCRIPT_ COMPILED - RUBY_
EVENT_ SWITCH - RUBY_
EVENT_ THREAD_ BEGIN - RUBY_
EVENT_ THREAD_ END - RUBY_
EVENT_ TRACEPOINT_ ALL - RUBY_
FIBER_ SCHEDULER_ VERSION - RUBY_
FL_ DUPPED - RUBY_H
- RUBY_
INTEGER_ UNIFICATION - RUBY_
INTERNAL_ EVENT_ FREEOBJ - RUBY_
INTERNAL_ EVENT_ GC_ END_ MARK - RUBY_
INTERNAL_ EVENT_ GC_ END_ SWEEP - RUBY_
INTERNAL_ EVENT_ GC_ ENTER - RUBY_
INTERNAL_ EVENT_ GC_ EXIT - RUBY_
INTERNAL_ EVENT_ GC_ START - RUBY_
INTERNAL_ EVENT_ MASK - RUBY_
INTERNAL_ EVENT_ NEWOBJ - RUBY_
INTERNAL_ EVENT_ OBJSPACE_ MASK - RUBY_
INTERNAL_ EVENT_ SWITCH - RUBY_
INTERNAL_ THREAD_ EVENT_ EXITED - RUBY_
INTERNAL_ THREAD_ EVENT_ MASK - RUBY_
INTERNAL_ THREAD_ EVENT_ READY - RUBY_
INTERNAL_ THREAD_ EVENT_ RESUMED - RUBY_
INTERNAL_ THREAD_ EVENT_ STARTED - RUBY_
INTERNAL_ THREAD_ EVENT_ SUSPENDED - RUBY_
INTERN_ H - RUBY_
IO_ BUFFER_ VERSION - RUBY_
IO_ H - RUBY_
MEMORY_ VIEW_ H - RUBY_
MISSING_ H - RUBY_
NDEBUG - RUBY_
PLATFORM - RUBY_
PRI_ VALUE_ MARK - RUBY_
RACTOR_ H - RUBY_
RANDOM_ H - RUBY_
RANDOM_ INTERFACE_ VERSION_ MAJOR - RUBY_
RANDOM_ INTERFACE_ VERSION_ MAJOR_ MAX - RUBY_
RANDOM_ INTERFACE_ VERSION_ MINOR - RUBY_
RANDOM_ INTERFACE_ VERSION_ MINOR_ MAX - RUBY_
RE_ H - RUBY_
RUBY_ BACKWARD_ H - RUBY_
RUBY_ H - RUBY_
ST_ H - RUBY_
SUBST_ H - RUBY_
THREAD_ H - RUBY_
THREAD_ NATIVE_ H - RUBY_
UNTYPED_ DATA_ WARNING - RUBY_
UTIL_ H - RUBY_
VERSION_ H - RUBY_VM
- RUBY_
VM_ H - SIGNEDNESS_
OF_ CLOCKID_ T - SIGNEDNESS_
OF_ DEV_ T - SIGNEDNESS_
OF_ GID_ T - SIGNEDNESS_
OF_ MODE_ T - SIGNEDNESS_
OF_ OFF_ T - SIGNEDNESS_
OF_ PID_ T - SIGNEDNESS_
OF_ RLIM_ T - SIGNEDNESS_
OF_ TIME_ T - SIGNEDNESS_
OF_ UID_ T - SIZEOF_
CLOCK_ T - SIZEOF_
DEV_ T - SIZEOF_
DOUBLE - SIZEOF_
FLOAT - SIZEOF_
INT - SIZEOF_
INT8_ T - SIZEOF_
INT16_ T - SIZEOF_
INT32_ T - SIZEOF_
INT64_ T - SIZEOF_
INT128_ T - SIZEOF_
INTPTR_ T - SIZEOF_
LONG - SIZEOF_
LONG_ LONG - SIZEOF_
OFF_ T - SIZEOF_
PTRDIFF_ T - SIZEOF_
SHORT - SIZEOF_
SIZE_ T - SIZEOF_
SSIZE_ T - SIZEOF_
STRUCT_ STAT_ ST_ BLOCKS - SIZEOF_
STRUCT_ STAT_ ST_ DEV - SIZEOF_
STRUCT_ STAT_ ST_ INO - SIZEOF_
STRUCT_ STAT_ ST_ RDEV - SIZEOF_
STRUCT_ STAT_ ST_ SIZE - SIZEOF_
STRUCT_ TIMEVAL_ TV_ SEC - SIZEOF_
ST_ INDEX_ T - SIZEOF_
TIME_ T - SIZEOF_
UINT8_ T - SIZEOF_
UINT16_ T - SIZEOF_
UINT32_ T - SIZEOF_
UINT64_ T - SIZEOF_
UINT128_ T - SIZEOF_
UINTPTR_ T - SIZEOF_
VALUE - SIZEOF_
VOIDP - SIZEOF___
INT64 - SIZEOF___
INT128 - STACK_
GROW_ DIRECTION - STDC_
HEADERS - THREAD_
IMPL_ H - THREAD_
IMPL_ SRC - TRUE
- UNALIGNED_
WORD_ ACCESS - UNLIMITED_
ARGUMENTS - USE_
COPY_ FILE_ RANGE - USE_ELF
- USE_
FLONUM - USE_
GC_ MALLOC_ OBJ_ INFO_ DETAILS - USE_
MJIT - USE_
RGENGC - USE_
RGENGC_ LOGGING_ WB_ UNPROTECT - USE_
RINCGC - USE_
RVARGC - USE_
SYMBOL_ AS_ METHOD_ NAME - USE_
TRANSIENT_ HEAP - USE_
UNALIGNED_ MEMBER_ ACCESS - USE_
YJIT - _ALL_
SOURCE - _DARWIN_
C_ SOURCE - _GNU_
SOURCE - _HPUX_
ALT_ XOPEN_ SOCKET_ API - _NETBSD_
SOURCE - _OPENBSD_
SOURCE - _POSIX_
PTHREAD_ SEMANTICS - _REENTRANT
- _TANDEM_
SOURCE - _THREAD_
SAFE - __
EXTENSIONS__ - __
STDC_ WANT_ IEC_ 60559_ ATTRIBS_ EXT__ - __
STDC_ WANT_ IEC_ 60559_ BFP_ EXT__ - __
STDC_ WANT_ IEC_ 60559_ DFP_ EXT__ - __
STDC_ WANT_ IEC_ 60559_ FUNCS_ EXT__ - __
STDC_ WANT_ IEC_ 60559_ TYPES_ EXT__ - __
STDC_ WANT_ LIB_ EXT2__ - __
STDC_ WANT_ MATH_ SPEC_ FUNCS__
Statics§
- Onig
Default ⚠Case Fold Flag
- Onig
Default ⚠Syntax
- Onig
EncDefault ⚠Char Encoding
- Onig
EncodingASCII ⚠
- Onig
SyntaxASIS ⚠
- Onig
Syntax ⚠Emacs
- Onig
Syntax ⚠GnuRegex
- Onig
Syntax ⚠Grep
- Onig
Syntax ⚠Java
- Onig
Syntax ⚠Perl
- Onig
Syntax ⚠Perl58
- Onig
Syntax ⚠Perl58_ NG
- Onig
Syntax ⚠Posix Basic
- Onig
Syntax ⚠Posix Extended
- Onig
Syntax ⚠Python
- Onig
Syntax ⚠Ruby
- RUBY_
IO_ ⚠BUFFER_ DEFAULT_ SIZE
- RUBY_
IO_ ⚠BUFFER_ PAGE_ SIZE
- rb_
argv0 ⚠ - The value of
$0at process bootup. - rb_
cArray ⚠ - <
Arrayclass. - rb_
cBasic ⚠Object - <
BasicObjectclass. - rb_
cBinding ⚠ - <
Bindingclass. - rb_
cClass ⚠ - <
Classclass. - rb_
cComplex ⚠ - <
Complexclass. - rb_cDir⚠
- <
Dirclass. - rb_
cEncoding ⚠ - <
Encodingclass. - rb_
cEnumerator ⚠ - <
Enumeratorclass. - rb_
cFalse ⚠Class - <
FalseClassclass. - rb_
cFile ⚠ - <
Fileclass. - rb_
cFloat ⚠ - <
Floatclass. - rb_
cHash ⚠ - <
Hashclass. - rb_cIO⚠
- <
IOclass. - rb_
cIOBuffer ⚠
- rb_
cInteger ⚠ - <
Moduleclass. - rb_
cMatch ⚠ - <
MatchDataclass. - rb_
cMethod ⚠ - <
Methodclass. - rb_
cModule ⚠ - <
Moduleclass. - rb_
cName ⚠Error Mesg - <
NameError::Messageclass. - rb_
cNil ⚠Class - <
NilClassclass. - rb_
cNumeric ⚠ - <
Numericclass. - rb_
cObject ⚠
- rb_
cProc ⚠ - <
Procclass. - rb_
cRactor ⚠ Ractorclass.- rb_
cRandom ⚠ - <
Randomclass. - rb_
cRange ⚠ - <
Rangeclass. - rb_
cRational ⚠ - <
Rationalclass. - rb_
cRefinement ⚠ - <
Refinementclass. - rb_
cRegexp ⚠ - <
Regexpclass. - rb_
cStat ⚠ - <
File::Statclass. - rb_
cString ⚠ - <
Stringclass. - rb_
cStruct ⚠ - <
Structclass. - rb_
cSymbol ⚠ - <
Sumbolclass. - rb_
cThread ⚠ - <
Threadclass. - rb_
cTime ⚠ - <
Timeclass. - rb_
cTrue ⚠Class - <
TrueClassclass. - rb_
cUnbound ⚠Method - <
UnboundMethodclass. - rb_
default_ ⚠rs - This is the default value of ::
rb_rs, i.e."\n". It seems it has always been just a newline string since the beginning. Not sure why C codes has to use this, given there is no way for ruby programs to interface. - rb_
eArg ⚠Error - <
ArgumentErrorexception. - rb_
eEOF ⚠Error - <
EOFErrorexception. - rb_
eEnc ⚠Compat Error - <
Encoding::CompatibilityErrorexception. - rb_
eEncoding ⚠Error - <
EncodingErrorexception. - rb_
eException ⚠ - < Mother of all exceptions.
- rb_
eFatal ⚠ - <
fatalexception. - rb_
eFloat ⚠Domain Error - <
FloatDomainErrorexception. - rb_
eFrozen ⚠Error - <
FrozenErrorexception. - rb_
eIOError ⚠ - <
IOErrorexception. - rb_
eIOTimeout ⚠Error - Indicates that a timeout has occurred while performing an IO operation.
- rb_
eIndex ⚠Error - <
IndexErrorexception. - rb_
eInterrupt ⚠ - <
Interruptexception. - rb_
eKey ⚠Error - <
KeyErrorexception. - rb_
eLoad ⚠Error - <
LoadErrorexception. - rb_
eLocal ⚠Jump Error - <
LocalJumpErrorexception. - rb_
eMath ⚠Domain Error - <
Math::DomainErrorexception. - rb_
eName ⚠Error - <
NameErrorexception. - rb_
eNoMatching ⚠Pattern Error - <
NoMatchingPatternErrorexception. - rb_
eNoMatching ⚠Pattern KeyError - <
NoMatchingPatternKeyErrorexception. - rb_
eNoMem ⚠Error - <
NoMemoryErrorexception. - rb_
eNoMethod ⚠Error - <
NoMethodErrorexception. - rb_
eNot ⚠ImpError - <
NotImplementedErrorexception. - rb_
eRange ⚠Error - <
RangeErrorexception. - rb_
eRegexp ⚠Error - <
RegexpErrorexception. - rb_
eRuntime ⚠Error - <
RuntimeErrorexception. - rb_
eScript ⚠Error - <
ScriptErrorexception. - rb_
eSecurity ⚠Error - <
SecurityErrorexception. - rb_
eSignal ⚠ - <
SignalExceptionexception. - rb_
eStandard ⚠Error - <
StandardErrorexception. - rb_
eStop ⚠Iteration - <
StopIterationexception. - rb_
eSyntax ⚠Error - <
SyntaxErrorexception. - rb_
eSys ⚠Stack Error - <
SystemStackErrorexception. - rb_
eSystem ⚠Call Error - <
SystemCallErrorexception. - rb_
eSystem ⚠Exit - <
SystemExitexception. - rb_
eThread ⚠Error - <
ThreadErrorexception. - rb_
eType ⚠Error - <
TypeErrorexception. - rb_
eZero ⚠DivError - <
ZeroDivisionErrorexception. - rb_fs⚠
- The field separator character for inputs, or the
$;. This affects howString#splitworks. You can set this via the-Fcommand line option. You can also assign arbitrary ruby objects programmatically, but it makes best sense for you to assign a regular expression here. - rb_
mComparable ⚠ - <
Comparablemodule. - rb_
mEnumerable ⚠ - <
Enumerablemodule. - rb_
mErrno ⚠ - <
Errnomodule. - rb_
mFile ⚠Test - <
FileTestmodule. - rb_mGC⚠
- <
GCmodule. - rb_
mKernel ⚠ - <
Kernelmodule. - rb_
mMath ⚠ - <
Mathmodule. - rb_
mProcess ⚠ - <
Processmodule. - rb_
mWait ⚠Readable - <
IO::WaitReadablemodule. - rb_
mWait ⚠Writable - <
IO::WaitReadablemodule. - rb_
memory_ ⚠view_ exported_ object_ registry - @cond INTERNAL_MACRO
- rb_
memory_ ⚠view_ exported_ object_ registry_ data_ type
- rb_
output_ ⚠fs Deprecated - The field separator character for outputs, or the
$,. This affects howArray#joinworks. - rb_
output_ ⚠rs Deprecated - The record separator character for outputs, or the
$\. This affects howIO#printworks. - rb_
ractor_ ⚠local_ storage_ type_ free - A type of ractor-local storage that destructs itself using ::ruby_xfree.
- rb_
random_ ⚠data_ type_ 1_ 0 - The data that holds the backend type of ::
rb_cRandom. Used as your PRNG’s ::rb_data_type_struct::parent. - rb_rs⚠
Deprecated - The record separator character for inputs, or the
$/. This affects howIO#getsworks. You can set this via the-0command line option. - rb_
stderr ⚠ - <
STDERRconstant. - rb_
stdin ⚠ - <
STDINconstant. - rb_
stdout ⚠ - <
STDOUTconstant. - ruby_
api_ ⚠version - API versions, in { major, minor, teeny } order.
- ruby_
copyright ⚠ - Copyright notice.
- ruby_
description ⚠ - This is what
ruby -vprints to the standard error. Something like:"ruby 2.5.9p229 (2021-04-05 revision 67829) [x86_64-linux]". This doesn’t include runtime options like a JIT being enabled. - ruby_
digit36_ ⚠to_ number_ table - Character to number mapping like
'a'->10,'b'->11etc. For punctuation etc., the value is -1. “36” terminology comes from the fact that this is the table behindstr.to_i(36). - ruby_
engine ⚠ - This is just
"ruby"for us. But different implementations can have different strings here. - ruby_
hexdigits ⚠ - Characters that Ruby accepts as hexadecimal digits. This is
/\h/expanded into an array. - ruby_
patchlevel ⚠ - This is a monotonic increasing integer that describes specific “patch” level. You can know the exact changeset your binary is running by this info (and ::ruby_version), unless this is -1. -1 means there is no release yet for the version; ruby is actively developed. 0 means the initial GA version.
- ruby_
platform ⚠ - Target platform identifier, in a C string.
- ruby_
release_ ⚠date - Date of release, in a C string.
- ruby_
version ⚠ - Stringised version.
Functions§
- onig_
capture_ ⚠tree_ traverse
- onig_
check_ ⚠linear_ time
- onig_
copy_ ⚠encoding
- onig_
copy_ ⚠syntax
- onig_
copyright ⚠
- onig_
end ⚠
- onig_
error_ ⚠code_ to_ str
- onig_
foreach_ ⚠name
- onig_
free ⚠
- onig_
free_ ⚠body
- onig_
get_ ⚠case_ fold_ flag
- onig_
get_ ⚠default_ case_ fold_ flag
- onig_
get_ ⚠encoding
- onig_
get_ ⚠match_ stack_ limit_ size
- onig_
get_ ⚠options
- onig_
get_ ⚠parse_ depth_ limit
- onig_
get_ ⚠syntax
- onig_
get_ ⚠syntax_ behavior
- onig_
get_ ⚠syntax_ op
- onig_
get_ ⚠syntax_ op2
- onig_
get_ ⚠syntax_ options
- onig_
init ⚠
- onig_
initialize ⚠
- onig_
match ⚠
- onig_
name_ ⚠to_ backref_ number
- onig_
name_ ⚠to_ group_ numbers
- onig_
new ⚠
- onig_
new_ ⚠deluxe
- onig_
new_ ⚠without_ alloc
- onig_
noname_ ⚠group_ capture_ is_ active
- onig_
null_ ⚠warn
- onig_
number_ ⚠of_ capture_ histories
- onig_
number_ ⚠of_ captures
- onig_
number_ ⚠of_ names
- onig_
reg_ ⚠init
- onig_
region_ ⚠clear
- onig_
region_ ⚠copy
- onig_
region_ ⚠free
- onig_
region_ ⚠init
- onig_
region_ ⚠new
- onig_
region_ ⚠resize
- onig_
region_ ⚠set
- onig_
scan ⚠
- onig_
search ⚠
- onig_
search_ ⚠gpos
- onig_
set_ ⚠default_ case_ fold_ flag
- onig_
set_ ⚠default_ syntax
- onig_
set_ ⚠match_ stack_ limit_ size
- onig_
set_ ⚠meta_ char
- onig_
set_ ⚠parse_ depth_ limit
- onig_
set_ ⚠syntax_ behavior
- onig_
set_ ⚠syntax_ op
- onig_
set_ ⚠syntax_ op2
- onig_
set_ ⚠syntax_ options
- onig_
set_ ⚠verb_ warn_ func
- onig_
set_ ⚠warn_ func
- onig_
version ⚠
- onigenc_
ascii_ ⚠only_ case_ map
- onigenc_
get_ ⚠default_ encoding
- onigenc_
get_ ⚠left_ adjust_ char_ head
- onigenc_
get_ ⚠prev_ char_ head
- onigenc_
get_ ⚠right_ adjust_ char_ head
- onigenc_
get_ ⚠right_ adjust_ char_ head_ with_ prev
- onigenc_
init ⚠
- onigenc_
mbclen ⚠
- onigenc_
set_ ⚠default_ encoding
- onigenc_
step_ ⚠back
- onigenc_
str_ ⚠bytelen_ null
- onigenc_
strlen ⚠
- onigenc_
strlen_ ⚠null
- rb_
Array ⚠ - This is the logic behind
Kernel#Array. Arguments are converted by first trying#to_ary, then#to_a, and if both failed, returns an array of length 1 that contains the passed argument as the sole contents. - rb_
Complex ⚠ - Converts various values into a Complex. This function accepts:
- rb_
Float ⚠ - This is the logic behind
Kernel#Float. Numeric types are converted directly to the nearest value that a Float can represent. Strings are interpreted strictly; only leading/trailing whitespaces are allowed except whatstrtodunderstands. Anything else are converted using#to_f. - rb_Hash⚠
- This is the logic behind
Kernel#Hash. Arguments are converted by first trying#to_hash. if it failed, and the argument is either ::RUBY_Qnil or an empty array, returns an empty hash. Otherwise an exception is raised. - rb_
Integer ⚠ - This is the logic behind
Kernel#Integer. Numeric types are converted directly, with floating point numbers being truncated. Strings are interpreted strictly; only leading/trailing whitespaces, plus/minus sign, radix indicators such as0x, digits, and underscores are allowed. Anything else are converted by first trying#to_int, then#to_i. - rb_
Rational ⚠ - Converts various values into a Rational. This function accepts:
- rb_
String ⚠ - This is the logic behind
Kernel#String. Arguments are converted by first trying#to_str, then#to_s. - rb_
absint_ ⚠numwords - Calculates the number of words needed represent the absolute value of the
passed integer. Unlike
rb_absint_sizethis function can overflow. It returns(size_t)-1then. - rb_
absint_ ⚠singlebit_ p - Tests
abs(val)consists only of a bit or not. - rb_
absint_ ⚠size - Calculates the number of bytes needed to represent the absolute value of the passed integer.
- rb_
add_ ⚠event_ hook - Registers an event hook function.
- rb_
add_ ⚠event_ hook2
- rb_
alias ⚠ - Resembles
alias. - rb_
alias_ ⚠variable - Aliases a global variable. Did you know that you can alias a global variable? It is like aliasing methods:
- rb_
alloc_ ⚠tmp_ buffer
- rb_
alloc_ ⚠tmp_ buffer_ with_ count
- rb_
any_ ⚠to_ s - Generates a textual representation of the given object.
- rb_
apply ⚠ - Identical to
rb_funcallv, except it takes Ruby’s array instead of C’s. @param[in,out] recv Receiver of the method. @param[in] mid Name of the method to call. @param[in] args An instance of ::RArray. @exceptionrb_eNoMethodErrorNo such method. @exceptionrb_eExceptionAny exceptions happen inside. @return What the method evaluates to. @preargsmust be an ::RArray. Callto_arybeforehand when necessary. - rb_
arithmetic_ ⚠sequence_ beg_ len_ step - Identical to
rb_range_beg_len, except it takes an instance ofEnumerator::ArithmericSequence. - rb_
arithmetic_ ⚠sequence_ extract - Extracts components of the passed arithmetic sequence. This can be seen as
an extended version of
rb_range_values. - rb_
ary_ ⚠aref - Queries element(s) of an array. This is complicated! Refer
Array#slicedocument for the complete description of how it behaves. - rb_
ary_ ⚠assoc - Looks up the passed key, assuming the passed array is an alist. An “alist”
here is a list of “association“s, much like that of Emacs. Emacs has
assocfunction that behaves exactly the same as this one. - rb_
ary_ ⚠cat - Destructively appends multiple elements at the end of the array.
- rb_
ary_ ⚠clear - Destructively removes everything form an array.
- rb_
ary_ ⚠cmp - Recursively compares each elements of the two arrays one-by-one using
<=>. - rb_
ary_ ⚠concat - Destructively appends the contents of latter into the end of former.
- rb_
ary_ ⚠delete - Destructively removes elements from the passed array, so that there would be
no elements inside that satisfy
==relationship with the passed object. Returns the last deleted element if any. But in case there was nothing to delete it gets complicated. It checks for the implicitly passed block. If there is a block the return value would be what the block evaluates to. Otherwise it resorts to ::RUBY_Qnil. - rb_
ary_ ⚠delete_ at - Destructively removes an element which resides at the specific index of the
passed array. Unlike [
rb_ary_stre] the index can be negative, which means the index counts backwards from the array’s tail. - rb_
ary_ ⚠detransient - Destructively converts an array of transient backend into ordinal one.
- rb_
ary_ ⚠dup - Duplicates an array.
- rb_
ary_ ⚠each - Iteratively yields each element of the passed array to the implicitly passed block if any. In case there is no block given, an enumerator that does the thing is generated instead.
- rb_
ary_ ⚠entry - Queries an element of an array. When passed offset is negative it counts backwards.
- rb_
ary_ ⚠free - Destroys the given array for no reason.
- rb_
ary_ ⚠freeze - @alias{
rb_obj_freeze} - rb_
ary_ ⚠hidden_ new - Allocates a hidden (no class) empty array.
- rb_
ary_ ⚠includes - Queries if the passed array has the passed entry.
- rb_
ary_ ⚠join - Recursively stringises the elements of the passed array, flattens that result, then joins the sequence using the passed separator.
- rb_
ary_ ⚠modify - Declares that the array is about to be modified. This for instance let the array have a dedicated backend storage.
- rb_
ary_ ⚠new - Allocates a new, empty array.
- rb_
ary_ ⚠new_ capa - Identical to
rb_ary_new, except it additionally specifies how many rooms of objects it should allocate. This way you can create an array whose capacity is bigger than the length of it. If you can say that an array grows to a specific amount, this could be effective than resizing an array over and over again and again. - rb_
ary_ ⚠new_ from_ args - Constructs an array from the passed objects.
- rb_
ary_ ⚠new_ from_ values - Identical to
rb_ary_new_from_args, except how objects are passed. - rb_
ary_ ⚠plus - Creates a new array, concatenating the former to the latter.
- rb_
ary_ ⚠pop - Destructively deletes an element from the end of the passed array and returns what was deleted.
- rb_
ary_ ⚠ptr_ use_ end
- rb_
ary_ ⚠ptr_ use_ start
- rb_
ary_ ⚠push - Special case of
rb_ary_catthat it adds only one element. - rb_
ary_ ⚠rassoc - Identical to
rb_ary_assoc, except it scans the passed array from the opposite direction. - rb_
ary_ ⚠replace - Replaces the contents of the former object with the contents of the latter.
- rb_
ary_ ⚠resize - Expands or shrinks the passed array to the passed length.
- rb_
ary_ ⚠resurrect - I guess there is no use case of this function in extension libraries, but
this is a routine identical to
rb_ary_dup. This makes the most sense when the passed array is formerly hidden byrb_obj_hide. - rb_
ary_ ⚠reverse - Destructively reverses the passed array in-place.
- rb_
ary_ ⚠rotate - Destructively rotates the passed array in-place to towards its end. The amount can be negative. Would rotate to the opposite direction then.
- rb_
ary_ ⚠shared_ with_ p - Queries if the passed two arrays share the same backend storage. A use-case
for knowing such property is to take a snapshot of an array (using
e.g.
rb_ary_replace, then check later if that snapshot still shares the storage with the original. Taking a snapshot is ultra-cheap. If nothing happens the impact shall be minimal. But if someone modifies the original, that entity shall pay the cost of copy-on-write. You can detect that using this API. - rb_
ary_ ⚠shift - Destructively deletes an element from the beginning of the passed array and
returns what was deleted. It can also be seen as a routine identical to
rb_ary_pop, except which side of the array to scrub. - rb_
ary_ ⚠sort - Creates a copy of the passed array, whose elements are sorted according to
their
<=>result. - rb_
ary_ ⚠sort_ bang - Destructively sorts the passed array in-place, according to each elements’
<=>result. - rb_
ary_ ⚠store - Destructively stores the passed value to the passed array’s passed index. It also resizes the array’s backend storage so that the requested index is not out of bounds.
- rb_
ary_ ⚠subseq - Obtains a part of the passed array.
- rb_
ary_ ⚠to_ ary - Force converts an object to an array. It first tries its
#to_arymethod. Takes the result if any. Otherwise creates an array of size 1 whose sole element is the passed object. - rb_
ary_ ⚠to_ s - Converts an array into a human-readable string. Historically its behaviour
changed over time. Currently it is identical to calling
inspectmethod. This behaviour is from that of python (!!) circa 2006. - rb_
ary_ ⚠unshift - Destructively prepends the passed item at the beginning of the passed array.
It can also be seen as a routine identical to
rb_ary_push, except which side of the array to modify. - rb_
ascii8bit_ ⚠encindex - Identical to
rb_ascii8bit_encoding, except it returns the encoding’s index instead of the encoding itself. - rb_
ascii8bit_ ⚠encoding - Queries the encoding that represents ASCII-8BIT a.k.a. binary.
- rb_
assert_ ⚠failure
- rb_
assoc_ ⚠new - Identical to
rb_ary_new_from_values, except it expects exactly two parameters. - rb_attr⚠
- This function resembles now-deprecated
Module#attr. - rb_
attr_ ⚠get - Identical to
rb_ivar_get - rb_
autoload_ ⚠load - Kicks the autoload procedure as if it was “touched”.
- rb_
autoload_ ⚠p - Queries if an autoload is defined at a point.
- rb_
backref_ ⚠get - Queries the last match, or
Regexp.last_match, or the$~. You don’t have to use it, because in reality you can get$~usingrb_gv_getas usual. - rb_
backref_ ⚠set - Updates
$~. You don’t have to use it, because in reality you can set$~usingrb_gv_setas usual. - rb_
backtrace ⚠ - Prints the backtrace out to the standard error. This just confuses people for no reason. Evil souls must only use it.
- rb_
big2dbl ⚠ - Converts a bignum into C’s
double. - rb_
big2ll ⚠ - Converts a bignum into C’s
long long. - rb_
big2long ⚠ - Converts a bignum into C’s
long. - rb_
big2str ⚠ - Generates a place-value representation of the passed integer.
- rb_
big2ull ⚠ - Converts a bignum into C’s
unsigned long long. - rb_
big2ulong ⚠ - Converts a bignum into C’s
unsigned long. - rb_
big_ ⚠2comp - Destructively modify the passed bignum into 2’s complement representation.
- rb_
big_ ⚠and - Performs bitwise and of the passed two objects.
- rb_
big_ ⚠clone - Duplicates the given bignum.
- rb_
big_ ⚠cmp - Compares the passed two bignums.
- rb_
big_ ⚠div - Performs division of the passed two objects.
- rb_
big_ ⚠divmod - Performs “divmod” operation. The operation in bignum’s context is that it
calculates
rb_big_idivandrb_big_moduloat once. - rb_
big_ ⚠eq - Equality, in terms of
==. This checks if the value is the same, not the identity. For instance1 == 1.0must hold. - rb_
big_ ⚠eql - Equality, in terms of
eql?. Unlikerb_big_eqit does not convert ::rb_cFloatetc. This function returns ::RUBY_Qtrue if and only if both parameters are bignums, which represent the identical numerical value. - rb_
big_ ⚠idiv - Performs “integer division”. This is different from
rb_big_div. - rb_
big_ ⚠lshift - Performs shift left.
- rb_
big_ ⚠minus - Performs subtraction of the passed two objects.
- rb_
big_ ⚠modulo - Performs modulo of the passed two objects.
- rb_
big_ ⚠mul - Performs multiplication of the passed two objects.
- rb_
big_ ⚠new - Allocates a bignum object.
- rb_
big_ ⚠norm - Normalises the passed bignum. It for instance returns a fixnum of the same value if fixnum can represent that number.
- rb_
big_ ⚠or - Performs bitwise or of the passed two objects.
- rb_
big_ ⚠pack - Converts a bignum into a series of its parts.
- rb_
big_ ⚠plus - Performs addition of the passed two objects.
- rb_
big_ ⚠pow - Raises
xto the powerofy. - rb_
big_ ⚠resize - Destructively resizes the backend storage of the passed bignum.
- rb_
big_ ⚠rshift - Performs shift right.
- rb_
big_ ⚠sign - The “sign” of a bignum.
- rb_
big_ ⚠unpack - Constructs a (possibly very big) bignum from a series of integers.
buf[0]would be the return value’s least significant word;buf[num_longs-1]would be that of most significant. - rb_
big_ ⚠xor - Performs exclusive or of the passed two objects.
- rb_
bigzero_ ⚠p - Queries if the passed bignum instance is a “bigzro”. What is a bigzero? Well, bignums are for very big integers, but can also represent tiny ones like -1, 0, 1. Bigzero are instances of bignums whose values are zero. Knowing if a bignum is bigzero can be handy on occasions, like for instance detecting division by zero situation.
- rb_
binding_ ⚠new - Snapshots the current execution context and turn it into an instance of
::
rb_cBinding. - rb_
block_ ⚠call - Identical to
rb_funcallv, except it additionally passes a function as a block. When the method yields,procis called with the yielded value as its first argument, anddata2as the second. Yielded values would be packed into an array if multiple values are yielded at once. - rb_
block_ ⚠call_ kw - Identical to
rb_funcallv_kw, except it additionally passes a function as a block. It can also be seen as a routine identical torb_block_call, except it handles keyword-ness ofargv[argc-1]. - rb_
block_ ⚠given_ p - Determines if the current method is given a block.
- rb_
block_ ⚠lambda - Identical to
rb_proc_new, except it returns a lambda. - rb_
block_ ⚠proc - Constructs a Proc object from implicitly passed components. When a ruby
method is called with a block, that block is not explicitly passed around
using C level function parameters. This function gathers all the necessary
info to turn them into a Ruby level instance of ::
rb_cProc. - rb_bug⚠
- Interpreter panic switch. Immediate process termination without any synchronisations shall occur. LOTS of internal states, stack traces, and even machine registers are displayed if possible for debugging purposes then.
- rb_
bug_ ⚠errno - This is a wrapper of
rb_bugwhich automatically constructs appropriate message from the passed errno. - rb_
call_ ⚠super - This resembles ruby’s
super. - rb_
call_ ⚠super_ kw - Identical to
rb_call_super, except you can specify how to handle the last element of the given array. - rb_
catch ⚠ - Executes the passed block and catches values thrown from inside of it.
- rb_
catch_ ⚠obj - Identical to
rb_catch, except it catches arbitrary Ruby objects. - rb_
category_ ⚠compile_ warn - Identical to
rb_compile_warn, except it also accepts category. - rb_
category_ ⚠warn - Identical to
rb_category_warning, except it reports always regardless of runtime-Wflag. - rb_
category_ ⚠warning - Identical to
rb_warning, except it takes additional “category” parameter. - rb_
char_ ⚠to_ option_ kcode - Converts a character option to its encoding. It only supports a very limited set of Japanese encodings due to its Japanese origin. Ruby still has this in-core for backwards compatibility. But new codes must not bother such concept like one-character encoding option. Consider deprecated in practice.
- rb_
check_ ⚠array_ type - Try converting an object to its array representation using its
to_arymethod, if any. If there is no such thing, returns ::RUBY_Qnil. - rb_
check_ ⚠convert_ type - Identical to
rb_convert_type, except it returns ::RUBY_Qnil instead of raising exceptions, in case of conversion failure. It still raises exceptions for various reasons, like when the conversion method itself raises, though. - rb_
check_ ⚠copyable - Ensures that the passed object can be
initialize_copyrelationship. When you implement your own one you would better call this at the right beginning of your implementation. - rb_
check_ ⚠frozen - Queries if the passed object is frozen.
- rb_
check_ ⚠funcall - Identical to
rb_funcallv, except it returns ::RUBY_Qundef instead of raising ::rb_eNoMethodError. - rb_
check_ ⚠funcall_ kw - Identical to
rb_check_funcall, except you can specify how to handle the last element of the given array. It can also be seen as a routine identical torb_funcallv_kw, except it returns ::RUBY_Qundef instead of raising ::rb_eNoMethodError. - rb_
check_ ⚠hash_ type - Try converting an object to its hash representation using its
to_hashmethod, if any. If there is no such thing, returns ::RUBY_Qnil. - rb_
check_ ⚠id - Detects if the given name is already interned or not. It first tries to
convert the argument to an instance of ::
rb_cStringif it is neither an instance of ::rb_cStringnor ::rb_cSymbol. The conversion result is written back to the variable. Then queries if that name was already interned before. If found it returns such id, otherwise zero. - rb_
check_ ⚠id_ cstr - Identical to
rb_check_id, except it takes a pointer to a memory region instead of Ruby’s string. - rb_
check_ ⚠inheritable - Asserts that the given class can derive a child class. A class might or might not be able to do so; for instance a singleton class cannot.
- rb_
check_ ⚠safe_ str Deprecated
- rb_
check_ ⚠string_ type - Try converting an object to its stringised representation using its
to_strmethod, if any. If there is no such thing, returns ::RUBY_Qnil. - rb_
check_ ⚠symbol - Identical to
rb_check_id, except it returns an instance of ::rb_cSymbolinstead. - rb_
check_ ⚠symbol_ cstr - Identical to
rb_check_id_cstr, except for the return type. It can also be seen as a routine identical torb_check_symbol, except it takes a pointer to a memory region instead of Ruby’s string. - rb_
check_ ⚠to_ float - This is complicated.
- rb_
check_ ⚠to_ int - Identical to
rb_check_to_integer, except it uses#to_intfor conversion. - rb_
check_ ⚠to_ integer - Identical to
rb_check_convert_type, except the return value type is fixed to ::rb_cInteger. - rb_
check_ ⚠type
- rb_
check_ ⚠typeddata - Identical to
rb_typeddata_is_kind_of, except it raises exceptions instead of returning false. - rb_
class2name ⚠ - Queries the name of the passed class.
- rb_
class_ ⚠attached_ object - Returns the attached object for a singleton class. If the given class is not a singleton class, raises a TypeError.
- rb_
class_ ⚠descendants - Queries the class’s descendants. This routine gathers classes that are subclasses of the given class (or subclasses of those subclasses, etc.), returning an array of classes that have the given class as an ancestor. The returned array does not include the given class or singleton classes.
- rb_
class_ ⚠get_ superclass - Returns the superclass of a class.
@param[in] klass An object of RClass.
@retval RUBY_Qfalse
klasshas no super class. @retval otherwise Raw superclass ofklass@seerb_class_superclass - rb_
class_ ⚠inherited_ p - Determines if the given two modules are relatives.
- rb_
class_ ⚠instance_ methods - Generates an array of symbols, which are the list of method names defined in the passed class.
- rb_
class_ ⚠name - Queries the name of the given object’s class.
- rb_
class_ ⚠new - Creates a new, anonymous class.
- rb_
class_ ⚠new_ instance - Allocates, then initialises an instance of the given class. It first calls the passed class’ allocator to obtain an uninitialised object, then calls its initialiser with the remaining arguments.
- rb_
class_ ⚠new_ instance_ kw - Identical to
rb_class_new_instance, except you can specify how to handle the last element of the given array. - rb_
class_ ⚠new_ instance_ pass_ kw - Identical to
rb_class_new_instance, except it passes the passed keywords if any to the#initializemethod. - rb_
class_ ⚠path - Identical to
rb_mod_name, except it returns#<Class: ...>style inspection for anonymous modules. - rb_
class_ ⚠path_ cached - @alias{
rb_mod_name} - rb_
class_ ⚠private_ instance_ methods - Identical to
rb_class_instance_methods, except it returns names of methods that are private only. - rb_
class_ ⚠protected_ instance_ methods - Identical to
rb_class_instance_methods, except it returns names of methods that are protected only. - rb_
class_ ⚠public_ instance_ methods - Identical to
rb_class_instance_methods, except it returns names of methods that are public only. - rb_
class_ ⚠real - Finds a “real” class. As the name implies there are class objects that are surreal. This function takes a class, traverses its ancestry tree, and returns its nearest ancestor which is neither a module nor a singleton class.
- rb_
class_ ⚠subclasses - Queries the class’s direct descendants. This routine gathers classes that are direct subclasses of the given class, returning an array of classes that have the given class as a superclass. The returned array does not include singleton classes.
- rb_
class_ ⚠superclass - Queries the parent of the given class.
- rb_
clear_ ⚠constant_ cache
- rb_
clear_ ⚠constant_ cache_ for_ id - Clears the inline constant caches associated with a particular ID. Extension libraries should not bother with such things. Just forget about this API (or even, the presence of constant caches).
- rb_
cloexec_ ⚠dup - Identical to
rb_cloexec_fcntl_dupfd, except it implies minfd is 3. - rb_
cloexec_ ⚠dup2 - Identical to
rb_cloexec_dup, except you can specify the destination file descriptor. If the destination is already squatted by another file descriptor that gets silently closed without any warnings. (This is a spec requested by POSIX.) - rb_
cloexec_ ⚠fcntl_ dupfd - Duplicates a file descriptor with closing on exec. In case of POSIX
environments, a child process inherits its parent’s opened file descriptors.
Which is nowadays considered as one of the UNIX mistakes. This function
duplicates a file descriptor as
dup(2)does, but additionally instructs the operating system that we don’t want the duplicated FD be seen from child processes. - rb_
cloexec_ ⚠open - Opens a file that closes on exec. In case of POSIX environments, a child
process inherits its parent’s opened file descriptors. Which is nowadays
considered as one of the UNIX mistakes. This function opens a file
descriptor as
open(2)does, but additionally instructs the operating system that we don’t want it be seen from child processes. - rb_
cloexec_ ⚠pipe - Opens a pipe with closing on exec. In case of POSIX environments, a child
process inherits its parent’s opened file descriptors. Which is nowadays
considered as one of the UNIX mistakes. This function opens a pipe as
pipe(2)does, but additionally instructs the operating system that we don’t want the duplicated FDs be seen from child processes. - rb_
close_ ⚠before_ exec - Closes everything. In case of POSIX environments, a child process inherits its parent’s opened file descriptors. Which is nowadays considered as one of the UNIX mistakes. This function closes such inherited file descriptors. When your C extension needs to have a child process, don’t forget to call this from your child process right before exec.
- rb_
cmperr ⚠ - Raises “comparison failed” error.
- rb_
cmpint ⚠ - Canonicalises the passed
val, which is the return value ofa <=> b, into C’s{-1, 0, 1}. This can be handy when you implement a callback function to pass toqsort(3)etc. - rb_
compile_ ⚠warn - Identical to
rb_compile_warning, except it reports always regardless of runtime-Wflag. - rb_
compile_ ⚠warning - Issues a compile-time warning that happens at
__file__:__line__. Purpose of this function being exposed to CAPI is unclear. - rb_
complex_ ⚠abs - Queries the absolute (or the magnitude) of the passed object.
- rb_
complex_ ⚠arg - Queries the argument (or the angle) of the passed object.
- rb_
complex_ ⚠conjugate - Performs complex conjugation of the passed object.
- rb_
complex_ ⚠div - Performs division of the passed two objects.
- rb_
complex_ ⚠imag - Queries the imaginary part of the passed Complex.
- rb_
complex_ ⚠minus - Performs subtraction of the passed two objects.
- rb_
complex_ ⚠mul - Performs multiplication of the passed two objects.
- rb_
complex_ ⚠new - Constructs a Complex, by first multiplying the imaginary part with
1ithen adds it to the real part. This definition doesn’t need both arguments be real numbers. It can happily combine two instances of ::rb_cComplex(with rotating the latter one). - rb_
complex_ ⚠new_ polar - Constructs a Complex using polar representations. Unlike
rb_complex_newit makes no sense to pass non-real instances to this function. - rb_
complex_ ⚠plus - Performs addition of the passed two objects.
- rb_
complex_ ⚠polar - @old{
rb_complex_new_polar} - rb_
complex_ ⚠pow - Performs exponentiation of the passed two objects.
- rb_
complex_ ⚠raw - Identical to
rb_complex_new, except it assumes both arguments are not instances of ::rb_cComplex. It is thus dangerous for extension libraries. - rb_
complex_ ⚠real - Queries the real part of the passed Complex.
- rb_
complex_ ⚠uminus - Performs negation of the passed object.
- rb_
const_ ⚠defined - Queries if the constant is defined at the namespace.
- rb_
const_ ⚠defined_ at - Identical to
rb_const_defined, except it doesn’t look for parent classes. For instanceArrayis a toplevel constant, which is visible from everywhere. But this function does not take such things into account. It concerns only what is directly defined inside of the given namespace. - rb_
const_ ⚠defined_ from - Identical to
rb_const_defined, except it returns false for private constants. - rb_
const_ ⚠get - Identical to
rb_const_defined, except it returns the actual defined value. - rb_
const_ ⚠get_ at - Identical to
rb_const_defined_at, except it returns the actual defined value. It can also be seen as a routine identical torb_const_get, except it doesn’t look for parent classes. - rb_
const_ ⚠get_ from - Identical to
rb_const_defined_at, except it returns the actual defined value. It can also be seen as a routine identical torb_const_get, except it doesn’t return a private constant. - rb_
const_ ⚠list - This is another mysterious API that comes with no documents at all. It seems it expects some specific data structure for the passed pointer. But the details has never been made explicit. It seems nobody should use this API.
- rb_
const_ ⚠remove - Identical to
rb_mod_remove_const, except it takes the name as ::ID instead of ::VALUE. - rb_
const_ ⚠set - Names a constant.
- rb_
convert_ ⚠type - Converts an object into another type. Calls the specified conversion method if necessary.
- rb_
copy_ ⚠generic_ ivar - Copies the list of instance variables. 3rd parties need not know, but there
are several ways to store an object’s instance variables, depending on its
internal structure. This function makes sense when either of the passed
objects are using so-called “generic” backend storage. This distinction is
purely an implementation detail of [
rb_clone_setup]. People need not be aware of this working behind-the-scenes. - rb_
cstr2inum ⚠ - Identical to
rb_cstr_to_inum, except the second argument controls the base and badcheck at once. It basically doesn’t raise for parse errors, unless the base is zero. - rb_
cstr_ ⚠to_ dbl - Converts a textual representation of a real number into a numeric, which is the nearest value that the return type can represent, of the value that the argument represents. This is in fact a 2-in-1 function whose behaviour can be controlled using the second (mode) argument. If the mode is zero, this function is in “historical” mode which only understands “floating-constant” defined at ISO/IEC 9899:1990 section 6.1.3.1. If the mode is nonzero, it is in “extended” mode, which also accepts “hexadecimal-floating-constant” defined at ISO/IEC 9899:2018 section 6.4.4.2.
- rb_
cstr_ ⚠to_ inum - Parses C’s string to convert into a Ruby’s integer. It understands prefixes
(e.g.
0x) and underscores. - rb_
current_ ⚠receiver - This resembles ruby’s
self. - rb_
cv_ ⚠get - Identical to
rb_cvar_get, except it accepts C’s string instead of ::ID. - rb_
cv_ ⚠set - Identical to
rb_cvar_set, except it accepts C’s string instead of ::ID. - rb_
cvar_ ⚠defined - Queries if the given class has the given class variable.
- rb_
cvar_ ⚠find - Identical to
rb_cvar_get, except it takes additional “front” pointer. This extra parameter is a buffer, which will have the class where the queried class variable actually resides. - rb_
cvar_ ⚠get - Obtains a value from a class variable.
- rb_
cvar_ ⚠set - Assigns a value to a class variable.
- rb_
data_ ⚠object_ wrap - This is the primitive way to wrap an existing C struct into ::RData.
- rb_
data_ ⚠object_ zalloc - Identical to
rb_data_object_wrap, except it allocates a new data region internally instead of taking an existing one. The allocation is done using ruby_calloc(). Hence it makes no sense to pass anything other than ::RUBY_DEFAULT_FREE to the last argument. - rb_
data_ ⚠typed_ object_ wrap - This is the primitive way to wrap an existing C struct into ::RTypedData.
- rb_
data_ ⚠typed_ object_ zalloc - Identical to
rb_data_typed_object_wrap, except it allocates a new data region internally instead of taking an existing one. The allocation is done using ruby_calloc(). Hence it makes no sense fortype->function.dfreeto be anything other than ::RUBY_TYPED_DEFAULT_FREE. - rb_
dbl2big ⚠ - Converts a C’s
doubleinto a bignum. - rb_
dbl_ ⚠cmp - Compares two
doubles. Handy when implementing a spaceship operator. - rb_
dbl_ ⚠complex_ new - Identical to
rb_complex_new, except it takes the arguments as C’s double instead of Ruby’s object. - rb_
debug_ ⚠inspector_ backtrace_ locations - Queries the backtrace object of the context. This is as if you call
caller_locationsat the point of debugger. - rb_
debug_ ⚠inspector_ current_ depth - Return current frmae depth.
- rb_
debug_ ⚠inspector_ frame_ binding_ get - Queries the binding of the passed context’s upper frame.
- rb_
debug_ ⚠inspector_ frame_ class_ get - Queries the current class of the passed context’s upper frame.
- rb_
debug_ ⚠inspector_ frame_ depth - Queries the depth of the passed context’s upper frame.
- rb_
debug_ ⚠inspector_ frame_ iseq_ get - Queries the instruction sequence of the passed context’s upper frame.
- rb_
debug_ ⚠inspector_ frame_ self_ get - Queries the current receiver of the passed context’s upper frame.
- rb_
debug_ ⚠inspector_ open - Prepares, executes, then cleans up a debug session.
- rb_
debug_ ⚠rstring_ null_ ptr
- rb_
default_ ⚠external_ encoding - Queries the “default external” encoding. This is used to interact with
outer-process things such as File. Though not recommended, you can set this
using
rb_enc_set_default_external. - rb_
default_ ⚠internal_ encoding - Queries the “default internal” encoding. This could be a null pointer. Otherwise, outer-process info are transcoded from default external encoding to this one during reading from an IO.
- rb_
define_ ⚠alias - Defines an alias of a method.
- rb_
define_ ⚠alloc_ func - Sets the allocator function of a class.
- rb_
define_ ⚠attr - Defines public accessor method(s) for an attribute.
- rb_
define_ ⚠class - Defines a top-level class.
- rb_
define_ ⚠class_ id - This is a very badly designed API that creates an anonymous class.
- rb_
define_ ⚠class_ id_ under - Identical to
rb_define_class_under, except it takes the name in ::ID instead of C’s string. - rb_
define_ ⚠class_ under - Defines a class under the namespace of
outer. - rb_
define_ ⚠class_ variable - @alias{
rb_cv_set} - rb_
define_ ⚠const - Defines a Ruby level constant under a namespace.
- rb_
define_ ⚠dummy_ encoding - Creates a new “dummy” encoding. Roughly speaking, an encoding is dummy when it is stateful. Notable example of dummy encoding are those defined in ISO/IEC 2022
- rb_
define_ ⚠finalizer - Assigns a finaliser for an object. Each objects can have objects (typically blocks) that run immediately after that object dies. They are called finalisers of an object. This function associates a finaliser object with a target object.
- rb_
define_ ⚠global_ const - Identical to
rb_define_const, except it defines that of “global”, i.e. toplevel constant. - rb_
define_ ⚠global_ function - Defines a global function.
- rb_
define_ ⚠hooked_ variable - Identical to
rb_define_virtual_variable, but can also specify a storage. A programmer can use the storage for e.g. memoisation, storing intermediate computation result, etc. - rb_
define_ ⚠method - Defines a method.
- rb_
define_ ⚠method_ id - Identical to
rb_define_method, except it takes the name of the method in ::ID instead of C’s string. - rb_
define_ ⚠module - Defines a top-level module.
- rb_
define_ ⚠module_ function - Defines a module function for a module.
- rb_
define_ ⚠module_ id - This is a very badly designed API that creates an anonymous module.
- rb_
define_ ⚠module_ id_ under - Identical to
rb_define_module_under, except it takes the name in ::ID instead of C’s string. - rb_
define_ ⚠module_ under - Defines a module under the namespace of
outer. - rb_
define_ ⚠private_ method - Identical to
rb_define_method, except it defines a private method. - rb_
define_ ⚠protected_ method - Identical to
rb_define_method, except it defines a protected method. - rb_
define_ ⚠readonly_ variable - Identical to
rb_define_variable, except it does not allow Ruby programs to assign values to such global variable. C codes can still set values at will. This could be handy for you when implementing anerrno-like experience, where a method updates a read-only global variable as a side- effect. - rb_
define_ ⚠singleton_ method - Identical to
rb_define_method, except it defines a singleton method. - rb_
define_ ⚠variable - “Shares” a global variable between Ruby and C. Normally a Ruby-level global variable is stored somewhere deep inside of the interpreter’s execution context, but this way you can explicitly specify its storage.
- rb_
define_ ⚠virtual_ variable - Defines a global variable that is purely function-backended. By using this API a programmer can define a global variable that dynamically changes from time to time.
- rb_
deprecate_ ⚠constant - Asserts that the given constant is deprecated. Attempt to refer such constant will produce a warning.
- rb_
detach_ ⚠process - “Detaches” a subprocess. In POSIX systems every child processes that a
process creates must be
wait(2)-ed. A child process that died yet has not been waited so far is called a “zombie”, which more or less consumes resources. This function automates reclamation of such processes. Once after this function successfully returns you can basically forget about the child process. - rb_
dir_ ⚠getwd - Queries the path of the current working directory of the current process.
- rb_
during_ ⚠gc - Queries if the GC is busy.
- rb_each⚠
- This is a shorthand of calling
obj.each. - rb_
econv_ ⚠append - Converts the passed C’s pointer according to the passed converter, then append the conversion result to the passed Ruby’s string. This way buffer overflow is properly avoided to resize the destination properly.
- rb_
econv_ ⚠asciicompat_ encoding - Queries the passed encoding’s corresponding ASCII compatible encoding. “The corresponding ASCII compatible encoding” in this context is an ASCII compatible encoding which can represent exactly the same character sets as the given ASCII incompatible encoding. For instance that of UTF-16LE is UTF-8.
- rb_
econv_ ⚠binmode - This badly named function does not set the destination encoding to binary, but instead just nullifies newline conversion decorators if any. Other ordinal character conversions still happen after this; something non-binary would still be generated.
- rb_
econv_ ⚠check_ error - This is a
rb_econv_make_exception+rb_exc_raisecombo. - rb_
econv_ ⚠close - Destructs a converter. Note that a converter can have a buffer, and can be non-empty. Calling this would lose your data then.
- rb_
econv_ ⚠convert - Converts a string from an encoding to another.
- rb_
econv_ ⚠decorate_ at_ first - “Decorate“s a converter. There are special kind of converters that transforms the contents, like replacing CR into CRLF. You can add such decorators to a converter using this API. By using this function a decorator is prepended at the beginning of a conversion sequence: in case of CRLF conversion, newlines are converted before encodings are converted.
- rb_
econv_ ⚠decorate_ at_ last - Identical to
rb_econv_decorate_at_first, except it adds to the opposite direction. For instance CRLF conversion would run after encodings are converted. - rb_
econv_ ⚠encoding_ to_ insert_ output - Queries an encoding name which best suits for
rb_econv_insert_output’s last parameter. Strings in this encoding need no conversion when inserted; can be both time/space efficient. - rb_
econv_ ⚠has_ convpath_ p - Queries if there is more than one way to convert between the passed two
encodings. Encoding conversion are has_and_belongs_to_many relationships.
There could be no direct conversion defined for the passed pair. Ruby tries
to find an indirect way to do so then. For instance ISO-8859-1 has no
direct conversion to ISO-2022-JP. But there is ISO-8859-1 to UTF-8
conversion; then there is UTF-8 to EUC-JP conversion; finally there also is
EUC-JP to ISO-2022-JP conversion. So in short ISO-8859-1 can be converted
to ISO-2022-JP using that path. This function returns true. Obviously not
everything that can be represented using UTF-8 can also be represented using
EUC-JP. Conversions in practice can fail depending on the actual input, and
that renders exceptions in case of
rb_str_encode. - rb_
econv_ ⚠insert_ output - Appends the passed string to the passed converter’s output buffer. This can be handy when an encoding needs bytes out of thin air; for instance ISO-2022-JP has “shift function” which does not correspond to any characters.
- rb_
econv_ ⚠make_ exception - This function makes sense right after
rb_econv_convertreturns. As listed in ::rb_econv_result_t,rb_econv_convertcan bail out for various reasons. This function checks the passed converter’s internal state and convert it to an appropriate exception object. - rb_
econv_ ⚠open - Creates a new instance of struct ::
rb_econv_t. - rb_
econv_ ⚠open_ exc - Creates a
[rb_eConverterNotFoundError]exception object (but does not raise). - rb_
econv_ ⚠open_ opts - Identical to
rb_econv_open, except it additionally takes a hash of optional strings. - rb_
econv_ ⚠prepare_ options - Identical to
rb_econv_prepare_opts, except it additionally takes the initial value of flags. The extra bits are bitwise-ORed to the return value. - rb_
econv_ ⚠prepare_ opts - Splits a keyword arguments hash (that for instance
String#encodetook) into a set of enum ::ruby_econv_flag_type and a hash storing replacement characters etc. - rb_
econv_ ⚠putback - Puts back the bytes. In case of ::econv_invalid_byte_sequence, some of those invalid bytes are discarded and the others are buffered to be converted later. The latter bytes can be put back using this API.
- rb_
econv_ ⚠putbackable - Queries if
rb_econv_putbackmakes sense, i.e. there are invalid byte sequences remain in the buffer. - rb_
econv_ ⚠set_ replacement - Assigns the replacement string. The string passed here would appear in converted string when it cannot represent its source counterpart. This can happen for instance you convert an emoji to ISO-8859-1.
- rb_
econv_ ⚠str_ append - Identical to
rb_econv_str_convert, except it appends the conversion result to the additionally passed string instead of creating a new string. It can also be seen as a routine identical torb_econv_append, except it takes a Ruby’s string instead of C’s pointer. - rb_
econv_ ⚠str_ convert - Identical to
rb_econv_convert, except it takes Ruby’s string instead of C’s pointer. - rb_
econv_ ⚠substr_ append - Identical to
rb_econv_str_append, except it appends only a part of the passed string with conversion. It can also be seen as a routine identical torb_econv_substr_convert, except it appends the conversion result to the additionally passed string instead of creating a new string. - rb_
econv_ ⚠substr_ convert - Identical to
rb_econv_str_convert, except it converts only a part of the passed string. Can be handy when you for instance want to do line-buffered conversion. - rb_
enc_ ⚠alias - Registers an “alias” name. In the wild, an encoding can be called using
multiple names. For instance an encoding known as
"CP932"is also called"SJIS"on occasions. This API registers such relationships. - rb_
enc_ ⚠ascget - Queries the code point of character pointed by the passed pointer. If that code point is included in ASCII that code point is returned. Otherwise -1. This can be different from just looking at the first byte. For instance it reads 2 bytes in case of UTF-16BE.
- rb_
enc_ ⚠associate - Identical to
rb_enc_associate_index, except it takes an encoding itself instead of its index. - rb_
enc_ ⚠associate_ index - Identical to
rb_enc_set_index, except it additionally does contents fix-up depending on the passed object. It for instance changes the byte length of terminatingU+0000according to the passed encoding. - rb_
enc_ ⚠capable - Queries if the passed object can have its encoding.
- rb_
enc_ ⚠check - Identical to
rb_enc_compatible, except it raises an exception instead of returning NULL. - rb_
enc_ ⚠codelen - Queries the number of bytes requested to represent the passed code point using the passed encoding.
- rb_
enc_ ⚠codepoint_ len - Queries the code point of character pointed by the passed pointer. Exceptions happen in case of broken input.
- rb_
enc_ ⚠compatible - Look for the “common” encoding between the two. One character can or cannot be expressed depending on an encoding. This function finds the super-set of encodings that satisfy contents of both arguments. If that is impossible returns NULL.
- rb_
enc_ ⚠copy - Destructively copies the encoding of the latter object to that of former
one. It can also be seen as a routine identical to
rb_enc_associate_index, except it takes an object’s encoding instead of an encoding’s index. - rb_
enc_ ⚠default_ external - Identical to
rb_default_external_encoding, except it returns the Ruby-level counterpart instance of ::rb_cEncodingthat corresponds to the default external encoding. - rb_
enc_ ⚠default_ internal - Identical to
rb_default_internal_encoding, except it returns the Ruby-level counterpart instance of ::rb_cEncodingthat corresponds to the default internal encoding. - rb_
enc_ ⚠dummy_ p - Queries if the passed encoding is dummy.
- rb_
enc_ ⚠fast_ mbclen - Identical to
rb_enc_mbclenunless the character atpoverrunse. That can happen for instance when you read from a socket and its partial read cuts a wide character in-between. In those situations this function “estimates” theoretical length of the character in question. Typically it tends to be possible to know how many bytes a character needs before actually reaching its end; for instance UTF-8 encodes a character’s length in the first byte of it. This function returns that info. - rb_
enc_ ⚠find - Identical to
rb_find_encoding, except it takes a C’s string instead of Ruby’s. - rb_
enc_ ⚠find_ index - Queries the index of the encoding.
- rb_
enc_ ⚠from_ encoding - Queries the Ruby-level counterpart instance of ::
rb_cEncodingthat corresponds to the passed encoding. - rb_
enc_ ⚠from_ index - Identical to
rb_find_encoding, except it takes an encoding index instead of a Ruby object. - rb_
enc_ ⚠get - Identical to
rb_enc_get_index, except the return type. - rb_
enc_ ⚠get_ index - Queries the index of the encoding of the passed object, if any.
- rb_
enc_ ⚠interned_ str - Identical to
rb_enc_str_new, except it returns a “f“string. It can also be seen as a routine identical torb_interned_str, except it additionally takes an encoding. - rb_
enc_ ⚠interned_ str_ cstr - Identical to
rb_enc_str_new_cstr, except it returns a “f“string. It can also be seen as a routine identical torb_interned_str_cstr, except it additionally takes an encoding. - rb_
enc_ ⚠mbclen - Queries the number of bytes of the character at the passed pointer.
- rb_
enc_ ⚠nth - Queries the n-th character. Like
rb_enc_strlenthis function can be fast or slow depending on the contents. Don’t expect characters to be uniformly distributed across the entire string. - rb_
enc_ ⚠path_ end - This just returns the passed end basically. It makes difference in case the passed string ends with tons of path separators like the following:
- rb_
enc_ ⚠path_ last_ separator - Returns the last path component.
- rb_
enc_ ⚠path_ next - Returns a path component directly adjacent to the passed pointer.
- rb_
enc_ ⚠path_ skip_ prefix - Seeks for non-prefix part of a pathname. This can be a no-op when the OS has no such concept like a path prefix. But there are OSes where path prefixes do exist.
- rb_
enc_ ⚠precise_ mbclen - Queries the number of bytes of the character at the passed pointer. This function returns 3 different types of information:
- rb_
enc_ ⚠raise - Identical to
rb_raise, except it additionally takes an encoding. - rb_
enc_ ⚠reg_ new - Identical to
rb_reg_new, except it additionally takes an encoding. - rb_
enc_ ⚠replicate - Creates a new encoding, using the passed one as a template.
- rb_
enc_ ⚠set_ default_ external - Destructively assigns the passed encoding as the default external encoding. You should not use this API. It has process-global side effects. Also it doesn’t change encodings of strings that have already been read.
- rb_
enc_ ⚠set_ default_ internal - Destructively assigns the passed encoding as the default internal encoding. You should not use this API. It has process-global side effects. Also it doesn’t change encodings of strings that have already been read.
- rb_
enc_ ⚠set_ index - Destructively assigns an encoding (via its index) to an object.
- rb_
enc_ ⚠sprintf - Identical to
rb_sprintf, except it additionally takes an encoding. The passed encoding rules both the incoming format specifier and the resulting string. - rb_
enc_ ⚠str_ asciionly_ p - Queries if the passed string is “ASCII only”. An ASCII only string is a string who doesn’t have any non-ASCII characters at all. This doesn’t necessarily mean the string is in ASCII encoding. For instance a String of CP932 encoding can quite much be ASCII only, depending on its contents.
- rb_
enc_ ⚠str_ buf_ cat - Identical to
rb_str_cat, except it additionally takes an encoding. - rb_
enc_ ⚠str_ coderange - Scans the passed string to collect its code range. Because a Ruby’s string is mutable, its contents change from time to time; so does its code range. A long-lived string tends to fall back to ::RUBY_ENC_CODERANGE_UNKNOWN. This API scans it and re-assigns a fine-grained code range constant.
- rb_
enc_ ⚠str_ new - Identical to
rb_enc_str_new, except it additionally takes an encoding. - rb_
enc_ ⚠str_ new_ cstr - Identical to
rb_enc_str_new, except it assumes the passed pointer is a pointer to a C string. It can also be seen as a routine identical torb_str_new_cstr, except it additionally takes an encoding. - rb_
enc_ ⚠str_ new_ static - Identical to
rb_enc_str_new, except it takes a C string literal. It can also be seen as a routine identical torb_str_new_static, except it additionally takes an encoding. - rb_
enc_ ⚠strlen - Counts the number of characters of the passed string, according to the passed encoding. This has to be complicated. The passed string could be invalid and/or broken. This routine would scan from the beginning til the end, byte by byte, to seek out character boundaries. Could be super slow.
- rb_
enc_ ⚠symname2_ p - Identical to
rb_enc_symname_p, except it additionally takes the passed string’s length. This is needed for strings containing NUL bytes, like in case of UTF-32. - rb_
enc_ ⚠symname_ p - Identical to
rb_symname_p, except it additionally takes an encoding. - rb_
enc_ ⚠to_ index - Queries the index of the encoding. An encoding’s index is a Ruby-local concept. It is a (sequential) number assigned to each encoding.
- rb_
enc_ ⚠tolower - Identical to [
rb_tolower], except it additionally takes an encoding. - rb_
enc_ ⚠toupper - Identical to [
rb_toupper], except it additionally takes an encoding. - rb_
enc_ ⚠uint_ chr - Encodes the passed code point into a series of bytes.
- rb_
enc_ ⚠unicode_ p - Queries if the passed encoding is either one of UTF-8/16/32.
- rb_
enc_ ⚠vsprintf - Identical to
rb_enc_sprintf, except it takes ava_listinstead of variadic arguments. It can also be seen as a routine identical torb_vsprintf, except it additionally takes an encoding. - rb_
ensure ⚠ - An equivalent to
ensureclause. Calls the functionb_procwithdata1as the argument, then callse_procwithdata2when execution terminated. - rb_
enum_ ⚠values_ pack - Basically identical to [
rb_ary_new_form_values], except it returns something different whenargc< 2. - rb_
enumeratorize ⚠ - Constructs an enumerator. This roughly resembles
Object#enum_for. - rb_
enumeratorize_ ⚠with_ size - Identical to
rb_enumeratorize, except you can additionally specify the size function of return value. - rb_
enumeratorize_ ⚠with_ size_ kw - Identical to [
rb_enumeratorize_with_func], except you can specify how to handle the last element of the given array. - rb_
env_ ⚠clear - Destructively removes every environment variables of the running process.
- rb_
eof_ ⚠error - Utility function to raise ::
rb_eEOFError. - rb_eql⚠
- Checks for equality of the passed objects, in terms of
Object#eql?. - rb_
equal ⚠ - This function is an optimised version of calling
#==. It checks equality between two objects by first doing a fast identity check using using C’s==(same asBasicObject#equal?). If that check fails, it calls#==dynamically. This optimisation actually affects semantics, because when#==returns false for the same object obj,[rb_equal]obj, obj)would still return true. This happens forFloat::NAN, whereFloat::NAN == Float::NANisfalse, but[rb_equal]Float::NAN, Float::NAN)istrue. - rb_
errinfo ⚠ - This is the same as
$!in Ruby. - rb_
error_ ⚠arity
- rb_
error_ ⚠frozen - Identical to
rb_frozen_error_raise, except its raising exception has a message like “can’t modify frozen /what/”. - rb_
error_ ⚠frozen_ object - Identical to
rb_error_frozen, except it takes arbitrary Ruby object instead of C’s string. - rb_
eval_ ⚠cmd_ kw - This API is practically a variant of
rb_proc_call_kwnow. Historically when there still was a concept called$SAFE, this was an API for that. But we no longer have that. This function basically ended its role. It just remains here because of no harm. - rb_
eval_ ⚠string - Evaluates the given string.
- rb_
eval_ ⚠string_ protect - Identical to
rb_eval_string, except it avoids potential global escapes. Such global escapes include exceptions,throw,break, for example. - rb_
eval_ ⚠string_ wrap - Identical to
rb_eval_string_protect, except it evaluates the given string under a module binding in an isolated binding. This is the same as a binding for loaded libraries on[rb_load]something, true). - rb_
exc_ ⚠fatal - Identical to
rb_fatal, except it raises the passed exception instance as- is instead of creating new one. - rb_
exc_ ⚠new - Creates an instance of the passed exception class.
- rb_
exc_ ⚠new_ cstr - Identical to
rb_exc_new, except it assumes the passed pointer is a pointer to a C string. - rb_
exc_ ⚠new_ str - Identical to
rb_exc_new_cstr, except it takes a Ruby’s string instead of C’s. - rb_
exc_ ⚠raise - Identical to
rb_raise, except it raises the passed exception instance as- is instead of creating new one. - rb_
exec_ ⚠recursive - “Recursion” API entry point. This basically calls the given function with
the given arguments, but additionally with recursion flag. The flag is set
to 1 if the execution have already experienced the passed
gparameter before. - rb_
exec_ ⚠recursive_ outer - Identical to
rb_exec_recursive, except it callsffor outermost recursion only. Inner recursions yield calls torb_throw_obj. - rb_
exec_ ⚠recursive_ paired - Identical to
rb_exec_recursive, except it checks for the recursion on the ordered pair of{ g, p }instead of justg. - rb_
exec_ ⚠recursive_ paired_ outer - Identical to
rb_exec_recursive_outer, except it checks for the recursion on the ordered pair of{ g, p }instead of justg. It can also be seen as a routine identical torb_exec_recursive_paired, except it callsffor outermost recursion only. Inner recursions yield calls torb_throw_obj. - rb_exit⚠
- Terminates the current execution context. This API is the entry point of a
“well-mannered” termination sequence. When called from an extension
library, it raises ::
rb_eSystemExitexception. Programs could rescue that exception. Can cancel process exit then. Otherwise, that exception results in a process termination with the status passed to this function. - rb_
ext_ ⚠ractor_ safe - Asserts that the extension library that calls this function is aware of
Ractor. Multiple Ractors run without protecting each other. This doesn’t
interface well with C programs, unless designed with an in-depth
understanding of how Ractors work. Extension libraries are shut out from
Ractors by default. This API is to bypass that restriction. Once after it
was called, successive calls to
rb_define_methodetc. become definitions of methods that are aware of Ractors. The amendment would be in effect until the end ofrb_require_stringetc. - rb_
extend_ ⚠object - Extend the object with the module.
- rb_
external_ ⚠str_ new - Identical to
rb_str_new, except it generates a string of “default external” encoding. - rb_
external_ ⚠str_ new_ cstr - Identical to
rb_external_str_new, except it assumes the passed pointer is a pointer to a C string. It can also be seen as a routine identical torb_str_new_cstr, except it generates a string of “default external” encoding. - rb_
external_ ⚠str_ new_ with_ enc - Identical to
rb_external_str_new, except it additionally takes an encoding. However the whole point ofrb_external_str_newis to encode a string into default external encoding. Being able to specify arbitrary encoding just ruins the designed purpose the function meseems. - rb_
extract_ ⚠keywords - Splits a hash into two.
- rb_
f_ ⚠abort - This is similar to
rb_f_exit. In fact on some situation it internally callsrb_exit. But can be very esoteric on occasions. - rb_
f_ ⚠exec - Replaces the current process by running the given external command. This is
the implementation of
Kernel#exec. - rb_
f_ ⚠exit - Identical to
rb_exit, except how arguments are passed. - rb_
f_ ⚠global_ variables - Queries the list of global variables.
- rb_
f_ ⚠kill - Sends a signal (“kills”) to processes.
- rb_
f_ ⚠notimplement - Raises ::
rb_eNotImpError. This function is used as an argument torb_define_methodetc. - rb_
f_ ⚠require - Identical to
rb_require_string, except it ignores the first argument for no reason. There seems to be no reason for 3rd party extension libraries to use it. - rb_
f_ ⚠sprintf - Identical to
rb_str_format, except how the arguments are arranged. - rb_
f_ ⚠trace_ var - Traces a global variable.
- rb_
f_ ⚠untrace_ var - Deletes the passed tracer from the passed global variable, or if omitted, deletes everything.
- rb_
fatal ⚠ - Raises the unsung “fatal” exception. This is considered severe. Nobody can rescue the exception. Once raised, process termination is inevitable. However ensure clauses still run, so that resources are properly cleaned up.
- rb_
fd_ ⚠clr - Releases a specific FD from the given fdset.
- rb_
fd_ ⚠copy - Destructively overwrites an fdset with another.
- rb_
fd_ ⚠dup - Identical to
rb_fd_copy, except it copies unlimited number of file descriptors. - rb_
fd_ ⚠fix_ cloexec - Sets or clears the close-on-exec flag of the passed file descriptor to the
desired state. STDIN, STDOUT, STDERR are the exceptional file descriptors
that shall remain open. All others are to be closed on exec. When a C
extension library opens a file descriptor using anything other than
rb_cloexec_openetc., that file descriptor shall experience this function. - rb_
fd_ ⚠init - (Re-)initialises a fdset. One must be initialised before other
[rb_fd_]*operations. Analogous to callingmalloc(3)to allocate anfd_set. - rb_
fd_ ⚠isset - Queries if the given FD is in the given set.
- rb_
fd_ ⚠select - Waits for multiple file descriptors at once.
- rb_
fd_ ⚠set - Sets an fd to a fdset.
- rb_
fd_ ⚠term - Destroys the ::
rb_fdset_t, releasing any memory and resources it used. It must be reinitialised usingrb_fd_initbefore future use. Analogous to callingfree(3)to release memory for anfd_set. - rb_
fd_ ⚠zero - Wipes out the current set of FDs.
- rb_
fdopen ⚠ - Identical to
rb_io_stdio_file, except it takes file descriptors instead of Ruby’s IO. It can also be seen as a compatibility layer to wrapfdopen(3). Nowadays all supporting systems, including Windows, havefdopen. Why not use them. - rb_
feature_ ⚠provided - Identical to
rb_provided, except it additionally returns the “canonical” name of the loaded feature. This can be handy when for instance you want to know the actually loaded library is eitherfoo.rborfoo.so. - rb_
fiber_ ⚠alive_ p - Queries the liveness of the passed fiber. “Alive” in this context means that the fiber can still be resumed. Once it reaches is its end of execution, this function returns ::RUBY_Qfalse.
- rb_
fiber_ ⚠current - Queries the fiber which is calling this function. Any ruby execution context has its fiber, either explicitly or implicitly.
- rb_
fiber_ ⚠new - Creates a Fiber instance from a C-backended block.
- rb_
fiber_ ⚠new_ storage - Creates a Fiber instance from a C-backended block with the specified storage.
- rb_
fiber_ ⚠raise - Identical to
rb_fiber_resumebut instead of resuming normal execution of the passed fiber, it raises the given exception in it. From inside of the fiber this would be seen as ifrb_fiber_yieldraised. - rb_
fiber_ ⚠resume - Resumes the execution of the passed fiber, either from the point at which
the last
rb_fiber_yieldwas called if any, or at the beginning of the fiber body if it is the first call to this function. - rb_
fiber_ ⚠resume_ kw - Identical to
rb_fiber_resume, except you can specify how to handle the last element of the given array. - rb_
fiber_ ⚠scheduler_ address_ resolve - Non-blocking DNS lookup.
- rb_
fiber_ ⚠scheduler_ block - Non-blocking wait for the passed “blocker”, which is for instance
Thread.joinorMutex.lock. Depending on scheduler implementation, this for instance switches to another fiber etc. - rb_
fiber_ ⚠scheduler_ close - Closes the passed scheduler object. This expects the scheduler to wait for all fibers. Thus the scheduler’s main loop tends to start here.
- rb_
fiber_ ⚠scheduler_ current - Identical to
rb_fiber_scheduler_get, except it also returns ::RUBY_Qnil in case of a blocking fiber. As blocking fibers do not participate schedulers’ scheduling this function can be handy. - rb_
fiber_ ⚠scheduler_ current_ for_ thread - Identical to
rb_fiber_scheduler_current, except it queries for that of the passed thread instead of the implicit current one. - rb_
fiber_ ⚠scheduler_ fiber - Create and schedule a non-blocking fiber.
- rb_
fiber_ ⚠scheduler_ get - Queries the current scheduler of the current thread that is calling this function.
- rb_
fiber_ ⚠scheduler_ io_ close - Non-blocking close the given IO.
- rb_
fiber_ ⚠scheduler_ io_ pread - Non-blocking read from the passed IO at the specified offset.
- rb_
fiber_ ⚠scheduler_ io_ pwrite - Non-blocking write to the passed IO at the specified offset.
- rb_
fiber_ ⚠scheduler_ io_ read - Non-blocking read from the passed IO.
- rb_
fiber_ ⚠scheduler_ io_ read_ memory - Non-blocking read from the passed IO using a native buffer.
- rb_
fiber_ ⚠scheduler_ io_ select - Non-blocking version of
IO.select. - rb_
fiber_ ⚠scheduler_ io_ selectv - Non-blocking version of
IO.select,argvvariant. - rb_
fiber_ ⚠scheduler_ io_ wait - Non-blocking version of
rb_io_wait. Depending on scheduler implementation, this for instance switches to another fiber etc. - rb_
fiber_ ⚠scheduler_ io_ wait_ readable - Non-blocking wait until the passed IO is ready for reading. This is a
special case of
rb_fiber_scheduler_io_wait, where the interest isIO::READABLEand timeout is never. - rb_
fiber_ ⚠scheduler_ io_ wait_ writable - Non-blocking wait until the passed IO is ready for writing. This is a
special case of
rb_fiber_scheduler_io_wait, where the interest isIO::WRITABLEand timeout is never. - rb_
fiber_ ⚠scheduler_ io_ write - Non-blocking write to the passed IO.
- rb_
fiber_ ⚠scheduler_ io_ write_ memory - Non-blocking write to the passed IO using a native buffer.
- rb_
fiber_ ⚠scheduler_ kernel_ sleep - Non-blocking
sleep. Depending on scheduler implementation, this for instance switches to another fiber etc. - rb_
fiber_ ⚠scheduler_ kernel_ sleepv - Identical to
rb_fiber_scheduler_kernel_sleep, except it can pass multiple arguments. - rb_
fiber_ ⚠scheduler_ make_ timeout - Converts the passed timeout to an expression that
rb_fiber_scheduler_blocketc. expects. - rb_
fiber_ ⚠scheduler_ process_ wait - Non-blocking
waitpid. Depending on scheduler implementation, this for instance switches to another fiber etc. - rb_
fiber_ ⚠scheduler_ set - Destructively assigns the passed scheduler to that of the current thread
that is calling this function. If the scheduler is set, non-blocking fibers
(created by
Fiber.newwithblocking: false, or byFiber.schedule) call that scheduler’s hook methods on potentially blocking operations, and the current thread will call scheduler’s#closemethod on finalisation (allowing the scheduler to properly manage all non-finished fibers).schedulercan be an object of any class corresponding toFiber::SchedulerInterface. Its implementation is up to the user. - rb_
fiber_ ⚠scheduler_ unblock - Wakes up a fiber previously blocked using
rb_fiber_scheduler_block. - rb_
fiber_ ⚠transfer - Transfers control to another fiber, resuming it from where it last stopped
or starting it if it was not resumed before. The calling fiber will be
suspended much like in a call to
rb_fiber_yield. - rb_
fiber_ ⚠transfer_ kw - Identical to
rb_fiber_transfer, except you can specify how to handle the last element of the given array. - rb_
fiber_ ⚠yield - Yields the control back to the point where the current fiber was resumed.
The passed objects would be the return value of
rb_fiber_resume. This fiber then suspends its execution until next time it is resumed. - rb_
fiber_ ⚠yield_ kw - Identical to
rb_fiber_yield, except you can specify how to handle the last element of the given array. - rb_
file_ ⚠absolute_ path - Maps a relative path to its absolute representation. Relative paths are referenced from the passed directory name, or from the process’ current working directory in case ::RUBY_Qnil is passed.
- rb_
file_ ⚠directory_ p - Queries if the given path is either a directory, or a symlink that (potentially recursively) points to such thing.
- rb_
file_ ⚠dirname - Strips a file path’s last component (and trailing separators if any). This
function is relatively simple on POSIX environments; just splits the input
with
/, strips the last one, if something remains joins them again, otherwise the return value is".". However when it comes to Windows this function is quite very much complicated. We have to take UNC etc. into account. So for instance"C:foo"’s dirname is"C:.". - rb_
file_ ⚠expand_ path - Identical to
rb_file_absolute_path, except it additionally understands~. If a given pathname starts with~someone/, that part expands to the user’s home directory (or that of current process’ owner’s in case of~/). - rb_
file_ ⚠open - Opens a file located at the given path.
- rb_
file_ ⚠open_ str - Identical to
rb_file_open, except it takes the pathname as a Ruby’s string instead of C’s. In case the passed Ruby object is a non-String it tries to call#to_path. - rb_
file_ ⚠s_ absolute_ path - Identical to
rb_file_absolute_path, except how arguments are passed. - rb_
file_ ⚠s_ expand_ path - Identical to
rb_file_expand_path, except how arguments are passed. - rb_
file_ ⚠size - Queries the file size of the given file. Because this function calls
fstat(2)internally, it is a failure to pass a closed file to this function. - rb_
filesystem_ ⚠encindex - Identical to
rb_filesystem_encoding, except it returns the encoding’s index instead of the encoding itself. - rb_
filesystem_ ⚠encoding - Queries the “filesystem” encoding. This is the encoding that ruby expects
info from the OS’ file system are in. This affects for instance return
value of
rb_dir_getwd. Most notably on Windows it can be an alias of OS codepage. Most notably on Linux users can set this via default external encoding. - rb_
filesystem_ ⚠str_ new - Identical to
rb_str_new, except it generates a string of “filesystem” encoding. It can also be seen as a routine identical torb_external_str_new, except it generates a string of “filesystem” encoding instead of “default external” encoding. - rb_
filesystem_ ⚠str_ new_ cstr - Identical to
rb_filesystem_str_new, except it assumes the passed pointer is a pointer to a C string. It can also be seen as a routine identical torb_external_str_new_cstr, except it generates a string of “filesystem” encoding instead of “default external”. - rb_
find_ ⚠encoding - Identical to
rb_to_encoding_index, except the return type. - rb_
find_ ⚠file - Identical to
rb_find_file_ext, except it takes a feature name and is extension at once, e.g."json.rb". This difference is much like howrequireandloadare different. - rb_
find_ ⚠file_ ext - Resolves a feature’s path. This function takes for instance
"json"and[".so", ".rb"], and iterates over the$LOAD_PATHto see if there is eitherjson.soorjson.rbin the directory. - rb_
fix2int ⚠ - Identical to
rb_num2int. - rb_
fix2short ⚠ - Identical to
rb_num2short. - rb_
fix2str ⚠ - Generates a place-value representation of the given Fixnum, with given radix.
- rb_
fix2uint ⚠ - Identical to
rb_num2uint. - rb_
fix2ushort ⚠ - Identical to
rb_num2ushort. - rb_
float_ ⚠new - Converts a C’s
doubleinto an instance of ::rb_cFloat. - rb_
float_ ⚠new_ in_ heap - Identical to
rb_float_new, except it does not generate Flonums. - rb_
float_ ⚠value - Extracts its double value from an instance of ::
rb_cFloat. - rb_
flt_ ⚠rationalize - Identical to
rb_flt_rationalize_with_prec, except it auto-detects appropriate precision depending on the passed value. - rb_
flt_ ⚠rationalize_ with_ prec - Simplified approximation of a float. It returns a rational
ratwhich satisfies: - rb_
frame_ ⚠callee - Identical to
rb_frame_this_func, except it returns the named used to call the method. - rb_
frame_ ⚠method_ id_ and_ class - Resembles
__method__. - rb_
frame_ ⚠this_ func - Queries the name of the Ruby level method that is calling this function. The “name” in this context is the one assigned to the function for the first time (note that methods can have multiple names via aliases).
- rb_
free_ ⚠generic_ ivar - Frees the list of instance variables. 3rd parties need not know, but there are several ways to store an object’s instance variables, depending on its internal structure. This function makes sense when the passed objects is using so-called “generic” backend storage. People need not be aware of this working behind-the-scenes.
- rb_
free_ ⚠tmp_ buffer
- rb_
freeze_ ⚠singleton_ class - This is an implementation detail of #RB_OBJ_FREEZE(). People don’t use it directly.
- rb_
frozen_ ⚠error_ raise - Raises an instance of ::
rb_eFrozenError. The object can be obtained later usingFrozenError#receiverof the raising exception. - rb_
funcall ⚠ - Calls a method. Can call both public and private methods.
- rb_
funcall_ ⚠passing_ block - Identical to
rb_funcallv_public, except you can pass the passed block. - rb_
funcall_ ⚠passing_ block_ kw - Identical to [
rb_funcallv_passing_block], except you can specify how to handle the last element of the given array. It can also be seen as a routine identical torb_funcallv_public_kw, except you can pass the passed block. - rb_
funcall_ ⚠with_ block - Identical to
rb_funcallv_public, except you can pass a block. A block here basically is an instance of ::rb_cProc. If you want to exerciseto_procconversion, do so before passing it here. However nil and symbols are special-case allowed. - rb_
funcall_ ⚠with_ block_ kw - Identical to [
rb_funcallv_with_block], except you can specify how to handle the last element of the given array. It can also be seen as a routine identical torb_funcallv_public_kw, except you can pass a block. - rb_
funcallv ⚠ - Identical to
rb_funcall, except it takes the method arguments as a C array. - rb_
funcallv_ ⚠kw - Identical to
rb_funcallv, except you can specify how to handle the last element of the given array. - rb_
funcallv_ ⚠public - Identical to
rb_funcallv, except it only takes public methods into account. This is roughly Ruby’sObject#public_send. - rb_
funcallv_ ⚠public_ kw - Identical to
rb_funcallv_public, except you can specify how to handle the last element of the given array. It can also be seen as a routine identical torb_funcallv_kw, except it only takes public methods into account. - rb_gc⚠
- Triggers a GC process. This was the only GC entry point that we had at the beginning. Over time our GC evolved. Now what this function does is just a very simplified variation of the entire GC algorithms. A series of procedures kicked by this API is called a “full” GC.
- rb_
gc_ ⚠adjust_ memory_ usage - Informs that there are external memory usages. Our GC runs when we are
running out of memory. The amount of memory, however, can increase/decrease
behind-the-scene. For instance DLLs can allocate memories using
mmap(2)etc, which are opaque to us. Registering such external allocations using this function enables proper detection of how much memories an object used as a whole. That will trigger GCs more often than it would otherwise. You can also pass negative numbers here, to indicate that such external allocations are gone. - rb_
gc_ ⚠copy_ finalizer - Copy&paste an object’s finaliser to another. This is one of the GC utility
functions that you can call when you design your own
initialize_copy,initialize_dup,initialize_clone. - rb_
gc_ ⚠count - Identical to
rb_gc_stat, with “count” parameter. - rb_
gc_ ⚠disable - Disables GC. This prevents automatic GC runs when the process is running
out of memory. Such situations shall result in
rb_memerror. However this does not prevent users from manually invokingrb_gc. That should work. People abused this by disabling GC at the beginning of an event loop, process events without GC overheads, then manually force reclaiming garbage at the bottom of the loop. However because our GC is now much smarter than just callingrb_gc, this technique is proven to be sub-optimal these days. It is believed that there is currently practically no needs of this function. - rb_
gc_ ⚠enable - (Re-) enables GC. This makes sense only after you called
rb_gc_disable. - rb_
gc_ ⚠force_ recycle Deprecated - Asserts that the passed object is no longer needed. Such objects are reclaimed sooner or later so this function is not mandatory. But sometimes you can know from your application knowledge that an object is surely dead at some point. Calling this as a hint can be a polite way.
- rb_
gc_ ⚠latest_ gc_ info - Obtains various info regarding the most recent GC run. This includes for instance the reason of the GC. The parameter can be either a Symbol or a Hash. If a Hash is passed, it is filled with everything currently available. If a Symbol is passed just that portion is returned.
- rb_
gc_ ⚠location - Finds a new “location” of an object. An object can be moved on compaction.
This function projects its new abode, or just returns the passed object if
not moved. This is one of the GC utility functions that you can call when
you design your own ::
rb_data_type_struct::dcompact. - rb_
gc_ ⚠mark - Marks an object. This is one of the GC utility functions that you can call
when you design your own ::
rb_data_type_struct::dmark. - rb_
gc_ ⚠mark_ locations - Marks objects between the two pointers. This is one of the GC utility
functions that you can call when you design your own
::
rb_data_type_struct::dmark. - rb_
gc_ ⚠mark_ maybe - Identical to
rb_gc_mark, except it allows the passed value be a non-object. For instance pointers to different type of memory regions are allowed here. Such values are silently ignored. This is one of the GC utility functions that you can call when you design your own ::rb_data_type_struct::dmark. - rb_
gc_ ⚠mark_ movable - Maybe this is the only function provided for C extensions to control the
pinning of objects, so let us describe it in detail. These days Ruby’s GC
is copying. As far as an object’s physical address is guaranteed unused, it
can move around the object space. Our GC engine rearranges these objects
after it reclaims unreachable objects from our object space, so that the
space is compact (improves memory locality). This is called the
“compaction” phase, and works well most of the time… as far as there are
no C extensions. C extensions complicate the scenario because Ruby core
cannot detect any use of the physical address of an object inside of C
functions. In order to prevent memory corruptions, objects observable from
C extensions are “pinned”; they stick to where they are born until they die,
just in case any C extensions touch their raw pointers. This variant of
scheme is called “Mostly-Copying” garbage collector. Authors of C
extensions, however, can extremely carefully write them to become
compaction-aware. To do so avoid referring to a Ruby object from inside of
your struct in the first place. But if that is not possible, use this
function from your ::
rb_data_type_struct::dmark then. This way objects marked using it are considered movable. If you chose this way you have to manually fix up locations of such moved pointers usingrb_gc_location. - rb_
gc_ ⚠register_ address - Inform the garbage collector that
valptrpoints to a live Ruby object that should not be moved. Note that extensions should use this API on global constants instead of assuming constants defined in Ruby are always alive. Ruby code can remove global constants. - rb_
gc_ ⚠register_ mark_ object - Inform the garbage collector that
objectis a live Ruby object that should not be moved. - rb_
gc_ ⚠start - Identical to
rb_gc, except the return value. - rb_
gc_ ⚠stat - Obtains various GC related profiles. The parameter can be either a Symbol or a Hash. If a Hash is passed, it is filled with everything currently available. If a Symbol is passed just that portion is returned.
- rb_
gc_ ⚠unregister_ address - Inform the garbage collector that a pointer previously passed to
[rb_gc_register_address]no longer points to a live Ruby object. - rb_
gc_ ⚠update_ tbl_ refs - Updates references inside of tables. After you marked values using
rb_mark_tbl_no_pin, the objects inside of the table could of course be moved. This function is to fixup those references. You can call this from your ::rb_data_type_struct::dcompact. - rb_
gc_ ⚠writebarrier - This is the implementation of #RB_OBJ_WRITE(). People don’t use it directly.
- rb_
gc_ ⚠writebarrier_ unprotect - This is the implementation of #RB_OBJ_WB_UNPROTECT(). People don’t use it directly.
- rb_
genrand_ ⚠int32 - Generates a 32 bit random number.
- rb_
genrand_ ⚠real - Generates a
doublerandom number. - rb_
genrand_ ⚠ulong_ limited - Generates a random number whose upper limit is
i. - rb_
get_ ⚠alloc_ func - Queries the allocator function of a class.
- rb_
get_ ⚠argv - Queries the arguments passed to the current process that you can access from
Ruby as
ARGV. - rb_
get_ ⚠kwargs - Keyword argument deconstructor.
- rb_
get_ ⚠path - Converts an object to a path. It first tries
#to_pathmethod if any, then falls back to#to_strmethod. - rb_
get_ ⚠path_ no_ checksafe Deprecated - @deprecated This function is an alias of
rb_get_pathnow. The part that did “no_checksafe” was deleted. It remains here because of no harm. - rb_
get_ ⚠values_ at - This was a generalisation of
Array#values_at,Struct#values_at, andMatchData#values_at. It begun its life as a refactoring effort. However as Ruby evolves over time, as of writing none of aforementioned methods share their implementations at all. This function is not deprecated; still works as it has been. But it is now kind of like a rudimentum. - rb_gets⚠
- Much like
rb_io_gets, but it reads from the mysterious ARGF object. ARGF in this context can be seen as a virtual IO which concatenates contents of the files passed to the process via the ARGV, or just STDIN if there are no such files. - rb_glob⚠
- The “glob” operator. Expands the given pattern against the actual local filesystem, then iterates over the expanded filenames by calling the callback function.
- rb_
global_ ⚠variable - An alias for
[rb_gc_register_address]. - rb_
gv_ ⚠get - Obtains a global variable.
- rb_
gv_ ⚠set - Assigns to a global variable.
- rb_
gvar_ ⚠readonly_ setter - This function just raises ::
rb_eNameError. Handy when you want to prohibit a global variable from being squashed by someone. - rb_
gvar_ ⚠undef_ getter Deprecated - @deprecated
- rb_
gvar_ ⚠undef_ marker Deprecated - @deprecated
- rb_
gvar_ ⚠undef_ setter Deprecated - @deprecated
- rb_
gvar_ ⚠val_ getter - This is the getter function that backs global variables defined from a ruby script. Extension libraries can use this if its global variable needs no custom logic.
- rb_
gvar_ ⚠val_ marker - This is the setter function that backs global variables defined from a ruby script. Extension libraries can use this if its global variable needs no custom logic.
- rb_
gvar_ ⚠val_ setter - This is the setter function that backs global variables defined from a ruby script. Extension libraries can use this if its global variable needs no custom logic.
- rb_
gvar_ ⚠var_ getter Deprecated - @deprecated
- rb_
gvar_ ⚠var_ marker Deprecated - @deprecated
- rb_
gvar_ ⚠var_ setter Deprecated - @deprecated
- rb_hash⚠
- Calculates a message authentication code of the passed object. The return
value is a very small integer used as an index of a key of a table. In
order to calculate the value this function calls
#hashmethod of the passed object. Ruby provides you a default implementation. But if you implement your class in C, that default implementation cannot know the underlying data structure. You must implement your own#hashmethod then, which must return an integer of uniform distribution in a sufficiently instant manner. - rb_
hash_ ⚠aref - Queries the given key in the given hash table. If there is the key in the hash, returns the value associated with the key. Otherwise it returns the “default” value (defined per hash table).
- rb_
hash_ ⚠aset - Inserts or replaces (“upsert“s) the objects into the given hash table. This basically associates the given value with the given key. On duplicate key this function updates its associated value with the given one. Otherwise it inserts the association at the end of the table.
- rb_
hash_ ⚠bulk_ insert - Inserts a list of key-value pairs into a hash table at once. It is
semantically identical to repeatedly calling
rb_hash_aset, but can be faster than that. - rb_
hash_ ⚠bulk_ insert_ into_ st_ table
- rb_
hash_ ⚠clear - Swipes everything out of the passed hash table.
- rb_
hash_ ⚠delete - Deletes the passed key from the passed hash table, if any.
- rb_
hash_ ⚠delete_ if - Deletes each entry for which the block returns a truthy value. If there is no block given, it returns an enumerator that does the thing.
- rb_
hash_ ⚠dup - Duplicates a hash.
- rb_
hash_ ⚠fetch - Identical to
rb_hash_lookup, except it yields the (implicitly) passed block instead of returning ::RUBY_Qnil. - rb_
hash_ ⚠foreach - Iterates over a hash. This basically does the same thing as
rb_st_foreach. But because the passed hash is a Ruby object, its keys and values are both Ruby objects. - rb_
hash_ ⚠freeze - @alias{
rb_obj_freeze} - rb_
hash_ ⚠lookup - Identical to
rb_hash_aref, except it always returns ::RUBY_Qnil for misshits. - rb_
hash_ ⚠lookup2 - Identical to
rb_hash_lookup, except you can specify what to return on misshits. This is much like 2-arguments version ofHash#fetch. - rb_
hash_ ⚠new - Creates a new, empty hash object.
- rb_
hash_ ⚠new_ capa - Identical to
rb_hash_new, except it additionally specifies how many keys it is expected to contain. This way you can create a hash that is large enough for your need. For large hashes it means it won’t need to be reallocated and rehashed as much, improving performance. - rb_
hash_ ⚠set_ ifnone - This is the implementation detail of #RHASH_SET_IFNONE. People don’t call this directly.
- rb_
hash_ ⚠size - Identical to #RHASH_SIZE(), except it returns the size in Ruby’s integer instead of C’s.
- rb_
hash_ ⚠size_ num - This is the implementation detail of #RHASH_SIZE. People don’t call this directly.
- rb_
hash_ ⚠start - Starts a series of hashing. Suppose you have a struct:
- rb_
hash_ ⚠tbl - This is the implementation detail of #RHASH_TBL. People don’t call this directly.
- rb_
hash_ ⚠update_ by - Destructively merges two hash tables into one. It resolves key conflicts by calling the passed function and take its return value.
- rb_
id2name ⚠ - Retrieves the name mapped to the given id.
- rb_
id2str ⚠ - Identical to
rb_id2name, except it returns a Ruby’s String instead of C’s. - rb_
id2sym ⚠ - Allocates an instance of ::
rb_cSymbolthat has the given id. - rb_
id_ ⚠attrset - Calculates an ID of attribute writer. For instance it returns
:foo=when passed:foo. - rb_
include_ ⚠module - Includes a module to a class.
- rb_
inspect ⚠ - Generates a human-readable textual representation of the given object. This
is largely similar to Ruby level
Object#inspectbut not the same; it additionally escapes the inspection result so that the string be compatible with that of default internal (or default external, if absent). - rb_
int2big ⚠ - Converts a C’s
intptr_tinto an instance of ::rb_cInteger. - rb_
int2inum ⚠ - Converts a C’s
intptr_tinto an instance of ::rb_cInteger. - rb_
int_ ⚠pair_ to_ real - Generates a 64 bit floating point number by concatenating two 32bit unsigned integers.
- rb_
int_ ⚠positive_ pow - Raises the passed
xto the power ofy. - rb_
integer_ ⚠pack - Exports an integer into a buffer. This function fills the buffer specified
by
wordsandnumwordsasvalin the format specified bywordsize,nailsandflags. - rb_
integer_ ⚠unpack - Import an integer from a buffer.
- rb_
intern ⚠ - Finds or creates a symbol of the given name.
- rb_
intern2 ⚠ - Identical to
rb_intern, except it additionally takes the length of the string. This way you can have a symbol that contains NUL characters. - rb_
intern3 ⚠ - Identical to
rb_intern2, except it additionally takes an encoding. - rb_
intern_ ⚠str - Identical to
rb_intern, except it takes an instance of ::rb_cString. - rb_
internal_ ⚠thread_ add_ event_ hook - Registers a thread event hook function.
- rb_
internal_ ⚠thread_ remove_ event_ hook - Unregister the passed hook.
- rb_
interned_ ⚠str - Identical to
rb_str_new, except it returns an infamous “f“string. What is a fstring? Well it is a special subkind of strings that is immutable, deduped globally, and managed by our GC. It is much like a Symbol (in fact Symbols are dynamic these days and are backended using fstrings). This concept has been silently introduced at some point in 2.x era. Since then it gained wider acceptance in the core. Starting from 3.x extension libraries can also generate ones. - rb_
interned_ ⚠str_ cstr - Identical to
rb_interned_str, except it assumes the passed pointer is a pointer to a C’s string. It can also be seen as a routine identical to torb_str_to_interned_str, except it takes a C’s string instead of Ruby’s. Or it can also be seen as a routine identical torb_str_new_cstr, except it returns an infamous “f“string. - rb_
interrupt ⚠ - Raises an instance of ::
rb_eInterrupt. - rb_
invalid_ ⚠str - Honestly I don’t understand the name, but it raises an instance of
::
rb_eArgError. - rb_
io_ ⚠addstr - Identical to
rb_io_write, except it always returns the passed IO. - rb_
io_ ⚠ascii8bit_ binmode - Forces no conversions be applied to the passed IO. Unlike
rb_io_binmode, this cancels any newline conversions as well as encoding conversions. Any texts read/written through the IO will be the verbatim binary contents. - rb_
io_ ⚠binmode - Sets the binmode. This operation nullifies the effect of textmode (newline
conversion from
"\r\n"to"\n"or vice versa). Note that it doesn’t stop character encodings conversions. For instance an IO created using: - rb_
io_ ⚠buffer_ clear
- rb_
io_ ⚠buffer_ free
- rb_
io_ ⚠buffer_ get_ bytes
- rb_
io_ ⚠buffer_ get_ bytes_ for_ reading
- rb_
io_ ⚠buffer_ get_ bytes_ for_ writing
- rb_
io_ ⚠buffer_ lock
- rb_
io_ ⚠buffer_ map
- rb_
io_ ⚠buffer_ new
- rb_
io_ ⚠buffer_ pread
- rb_
io_ ⚠buffer_ pwrite
- rb_
io_ ⚠buffer_ read
- rb_
io_ ⚠buffer_ resize
- rb_
io_ ⚠buffer_ transfer
- rb_
io_ ⚠buffer_ try_ unlock
- rb_
io_ ⚠buffer_ unlock
- rb_
io_ ⚠buffer_ write
- rb_
io_ ⚠bufwrite - Buffered write to the passed IO.
- rb_
io_ ⚠check_ byte_ readable - Asserts that an IO is opened for byte-based reading. Byte-based and character-based reading operations cannot be mixed at a time.
- rb_
io_ ⚠check_ char_ readable - Asserts that an IO is opened for character-based reading. A character can be wider than a byte. Because of this we have to buffer reads from descriptors. This fiction checks if that is possible.
- rb_
io_ ⚠check_ closed - This badly named function asserts that the passed IO is open.
- rb_
io_ ⚠check_ initialized - Asserts that the passed IO is initialised.
- rb_
io_ ⚠check_ io - Try converting an object to its IO representation using its
to_iomethod, if any. If there is no such thing, returns ::RUBY_Qnil. - rb_
io_ ⚠check_ readable - @alias{
rb_io_check_byte_readable} - rb_
io_ ⚠check_ writable - Asserts that an IO is opened for writing.
- rb_
io_ ⚠close - Closes the IO. Any buffered contents are flushed to the operating system.
Any future operations against the IO would raise ::
rb_eIOError. In case the io was created usingIO.popen, it also sets the$?. - rb_
io_ ⚠descriptor - Returns an integer representing the numeric file descriptor for io.
- rb_
io_ ⚠eof - Queries if the passed IO is at the end of file. “The end of file” here mans that there are no more data to read. This function blocks until the read buffer is filled in, and if that operation reached the end of file, it still returns ::RUBY_Qfalse (because there are data yet in that buffer). It returns ::RUBY_Qtrue once after the buffer is cleared.
- rb_
io_ ⚠extract_ encoding_ option - This function breaks down the option hash that
IO#initializetakes into components. This is an implementation detail ofrb_io_extract_modeenctoday. People prefer that API instead. - rb_
io_ ⚠extract_ modeenc - This function can be seen as an extended version of
rb_io_extract_encoding_optionthat not only concerns the option hash but also mode string and so on. This should be mixed withrb_scan_argslike: - rb_
io_ ⚠fdopen - Creates an IO instance whose backend is the given file descriptor. C extension libraries sometimes have file descriptors created elsewhere (maybe deep inside of another shared library), which they want ruby programs to handle. This function is handy for such situations.
- rb_
io_ ⚠flush - Flushes any buffered data within the passed IO to the underlying operating system.
- rb_
io_ ⚠fptr_ finalize - Destroys the given IO. Any pending operations are flushed.
- rb_
io_ ⚠get_ io - Identical to
rb_io_check_io, except it raises exceptions on conversion failures. - rb_
io_ ⚠get_ write_ io - Queries the tied IO for writing. An IO can be duplexed. Fine. The thing is, that characteristics could sometimes be achieved by the underlying operating system (for instance a socket’s duplexity is by nature) but sometimes by us. Notable example is a bidirectional pipe. Suppose you have:
- rb_
io_ ⚠getbyte - Reads a byte from the given IO.
- rb_
io_ ⚠gets - Reads a “line” from the given IO. A line here means a chunk of characters
which is terminated by either
"\n"or an EOF. - rb_
io_ ⚠make_ open_ file
- rb_
io_ ⚠maybe_ wait - Identical to
rb_io_waitexcept it additionally takes previous errno. If the passed errno indicates for instanceEINTR, this function returns immediately. This is expected to be called in a loop. - rb_
io_ ⚠maybe_ wait_ readable - Blocks until the passed IO is ready for reading, if that makes sense for the
passed errno. This is a special case of
rb_io_maybe_waitthat only concerns for reading. - rb_
io_ ⚠maybe_ wait_ writable - Blocks until the passed IO is ready for writing, if that makes sense for the
passed errno. This is a special case of
rb_io_maybe_waitthat only concernsfor writing. - rb_
io_ ⚠modestr_ fmode - Maps a file mode string (that
rb_file_opentakes) into a mixture ofFMODE_flags. This for instance returnsFMODE_WRITABLE | FMODE_TRUNC | FMODE_CREATE | FMODE_EXCLfor"wx". - rb_
io_ ⚠modestr_ oflags - Identical to
rb_io_modestr_fmode, except it returns a mixture ofO_flags. This for instance returnsO_WRONLY | O_TRUNC | O_CREAT | O_EXCLfor"wx". - rb_
io_ ⚠oflags_ fmode - Converts an oflags (that
rb_io_modestr_oflagsreturns) to a fmode (that [rb_io_mode_flags] returns). This is a purely functional operation. - rb_
io_ ⚠print - Iterates over the passed array to apply
rb_io_writeindividually. If there is$,, this function inserts the string in middle of each iterations. If there is$\, this function appends the string at the end. If the array is empty, this function outputs$_. - rb_
io_ ⚠printf - This is a
rb_f_sprintf+rb_io_writecombo. - rb_
io_ ⚠puts - Iterates over the passed array to apply
rb_io_writeindividually. Unlikerb_io_print, this function prints a newline per each element. It also flattens the passed array (OTOHrb_io_printjust resorts torb_ary_to_s. - rb_
io_ ⚠read_ check - Blocks until there is a pending read in the passed IO. If there already is it just returns.
- rb_
io_ ⚠read_ pending - Queries if the passed IO has any pending reads. Unlike
rb_io_read_checkthis doesn’t block; has no side effects. - rb_
io_ ⚠set_ nonblock - Instructs the OS to put its internal file structure into “nonblocking mode”.
This is an in-Kernel concept. Reading from/writing to that file using C
function calls would return -1 with errno set. However when it comes to a
ruby program, we hide that error behind our
IO#readmethod. Ruby levelIO#readblocks regardless of this flag. If you want to avoid blocking, you should consider using methods likeIO#readpartial. - rb_
io_ ⚠set_ timeout - Set the timeout associated with the specified io object. This timeout is used as a best effort timeout to prevent operations from blocking forever.
- rb_
io_ ⚠set_ write_ io - Assigns the tied IO for writing. See
rb_io_get_write_iofor what a “tied IO for writing” is. - rb_
io_ ⚠stdio_ file - Finds or creates a stdio’s file structure from a Ruby’s one. This can be
handy if you want to call an external API that accepts
FILE *. - rb_
io_ ⚠synchronized - Sets #FMODE_SYNC.
- rb_
io_ ⚠taint_ check Deprecated - @deprecated This function once was a thing in the old days, but makes no sense any longer today. Exists here for backwards compatibility only. You can safely forget about it.
- rb_
io_ ⚠timeout - Get the timeout associated with the specified io object.
- rb_
io_ ⚠ungetbyte - Identical to
rb_io_ungetc, except it doesn’t take the encoding of the passed IO into account. When an integer is passed, it just casts that value to C’sunsigned char, and pushes that back. - rb_
io_ ⚠ungetc - “Unget“s a string. This function pushes back the passed string onto the passed IO, such that a subsequent buffered read will return it. If the passed content is in fact an integer, a single character string of that codepoint of the encoding of the IO will be pushed back instead.
- rb_
io_ ⚠wait - Blocks until the passed IO is ready for the passed events. The “events”
here is a Ruby level integer, which is an OR-ed value of
IO::READABLE,IO::WRITable, andIO::PRIORITY. - rb_
io_ ⚠wait_ readable Deprecated - Blocks until the passed file descriptor gets readable.
- rb_
io_ ⚠wait_ writable Deprecated - Blocks until the passed file descriptor gets writable.
- rb_
io_ ⚠write - Writes the given string to the given IO.
- rb_
is_ ⚠absolute_ path - Queries if the given path is an absolute path. On POSIX environments it is
as easy as
path[0] == '/'. However on Windows, drive letters and UNC paths are also taken into account. - rb_
is_ ⚠attrset_ id - Classifies the given ID, then sees if it is an attribute writer. An
attribute writer is otherwise a local variable, except it ends with
=. - rb_
is_ ⚠class_ id - Classifies the given ID, then sees if it is a class variable. A class
variable is must start with
@@. - rb_
is_ ⚠const_ id - Classifies the given ID, then sees if it is a constant. In case an ID is in Unicode (likely), its “constant”-ness is determined if its first character is either upper case or title case. Otherwise it is detected if case- folding the first character changes its case or not.
- rb_
is_ ⚠global_ id - Classifies the given ID, then sees if it is a global variable. A global
variable must start with
$. - rb_
is_ ⚠instance_ id - Classifies the given ID, then sees if it is an instance variable. An
instance variable must start with
@, but not@@. - rb_
is_ ⚠junk_ id - Classifies the given ID, then sees if it is a junk ID. An ID with no special syntactic structure is considered junk. This category includes for instance punctuation.
- rb_
is_ ⚠local_ id - Classifies the given ID, then sees if it is a local variable. A local
variable starts with a lowercase character, followed by some alphanumeric
characters or
_, then ends with anything other than!,?, or=. - rb_
iter_ ⚠break - Breaks from a block. Because you are using a CAPI this is not as intuitive
as it sounds. In order for this function to properly work, make a
::
rb_block_call_func_tfunction that calls it internally, and pass that function torb_block_call. - rb_
iter_ ⚠break_ value - Identical to
rb_iter_break, except it additionally takes the “value” of this breakage. It will be the evaluation result of the iterator. This is kind of complicated; you cannot see this as a “return from a block” behaviour. Take a look at this example: - rb_
iterate ⚠Deprecated - Old way to iterate a block.
- rb_
iv_ ⚠get - Obtains an instance variable.
- rb_
iv_ ⚠set - Assigns to an instance variable.
- rb_
ivar_ ⚠count - Number of instance variables defined on an object.
- rb_
ivar_ ⚠defined - Queries if the instance variable is defined at the object. This roughly
resembles
defined?(@name)inobj’s context. - rb_
ivar_ ⚠foreach - Iterates over an object’s instance variables.
- rb_
ivar_ ⚠get - Identical to
rb_iv_get, except it accepts the name as an ::ID instead of a C string. - rb_
ivar_ ⚠set - Identical to
rb_iv_set, except it accepts the name as an ::ID instead of a C string. - rb_
jump_ ⚠tag - This function is to re-throw global escapes. Such global escapes include
exceptions,
throw,break, for example. - rb_
keyword_ ⚠given_ p - Determines if the current method is given a keyword argument.
- rb_
last_ ⚠status_ get - Queries the “last status”, or the
$?. - rb_
last_ ⚠status_ set - Sets the “last status”, or the
$?. - rb_
lastline_ ⚠get - Queries the last line, or the
$_. You don’t have to use it, because in reality you can get$_usingrb_gv_getas usual. - rb_
lastline_ ⚠set - Updates
$_. You don’t have to use it, because in reality you can set$_usingrb_gv_setas usual. - rb_
ll2inum ⚠ - Converts a C’s
long longinto an instance of ::rb_cInteger. - rb_load⚠
- Loads and executes the Ruby program in the given file.
- rb_
load_ ⚠file - Loads the given file. This function opens the given pathname for reading, parses the contents as a Ruby script, and returns an opaque “node” pointer. You can then pass it to ruby_run_node() for evaluation.
- rb_
load_ ⚠file_ str - Identical to
rb_load_file, except it takes the argument as a Ruby’s string instead of C’s. - rb_
load_ ⚠protect - Identical to
rb_load, except it avoids potential global escapes. Such global escapes include exceptions,throw,break, for example. - rb_
loaderror ⚠ - Raises an instance of ::
rb_eLoadError. - rb_
loaderror_ ⚠with_ path - Identical to
rb_loaderror, except it additionally takes which file is unable to load. The path can be obtained later usingLoadError#pathof the raising exception. - rb_
locale_ ⚠charmap - Returns a platform-depended “charmap” of the current locale. This
information is called a “Codeset name” in IEEE 1003.1 section 13
(
<langinfo.h>). This is a very low-level API. The return value can have no corresponding encoding when passed torb_find_encoding. - rb_
locale_ ⚠encindex - Identical to
rb_locale_encoding, except it returns the encoding’s index instead of the encoding itself. - rb_
locale_ ⚠encoding - Queries the encoding that represents the current locale.
- rb_
locale_ ⚠str_ new - Identical to
rb_str_new, except it generates a string of “locale” encoding. It can also be seen as a routine identical torb_external_str_new, except it generates a string of “locale” encoding instead of “default external” encoding. - rb_
locale_ ⚠str_ new_ cstr - Identical to
rb_locale_str_new, except it assumes the passed pointer is a pointer to a C string. It can also be seen as a routine identical torb_external_str_new_cstr, except it generates a string of “locale” encoding instead of “default external”. - rb_
make_ ⚠backtrace - Creates the good old fashioned array-of-strings style backtrace info.
- rb_
make_ ⚠exception - Constructs an exception object from the list of arguments, in a manner
similar to Ruby’s
raise. This function can take: - rb_
mark_ ⚠hash - Marks keys and values associated inside of the given table. This is one of
the GC utility functions that you can call when you design your own
::
rb_data_type_struct::dmark. - rb_
mark_ ⚠set - Identical to
rb_mark_hash, except it marks only keys of the table and leave their associated values unmarked. This is one of the GC utility functions that you can call when you design your own ::rb_data_type_struct::dmark. - rb_
mark_ ⚠tbl - Identical to
rb_mark_hash, except it marks only values of the table and leave their associated keys unmarked. This is one of the GC utility functions that you can call when you design your own ::rb_data_type_struct::dmark. - rb_
mark_ ⚠tbl_ no_ pin - Identical to
rb_mark_tbl, except it marks objects usingrb_gc_mark_movable. This is one of the GC utility functions that you can call when you design your own ::rb_data_type_struct::dmark. - rb_
marshal_ ⚠define_ compat - Marshal format compatibility layer. Over time, classes evolve, so that
their internal data structure change drastically. For instance an instance
of ::
rb_cRangewas made of ::RUBY_T_OBJECT in 1.x., but in 3.x it is a ::RUBY_T_STRUCT now. In order to keep binary compatibility, we “fake” the marshalled representation to stick to old types. This is the API to enable that manoeuvre. Here is how: - rb_
marshal_ ⚠dump - Serialises the given object and all its referring objects, to write them down to the passed port.
- rb_
marshal_ ⚠load - Deserialises a previous output of
rb_marshal_dumpinto a network of objects. - rb_
match_ ⚠busy - Asserts that the given MatchData is “occupied”. MatchData shares its backend storages with its Regexp object. But programs can destructively tamper its contents. Calling this function beforehand shall prevent such modifications to spill over into other objects.
- rb_
mem_ ⚠clear - Fills the memory region with a series of ::RUBY_Qnil.
- rb_
memcicmp ⚠ - Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something different.
- rb_
memerror ⚠ - Triggers out-of-memory error. If possible it raises ::
rb_eNoMemError. But because we are running out of memory that is not always doable. This function tries hard to show something, but ultimately can die silently. - rb_
memhash ⚠ - This is a universal hash function.
- rb_
memory_ ⚠id - Identical to
rb_obj_id, except it hesitates from allocating a new instance of ::rb_cInteger.rb_obj_idcould allocate ::RUBY_T_BIGNUM objects. That allocation might perhaps impact negatively. On such situations, this function instead returns one-shot temporary small integers that need no allocations at all. The values are guaranteed unique at the moment, but no future promise is made; could be reused. Use of this API should be very instant. It is a failure to store the returned integer to somewhere else. - rb_
memory_ ⚠view_ available_ p - Return
trueifobjsupports to export a MemoryView. Returnfalseotherwise. - rb_
memory_ ⚠view_ extract_ item_ members - Return a value that consists of item members.
- rb_
memory_ ⚠view_ fill_ contiguous_ strides - Fill the
stridesarray with byte-Strides of a contiguous array of the given shape with the given element size. - rb_
memory_ ⚠view_ get - If the given
objsupports to export a MemoryView that conforms the givenflags, this function fillsviewby the information of the MemoryView and returnstrue. In this case, the reference count ofobjis increased. - rb_
memory_ ⚠view_ get_ item - Return a value that consists of item members in the given memory view.
- rb_
memory_ ⚠view_ get_ item_ pointer - Calculate the location of the item indicated by the given
indices. - rb_
memory_ ⚠view_ init_ as_ byte_ array - Fill the members of
viewas an 1-dimensional byte array. - rb_
memory_ ⚠view_ is_ column_ major_ contiguous - Return
trueif the data in the MemoryViewviewis column-major contiguous. - rb_
memory_ ⚠view_ is_ row_ major_ contiguous - Return
trueif the data in the MemoryViewviewis row-major contiguous. - rb_
memory_ ⚠view_ item_ size_ from_ format - Calculate the number of bytes occupied by an element.
- rb_
memory_ ⚠view_ parse_ item_ format - Deconstructs the passed format string, as describe in
::
rb_memory_view_t::format. - rb_
memory_ ⚠view_ prepare_ item_ desc - Fill the
item_descmember ofview. - rb_
memory_ ⚠view_ register - Associates the passed class with the passed memory view entry. This has to be called before actually creating a memory view from an instance.
- rb_
memory_ ⚠view_ release - Release the given MemoryView
viewand decrement the reference count ofmemory_view->obj. - rb_
memsearch ⚠ - Looks for the passed string in the passed buffer.
- rb_
method_ ⚠basic_ definition_ p - Well… Let us hesitate from describing what a “basic definition” is. This nuanced concept should have been kept private. Just please. Don’t touch it. This function is a badly distributed random number generator. Right?
- rb_
method_ ⚠boundp - Queries if the klass has this method. This function has only one line of document in the implementation that states “// deprecated”. Don’t know what that means though.
- rb_
method_ ⚠call - Evaluates the passed method with the passed arguments.
- rb_
method_ ⚠call_ kw - Identical to
rb_method_call, except you can specify how to handle the last element of the given array. - rb_
method_ ⚠call_ with_ block - Identical to
rb_proc_call, except you can additionally pass a proc as a block. - rb_
method_ ⚠call_ with_ block_ kw - Identical to
rb_method_call_with_block, except you can specify how to handle the last element of the given array. It can also be seen as a routine identical torb_method_call_kw, except you can additionally pass another proc object as a block. - rb_
mod_ ⚠ancestors - Queries the module’s ancestors. This routine gathers classes and modules that the passed module either inherits, includes, or prepends, then recursively applies that routine again and again to the collected entries until the list doesn’t grow up.
- rb_
mod_ ⚠class_ variables - Resembles
Module#class_variables. List up the variables defined at the receiver. This includes the names of constants in any included modules, unlessargv[0]is ::RUBY_Qfalse. - rb_
mod_ ⚠const_ at - This API is mysterious. It has been there since the initial revision. No single bits of documents has ever been written. The function name doesn’t describe anything. What should be passed to the argument, or what should be the return value, are not obvious. Yet it has evolved over time. The source code is written in counter-intuitive way (as of 3.0).
- rb_
mod_ ⚠const_ of - This is a variant of
rb_mod_const_at. As a result, it is also mysterious. It seems it iterates over the ancestry tree of the module. But what that means is beyond a human brain. - rb_
mod_ ⚠constants - Resembles
Module#constants. List up the constants defined at the receiver. This includes the names of constants in any included modules, unlessargv[0]is ::RUBY_Qfalse. - rb_
mod_ ⚠include_ p - Queries if the passed module is included by the module. It can also be seen
as a routine to first call
rb_mod_included_modules, then see if the return value contains the passed module. - rb_
mod_ ⚠included_ modules - Queries the list of included modules. It can also be seen as a routine to
first call
rb_mod_ancestors, then rejects non-modules from the return value. - rb_
mod_ ⚠init_ copy - The comment that comes with this function says
:nodoc:. Not sure what that means though. - rb_
mod_ ⚠method_ arity - Queries the number of mandatory arguments of the method defined in the given
module. If it is declared to take no arguments, returns
0. If it takes exactlynarguments, returnsn. If it has optional arguments, returns-n-1, wherenis the number of mandatory arguments. Keyword arguments will be considered as a single additional argument, that argument being mandatory if any keyword argument is mandatory. - rb_
mod_ ⚠module_ eval - Identical to
rb_obj_instance_eval, except it evaluates within the context of module. - rb_
mod_ ⚠module_ exec - Identical to
rb_obj_instance_exec, except it evaluates within the context of module. - rb_
mod_ ⚠name - Queries the name of a module.
- rb_
mod_ ⚠remove_ const - Resembles
Module#remove_const. - rb_
mod_ ⚠remove_ cvar - Resembles
Module#remove_class_variable. - rb_
mod_ ⚠sys_ fail - Identical to
rb_sys_fail, except it takes additional module to extend the exception object before raising. - rb_
mod_ ⚠sys_ fail_ str - Identical to
rb_mod_sys_fail, except it takes the message in Ruby’s String instead of C’s. - rb_
mod_ ⚠syserr_ fail - Identical to
rb_mod_sys_fail, except it does not depend on C global variable errno. Pass it explicitly. - rb_
mod_ ⚠syserr_ fail_ str - Identical to
rb_mod_syserr_fail, except it takes the message in Ruby’s String instead of C’s. - rb_
module_ ⚠new - Creates a new, anonymous module.
- rb_
must_ ⚠asciicompat - Asserts that the given string’s encoding is (Ruby’s definition of) ASCII compatible.
- rb_
mutex_ ⚠lock - Attempts to lock the mutex. It waits until the mutex gets available.
- rb_
mutex_ ⚠locked_ p - Queries if there are any threads that holds the lock.
- rb_
mutex_ ⚠new - Creates a mutex.
- rb_
mutex_ ⚠sleep - Releases the lock held in the mutex and waits for the period of time; reacquires the lock on wakeup.
- rb_
mutex_ ⚠synchronize - Obtains the lock, runs the passed function, and releases the lock when it completes.
- rb_
mutex_ ⚠trylock - Attempts to lock the mutex, without waiting for other threads to unlock it. Failure in locking the mutex can be detected by the return value.
- rb_
mutex_ ⚠unlock - Releases the mutex.
- rb_
name_ ⚠error - Raises an instance of ::
rb_eNameError. The name can be obtained later usingNameError#nameof the raising exception. - rb_
name_ ⚠error_ str - Identical to
rb_name_error, except it takes a ::VALUE instead of ::ID. - rb_
need_ ⚠block - Declares that the current method needs a block.
- rb_
newobj ⚠ - This is the implementation detail of #RB_NEWOBJ.
- rb_
newobj_ ⚠of - This is the implementation detail of #RB_NEWOBJ_OF.
- rb_
nogvl ⚠ - Identical to
rb_thread_call_without_gvl, except it additionally takes “flags” that change the behaviour. - rb_
notimplement ⚠ - @exception
rb_eNotImpError@note It never returns. - rb_
num2dbl ⚠ - Converts an instance of ::
rb_cNumericinto C’sdouble. - rb_
num2fix ⚠ - Converts a numeric value into a Fixnum. This is not a preserving conversion; for instance 1.5 would be converted into 1.
- rb_
num2int ⚠ - Converts an instance of ::
rb_cNumericinto C’slong. - rb_
num2ll ⚠ - Converts an instance of ::
rb_cNumericinto C’slong long. - rb_
num2long ⚠ - Converts an instance of ::
rb_cNumericinto C’slong. - rb_
num2short ⚠ - Converts an instance of ::
rb_cNumericinto C’sshort. - rb_
num2uint ⚠ - Converts an instance of ::
rb_cNumericinto C’sunsigned long. - rb_
num2ull ⚠ - Converts an instance of ::
rb_cNumericinto C’sunsigned long long. - rb_
num2ulong ⚠ - Converts an instance of ::
rb_cNumericinto C’sunsigned long. - rb_
num2ushort ⚠ - Converts an instance of ::
rb_cNumericinto C’sunsigned short. - rb_
num_ ⚠coerce_ bin - Coerced binary operation. This function first coerces the two objects, then applies the operation.
- rb_
num_ ⚠coerce_ bit - This one is optimised for bitwise operations, but the API is identical to
rb_num_coerce_bin. - rb_
num_ ⚠coerce_ cmp - Identical to
rb_num_coerce_bin, except for return values. This function best suits for comparison operators e.g.<=>. - rb_
num_ ⚠coerce_ relop - Identical to
rb_num_coerce_cmp, except for return values. This function best suits for relationship operators e.g.<=. - rb_
num_ ⚠zerodiv - Just always raises an exception.
- rb_
obj_ ⚠alloc - Allocates an instance of the given class.
- rb_
obj_ ⚠as_ string - Try converting an object to its stringised representation using its
to_smethod, if any. If there is no such thing, it resorts torb_any_to_soutput. - rb_
obj_ ⚠call_ init - Calls
initializemethod of the passed object with the passed arguments. It also forwards the implicitly passed block to the method. - rb_
obj_ ⚠call_ init_ kw - Identical to
rb_obj_call_init, except you can specify how to handle the last element of the given array. - rb_
obj_ ⚠class - Queries the class of an object. This is not always identical to
RBASIC_CLASS(obj). It searches for the nearest ancestor skipping singleton classes or included modules. - rb_
obj_ ⚠classname - Queries the name of the class of the passed object.
- rb_
obj_ ⚠clone - Produces a shallow copy of the given object. Its list of instance variables are copied, but not the objects they reference. It also copies the frozen value state.
- rb_
obj_ ⚠dup - Duplicates the given object. This does almost the same thing as
rb_obj_clonedo. However it does not copy the singleton class (if any). It also doesn’t copy frozen-ness. - rb_
obj_ ⚠encoding - Identical to
rb_enc_get_index, except the return type. - rb_
obj_ ⚠freeze - Just calls
rb_obj_freeze_inlineinside. Does this make any sens to extension libraries? - rb_
obj_ ⚠freeze_ inline
- rb_
obj_ ⚠frozen_ p - Just calls RB_OBJ_FROZEN() inside. Does this make any sens to extension libraries?
- rb_
obj_ ⚠hide - Make the object invisible from Ruby code.
- rb_
obj_ ⚠id - Finds or creates an integer primary key of the given object. In the old days this function was a purely arithmetic operation that maps the underlying memory address where the object resides into a Ruby’s integer. Some time around 2.x this changed. It no longer relates its return values to C level pointers. This function assigns some random number to the given object if absent. The same number will be returned on all subsequent requests. No two active objects share a number.
- rb_
obj_ ⚠init_ copy - Default implementation of
#initialize_copy,#initialize_dupand#initialize_clone. It does almost nothing. Just raises exceptions for checks. - rb_
obj_ ⚠instance_ eval - Evaluates a string containing Ruby source code, or the given block, within
the context of the receiver. In order to set the context, the variable
selfis set torecvwhile the code is executing, giving the code access torecv’s instance variables and private methods. - rb_
obj_ ⚠instance_ exec - Executes the given block within the context of the receiver. In order to
set the context, the variable
selfis set torecvwhile the code is executing, giving the code access torecv’s instance variables. Arguments are passed as block parameters. - rb_
obj_ ⚠instance_ variables - Resembles
Object#instance_variables. - rb_
obj_ ⚠is_ fiber - Queries if an object is a fiber.
- rb_
obj_ ⚠is_ instance_ of - Queries if the given object is a direct instance of the given class.
- rb_
obj_ ⚠is_ kind_ of - Queries if the given object is an instance (of possibly descendants) of the given class.
- rb_
obj_ ⚠is_ method - Queries if the given object is a method.
- rb_
obj_ ⚠is_ proc - Queries if the given object is a proc.
- rb_
obj_ ⚠method - Creates a method object. A method object is a proc-like object that you can “call”. Note that a method object snapshots the method at the time the object is created:
- rb_
obj_ ⚠method_ arity - Identical to
rb_mod_method_arity, except it searches for singleton methods rather than instance methods. - rb_
obj_ ⚠remove_ instance_ variable - Resembles
Object#remove_instance_variable. - rb_
obj_ ⚠respond_ to - Identical to
rb_respond_to, except it additionally takes the visibility parameter. This does not make difference unless the object hasrespond_to?undefined, but hasrespond_to_missing?defined. That case the passed argument becomes the second argument ofrespond_to_missing?. - rb_
obj_ ⚠reveal - Make a hidden object visible again.
- rb_
obj_ ⚠setup - Fills common fields in the object.
- rb_
obj_ ⚠singleton_ methods - Identical to
rb_class_instance_methods, except it returns names of singleton methods instead of instance methods. - rb_
out_ ⚠of_ int - This is an utility function to raise an ::
rb_eRangeError. - rb_p⚠
- Inspects an object. It first calls the argument’s
#inspectmethod, then feeds its result string into ::rb_stdout. - rb_
path2class ⚠ - Resolves a
Q::W::E::R-style path string to the actual class it points. - rb_
path_ ⚠check - This function is mysterious. What it does is not immediately obvious. Also what it does seems platform dependent.
- rb_
path_ ⚠to_ class - Identical to
rb_path2class, except it accepts the path as Ruby’s string instead of C’s. - rb_pipe⚠
- This is an
rb_cloexec_pipe+rb_update_max_fdcombo. - rb_
postponed_ ⚠job_ register - Registers a postponed job.
- rb_
postponed_ ⚠job_ register_ one - Identical to
rb_postponed_job_register_one, except it additionally checks for duplicated registration. In case the passed job is already in the postponed job buffer this function does nothing. - rb_
prepend_ ⚠module - Identical to
rb_include_module, except it “prepends” the passed module to the klass, instead of includes. This affects howsuperresolves. For instance: - rb_
proc_ ⚠arity - Queries the number of mandatory arguments of the given Proc. If its block
is declared to take no arguments, returns
0. If the block is known to take exactlynarguments, returnsn. If the block has optional arguments, returns-n-1, wherenis the number of mandatory arguments, with the exception for blocks that are not lambdas and have only a finite number of optional arguments; in this latter case, returnsn. Keyword arguments will be considered as a single additional argument, that argument being mandatory if any keyword argument is mandatory. - rb_
proc_ ⚠call - Evaluates the passed proc with the passed arguments.
- rb_
proc_ ⚠call_ kw - Identical to
rb_proc_call, except you can specify how to handle the last element of the given array. - rb_
proc_ ⚠call_ with_ block - Identical to
rb_proc_call, except you can additionally pass another proc object, as a block. Nowadays procs can take blocks: - rb_
proc_ ⚠call_ with_ block_ kw - Identical to
rb_proc_call_with_block, except you can specify how to handle the last element of the given array. It can also be seen as a routine identical torb_proc_call_kw, except you can additionally pass another proc object as a block. - rb_
proc_ ⚠exec - Executes a shell command.
- rb_
proc_ ⚠lambda_ p - Queries if the given object is a lambda. Instances of ::
rb_cProcare either lambda or proc. They differ in several points. This function can distinguish them without actually evaluating their contents. - rb_
proc_ ⚠new - This is an
rb_iterate+rb_block_proccombo. - rb_
proc_ ⚠times - Gathers info about resources consumed by the current process.
- rb_
profile_ ⚠frame_ absolute_ path - Identical to
rb_profile_frame_path, except it tries to expand the returning path. In case the path isrequire-d from something elserb_profile_frame_pathcan return relative paths. This one tries to avoid that. - rb_
profile_ ⚠frame_ base_ label - Identical to
rb_profile_frame_label, except it does not “qualify” the result. Consider the following backtrace: - rb_
profile_ ⚠frame_ classpath - Queries the class path of the method that the passed frame represents.
- rb_
profile_ ⚠frame_ first_ lineno - Queries the first line of the method of the passed frame pointer. Can be handy when for instance a debugger want to display the frame in question.
- rb_
profile_ ⚠frame_ full_ label - Identical to
rb_profile_frame_label, except it returns a qualified result. - rb_
profile_ ⚠frame_ label - Queries human-readable “label” string. This is
"<main>"for the toplevel,"<compiled>"for evaluated ones, method name for methods, class name for classes. - rb_
profile_ ⚠frame_ method_ name - Queries the name of the method of the passed frame.
- rb_
profile_ ⚠frame_ path - Queries the path of the passed backtrace.
- rb_
profile_ ⚠frame_ qualified_ method_ name - Identical to
rb_profile_frame_method_name, except it “qualifies” the return value with its defining class. - rb_
profile_ ⚠frame_ singleton_ method_ p - Queries if the method of the passed frame is a singleton class.
- rb_
profile_ ⚠frames - Queries mysterious “frame“s of the given range.
- rb_
protect ⚠ - Protects a function call from potential global escapes from the function.
Such global escapes include exceptions,
throw,break, for example. - rb_
provide ⚠ - Declares that the given feature is already provided by someone else. This
API can be handy when you have an extension called
foo.sowhich, when required, also provides functionality ofbar.so. - rb_
provided ⚠ - Queries if the given feature has already been loaded into the execution
context. The “feature” head are things like
"json"or"socket". - rb_
ractor_ ⚠local_ storage_ ptr - Identical to
rb_ractor_local_storage_valueexcept the return type. - rb_
ractor_ ⚠local_ storage_ ptr_ newkey - Extended version of
rb_ractor_local_storage_value_newkey. It additionally takes the type of the issuing key. - rb_
ractor_ ⚠local_ storage_ ptr_ set - Identical to
rb_ractor_local_storage_value_setexcept the parameter type. - rb_
ractor_ ⚠local_ storage_ value - Queries the key.
- rb_
ractor_ ⚠local_ storage_ value_ lookup - Queries the key.
- rb_
ractor_ ⚠local_ storage_ value_ newkey - Issues a new key.
- rb_
ractor_ ⚠local_ storage_ value_ set - Associates the passed value to the passed key.
- rb_
ractor_ ⚠make_ shareable - Destructively transforms the passed object so that multiple Ractors can share it. What is a shareable object and what is not is a nuanced concept, and @ko1 says the definition can still change. However extension library authors might interest to learn how to use #RUBY_TYPED_FROZEN_SHAREABLE.
- rb_
ractor_ ⚠make_ shareable_ copy - Identical to
rb_ractor_make_shareable, except it returns a (deep) copy of the passed one instead of modifying it in-place. - rb_
ractor_ ⚠stderr - Queries the standard error of the current Ractor that is calling this function.
- rb_
ractor_ ⚠stderr_ set - Assigns an IO to the standard error of the Ractor that is calling this function.
- rb_
ractor_ ⚠stdin - Queries the standard input of the current Ractor that is calling this function.
- rb_
ractor_ ⚠stdin_ set - Assigns an IO to the standard input of the Ractor that is calling this function.
- rb_
ractor_ ⚠stdout - Queries the standard output of the current Ractor that is calling this function.
- rb_
ractor_ ⚠stdout_ set - Assigns an IO to the standard output of the Ractor that is calling this function.
- rb_
raise ⚠ - Exception entry point. By calling this function the execution of your program gets interrupted to “raise” an exception up to the callee entities. Programs could “rescue” that exception, or could “ensure” some part of them. If nobody cares about such things, the raised exception reaches at the top of execution. This yields abnormal end of the process.
- rb_
rand_ ⚠bytes_ int32 - Repeatedly calls the passed function over and over again until the passed buffer is filled with random bytes.
- rb_
random_ ⚠base_ init - Initialises an allocated ::
rb_random_tinstance. Call it from your own initialiser appropriately. - rb_
random_ ⚠bytes - Generates a String of random bytes.
- rb_
random_ ⚠int32 - Identical to
rb_genrand_int32, except it generates using the passed RNG. - rb_
random_ ⚠mark - This is the implementation of ::
rb_data_type_struct::dmark for ::[rb_random_data_type]. In case your PRNG does not involve Ruby objects at all (which is quite likely), you can simply reuse it. - rb_
random_ ⚠real - Identical to
rb_genrand_real, except it generates using the passed RNG. - rb_
random_ ⚠ulong_ limited - Identical to
rb_genrand_ulong_limited, except it generates using the passed RNG. - rb_
range_ ⚠beg_ len - Deconstructs a numerical range. As the arguments are
longbased, it expects everything are in thelongdomain. - rb_
range_ ⚠new - Creates a new Range.
- rb_
range_ ⚠values - Deconstructs a range into its components.
- rb_
rational_ ⚠den - Queries the denominator of the passed Rational.
- rb_
rational_ ⚠new - Constructs a Rational, with reduction. This returns for instance
(2/3)rfor[rb_rational_new]INT2NUM(-384), INT2NUM(-576)). - rb_
rational_ ⚠num - Queries the numerator of the passed Rational.
- rb_
rational_ ⚠raw - Identical to
rb_rational_new, except it skips argument validations. It is thus dangerous for extension libraries. For instance1/0rcould be constructed using this. - rb_
readwrite_ ⚠sys_ fail - Raises appropriate exception using the parameters.
- rb_
readwrite_ ⚠syserr_ fail - Identical to
rb_readwrite_sys_fail, except it does not depend on C global variable errno. Pass it explicitly. - rb_
refinement_ ⚠new - Creates a new, anonymous refinement.
- rb_
reg_ ⚠adjust_ startpos - Tell us if this is a wrong idea, but it seems this function has no usage at all. Just remains here for theoretical backwards compatibility.
- rb_
reg_ ⚠alloc - Allocates an instance of ::
rb_cRegexp. - rb_
reg_ ⚠backref_ number - Queries the index of the given named capture. Captures could be named. But that doesn’t mean named ones are not indexed. A regular expression can mix named and non-named captures, and they are all indexed. This function converts from a name to its index.
- rb_
reg_ ⚠init_ str - Initialises an instance of ::
rb_cRegexp. - rb_
reg_ ⚠last_ match - This just returns the argument, stringified. What a poor name.
- rb_
reg_ ⚠match - This is the match operator.
- rb_
reg_ ⚠match2 - Identical to
rb_reg_match, except it matches againstrb_lastline_get(or, the$_). - rb_
reg_ ⚠match_ last - The portion of the original string that captured at the very last.
- rb_
reg_ ⚠match_ post - The portion of the original string after the given match.
- rb_
reg_ ⚠match_ pre - The portion of the original string before the given match.
- rb_
reg_ ⚠new - Creates a new Regular expression.
- rb_
reg_ ⚠new_ str - Identical to
rb_reg_new, except it takes the expression in Ruby’s string instead of C’s. - rb_
reg_ ⚠nth_ defined - Identical to
rb_reg_nth_match, except it just returns Boolean. This could skip allocating a returning string, resulting in reduced memory footprints if applicable. - rb_
reg_ ⚠nth_ match - Queries the nth captured substring.
- rb_
reg_ ⚠options - Queries the options of the passed regular expression.
- rb_
reg_ ⚠prepare_ re - Exercises various checks and preprocesses so that the given regular expression can be applied to the given string. The preprocess here includes (but not limited to) for instance encoding conversion.
- rb_
reg_ ⚠quote - Escapes any characters that would have special meaning in a regular expression.
- rb_
reg_ ⚠regcomp - Creates a new instance of ::
rb_cRegexp. It can be seen as a specialised version ofrb_reg_new_strwhere it does not take options. - rb_
reg_ ⚠region_ copy - Duplicates a match data. This is roughly the same as
onig_region_copy(), except it tries to GC when there is not enough memory. - rb_
reg_ ⚠regsub - Substitution. This is basically the implementation of
String#sub. AlsoString#gsubrepeatedly calls this function. - rb_
reg_ ⚠search - Runs the passed regular expression over the passed string. Unlike
rb_reg_searchthis function also takes position and direction of the search, which make it possible for this function to run from in middle of the string. - rb_
remove_ ⚠event_ hook - Removes the passed function from the list of event hooks.
- rb_
remove_ ⚠event_ hook_ with_ data - Identical to
rb_remove_event_hook, except it additionally takes the data argument. This extra argument is the same as that ofrb_add_event_hook, and this function removes the hook which matches both arguments at once. - rb_
remove_ ⚠method - Removes a method. Don’t confuse this to
rb_undef_method, which doesn’t remove a method. This one resemblesModule#remove_method. - rb_
remove_ ⚠method_ id - Identical to
rb_remove_method, except it accepts the method name as ::ID. - rb_
require ⚠ - Identical to
rb_require_string, except it takes C’s string instead of Ruby’s. - rb_
require_ ⚠string - Finds and loads the given feature, if absent.
- rb_
rescue ⚠ - Identical to
rb_rescue2, except it does not take a list of exception classes. This is a shorthand of: - rb_
rescue2 ⚠ - An equivalent of
rescueclause. - rb_
reserved_ ⚠fd_ p - Queries if the given FD is reserved or not. Occasionally Ruby interpreter opens files for its own purposes. Use this function to prevent touching such behind-the-scene descriptors.
- rb_
reset_ ⚠random_ seed - Resets the RNG behind
rb_genrand_int32/rb_genrand_real. - rb_
respond_ ⚠to - Queries if the object responds to the method. This involves calling the
object’s
respond_to?method. - rb_
ruby_ ⚠debug_ ptr
- rb_
ruby_ ⚠verbose_ ptr
- rb_
scan_ ⚠args - Retrieves argument from argc and argv to given ::VALUE references according to the format string. The format can be described in ABNF as follows:
- rb_
scan_ ⚠args_ bad_ format
- rb_
scan_ ⚠args_ kw - Identical to
rb_scan_args, except it also acceptskw_splat. - rb_
scan_ ⚠args_ length_ mismatch
- rb_
set_ ⚠class_ path - Names a class.
- rb_
set_ ⚠class_ path_ string - Identical to
rb_set_class_path, except it accepts the name as Ruby’s string instead of C’s. - rb_
set_ ⚠end_ proc - Registers a function that shall run on process exit. Registered functions
run in reverse-chronological order, mixed with syntactic
ENDblock andKernel#at_exit. - rb_
set_ ⚠errinfo - Sets the current exception (
$!) to the given value. - rb_
singleton_ ⚠class - Finds or creates the singleton class of the passed object.
- rb_
singleton_ ⚠class_ attached - Attaches a singleton class to its corresponding object.
- rb_
singleton_ ⚠class_ clone - Clones a singleton class. An object can have its own singleton class. OK. Then what happens when a program clones such object? The singleton class that is attached to the source object must also be cloned. Otherwise a singleton object gets shared with two objects, which breaks “singleton”-ness of such class.
- rb_
sourcefile ⚠ - Resembles
__FILE__. - rb_
sourceline ⚠ - Resembles
__LINE__. - rb_
spawn ⚠ - Identical to
rb_f_exec, except it spawns a child process instead of replacing the current one. - rb_
spawn_ ⚠err - Identical to
rb_spawn, except you can additionally know the detailed situation in case of abnormal parturitions. - rb_
sprintf ⚠ - Ruby’s extended
sprintf(3). We ended up reinventing the entireprintfbusiness because we don’t want to depend on locales. OS-providedprintfroutines might or might not, which caused instabilities of the result strings. - rb_
st_ ⚠add_ direct
- rb_
st_ ⚠cleanup_ safe
- rb_
st_ ⚠clear
- rb_
st_ ⚠copy
- rb_
st_ ⚠delete
- rb_
st_ ⚠delete_ safe
- rb_
st_ ⚠foreach
- rb_
st_ ⚠foreach_ check
- rb_
st_ ⚠foreach_ safe - Identical to
rb_st_foreach, except it raises exceptions when the callback function tampers the table during iterating over it. - rb_
st_ ⚠foreach_ with_ replace
- rb_
st_ ⚠free_ table
- rb_
st_ ⚠get_ key
- rb_
st_ ⚠hash
- rb_
st_ ⚠hash_ end
- rb_
st_ ⚠hash_ start
- rb_
st_ ⚠hash_ uint
- rb_
st_ ⚠hash_ uint32
- rb_
st_ ⚠init_ numtable
- rb_
st_ ⚠init_ numtable_ with_ size
- rb_
st_ ⚠init_ strcasetable
- rb_
st_ ⚠init_ strcasetable_ with_ size
- rb_
st_ ⚠init_ strtable
- rb_
st_ ⚠init_ strtable_ with_ size
- rb_
st_ ⚠init_ table
- rb_
st_ ⚠init_ table_ with_ size
- rb_
st_ ⚠insert
- rb_
st_ ⚠insert2
- rb_
st_ ⚠keys
- rb_
st_ ⚠keys_ check
- rb_
st_ ⚠locale_ insensitive_ strcasecmp - Our own locale-insensitive version of
strcasecmp(3). The “case” here always means that of the POSIX Locale. It doesn’t depend on runtime locale settings. - rb_
st_ ⚠locale_ insensitive_ strncasecmp - Our own locale-insensitive version of
strcnasecmp(3). The “case” here always means that of the POSIX Locale. It doesn’t depend on runtime locale settings. - rb_
st_ ⚠lookup
- rb_
st_ ⚠memsize
- rb_
st_ ⚠numcmp
- rb_
st_ ⚠numhash
- rb_
st_ ⚠shift
- rb_
st_ ⚠table_ size
- rb_
st_ ⚠update
- rb_
st_ ⚠values
- rb_
st_ ⚠values_ check
- rb_
stat_ ⚠new - Constructs an instance of ::
rb_cStatfrom the passed information. - rb_
str2inum ⚠ - Identical to
rb_str_to_inum, except the second argument controls the base and badcheck at once. It can also be seen as a routine identical torb_cstr2inum, except it takes Ruby’s strings instead of C’s. - rb_
str_ ⚠append - Identical to
rb_str_buf_append, except it converts the right hand side before concatenating. - rb_
str_ ⚠buf_ append - Identical to
rb_str_cat_cstr, except it takes Ruby’s string instead of C’s. It can also be seen as a routine identical torb_str_shared_replace, except it appends instead of replaces. - rb_
str_ ⚠buf_ cat - @alias{
rb_str_cat} - rb_
str_ ⚠buf_ cat2 - @alias{
rb_str_cat_cstr} - rb_
str_ ⚠buf_ cat_ ascii - Identical to
rb_str_cat_cstr, except it additionally assumes the source string be a NUL terminated ASCII string. - rb_
str_ ⚠buf_ new - Allocates a “string buffer”. A string buffer here is an instance of
::
rb_cString, whose capacity is bigger than the length of it. If you can say that a string grows to a specific amount of bytes, this could be effective than resizing a string over and over again and again. - rb_
str_ ⚠buf_ new_ cstr - This is a
rb_str_buf_new+rb_str_buf_catcombo. - rb_
str_ ⚠capacity - Queries the capacity of the given string.
- rb_
str_ ⚠cat - Destructively appends the passed contents to the string.
- rb_
str_ ⚠cat2 - @alias{
rb_str_cat_cstr} - rb_
str_ ⚠cat_ cstr - Identical to
rb_str_cat, except it assumes the passed pointer is a pointer to a C string. - rb_
str_ ⚠catf - Identical to
rb_sprintf, except it renders the output to the specified object rather than creating a new one. - rb_
str_ ⚠cmp - Compares two strings, as in
strcmp(3). This does not consider the current locale, but considers the encodings of both sides instead. - rb_
str_ ⚠coderange_ scan_ restartable - Scans the passed string until it finds something odd. Returns the number of
bytes scanned. As the name implies this is suitable for repeated call. One
of its application is
IO#readlines. The method reads from its receiver’s read buffer, maybe more than once, looking for newlines. But “newline” can be different among encodings. This API is used to detect broken contents to properly mark them as such. - rb_
str_ ⚠comparable - Checks if two strings are comparable each other or not. Because
rb_str_cmpmust return “lesser than” or “greater than” information, comparing two strings needs a stricter restriction. Both sides must be in a same set of strings which have total order. This is to check that property. Intuitive it sounds? But they can have different encodings. A character and another might or might not appear in the same order in their codepoints. It is complicated than you think. - rb_
str_ ⚠concat - Identical to
rb_str_append, except it also accepts an integer as a codepoint. This resemblesString#<<. - rb_
str_ ⚠conv_ enc - Encoding conversion main routine.
- rb_
str_ ⚠conv_ enc_ opts - Identical to
rb_str_conv_enc, except it additionally takes IO encoder options. The extra arguments can be constructed using io_extract_modeenc() etc. - rb_
str_ ⚠drop_ bytes - Shrinks the given string for the given number of bytes.
- rb_
str_ ⚠dump - “Inverse” of
rb_eval_string. Returns a quoted version of the string. All non-printing characters are replaced by\uNNNNor\xHHnotation and all special characters are escaped. The result string is guaranteed to render a string of the same contents when passed toevaland friends. - rb_
str_ ⚠dup - Duplicates a string.
- rb_
str_ ⚠dup_ frozen - @alias{
rb_str_new_frozen} - rb_
str_ ⚠ellipsize - Shortens
strand adds three dots, an ellipsis, if it is longer thanlencharacters. The length of the returned string in characters is less than or equal tolen. If the length ofstris less than or equallen, returnsstritself. The encoding of returned string is equal to that of passed one. The class of returned string is equal to that of passed one. - rb_
str_ ⚠encode - Converts the contents of the passed string from its encoding to the passed one.
- rb_
str_ ⚠encode_ ospath - Converts a string into an “OS Path” encoding, if any. In most operating systems there are no such things like per-OS default encoding of filename. For them this function is no-op. However most notably on MacOS, pathnames are UTF-8 encoded. It converts the given string into such encoding.
- rb_
str_ ⚠equal - Equality of two strings.
- rb_
str_ ⚠export - Identical to
rb_str_to_str, except it additionally converts the string into default external encoding. Ruby has a concept called encodings. A string can have different encoding than the environment expects. Someone has to make sure its contents be converted to something suitable. This is that routine. Call it when necessary. - rb_
str_ ⚠export_ locale - Identical to
rb_str_export, except it converts into the locale encoding instead. - rb_
str_ ⚠export_ to_ enc - Identical to
rb_str_export, except it additionally takes an encoding. - rb_
str_ ⚠format - Formats a string.
- rb_
str_ ⚠free - Destroys the given string for no reason.
- rb_
str_ ⚠freeze - This is the implementation of
String#freeze. - rb_
str_ ⚠hash - Calculates a hash value of a string. This is one of the two functions that constructs struct ::st_hash_type.
- rb_
str_ ⚠hash_ cmp - Compares two strings. This is one of the two functions that constructs struct ::st_hash_type.
- rb_
str_ ⚠inspect - Generates a “readable” version of the receiver.
- rb_
str_ ⚠intern - Identical to
rb_to_symbol, except it assumes the receiver being an instance of ::RString. - rb_
str_ ⚠length - Identical to
rb_str_strlen, except it returns the value in ::rb_cInteger. - rb_
str_ ⚠locktmp - Obtains a “temporary lock” of the string. This advisory locking mechanism
prevents other cooperating threads from tampering the receiver. The same
thing could be done via freeze mechanism, but this one can also be unlocked
using
rb_str_unlocktmp. - rb_
str_ ⚠modify - Declares that the string is about to be modified. This for instance let the string have a dedicated backend storage.
- rb_
str_ ⚠modify_ expand - Identical to
rb_str_modify, except it additionally expands the capacity of the receiver. - rb_
str_ ⚠new - Allocates an instance of ::
rb_cString. - rb_
str_ ⚠new_ cstr - Identical to
rb_str_new, except it assumes the passed pointer is a pointer to a C string. - rb_
str_ ⚠new_ frozen - Creates a frozen copy of the string, if necessary. This function does nothing when the passed string is already frozen. Otherwise, it allocates a copy of it, which is frozen. The passed string is untouched either ways.
- rb_
str_ ⚠new_ shared - Identical to
rb_str_new_cstr, except it takes a Ruby’s string instead of C’s. Implementation wise it creates a string that shares the backend memory region with the receiver. So the name. But there is no way for extension libraries to know if a string is of such variant. - rb_
str_ ⚠new_ static - Identical to
rb_str_new, except it takes a C string literal. - rb_
str_ ⚠new_ with_ class - Identical to
rb_str_new, except it takes the class of the allocating object. - rb_
str_ ⚠offset - “Inverse” of
rb_str_sublen. This function scans the contents to find the byte index that matches the character index. Generally speaking this is anO(n)operation. Could be slow. - rb_
str_ ⚠plus - Generates a new string, concatenating the former to the latter. It can also
be seen as a routine identical to
rb_str_append, except it doesn’t tamper the passed strings to create a new one instead. - rb_
str_ ⚠replace - Replaces the contents of the former object with the stringised contents of the latter.
- rb_
str_ ⚠resize - Overwrites the length of the string. In contrast to
rb_str_set_len, this function can also expand a string. - rb_
str_ ⚠resurrect - I guess there is no use case of this function in extension libraries, but
this is a routine identical to
rb_str_dup, except it always creates an instance of ::rb_cStringregardless of the given object’s class. This makes the most sense when the passed string is formerly hidden byrb_obj_hide. - rb_
str_ ⚠scrub - “Cleanses” the string. A string has its encoding and its contents. They, in practice, do not always fit. There are strings in the wild that are “broken”; include bit patterns that are not allowed by its encoding. That can happen when a user copy&pasted something bad, network input got clobbered by a middleman, cosmic rays hit the physical memory, and many more occasions. This function takes such strings, and fills the “broken” portion with the passed replacement bit pattern.
- rb_
str_ ⚠set_ len - Overwrites the length of the string. Typically this is used to shrink a string that was formerly expanded.
- rb_
str_ ⚠setter - This is a ::
rb_gvar_setter_tthat refutes non-string assignments. - rb_
str_ ⚠shared_ replace - Replaces the contents of the former with the latter.
- rb_
str_ ⚠split - Divides the given string based on the given delimiter. This is the
1-argument 0-block version of
String#split. - rb_
str_ ⚠strlen - Counts the number of characters (not bytes) that are stored inside of the given string. This of course depends on its encoding. Also this function generally runs in O(n), because for instance you have to scan the entire string to know how many characters are there in a UTF-8 string.
- rb_
str_ ⚠sublen - Byte offset to character offset conversion. This makes sense when the
receiver is in a multibyte encoding. The string’s i-th character does not
always sit at its i-th byte. This function scans the contents to find the
character index that matches the byte index. Generally speaking this is an
O(n)operation. Could be slow. - rb_
str_ ⚠subpos - Identical to
rb_str_substr, except it returns a C’s string instead of Ruby’s. - rb_
str_ ⚠subseq - Identical to
rb_str_substr, except the numbers are interpreted as byte offsets instead of character offsets. - rb_
str_ ⚠substr - This is the implementation of two-argumented
String#slice. - rb_
str_ ⚠succ - Searches for the “successor” of a string. This function is complicated! This is the only function in the entire ruby API (either C or Ruby) that generates a string out of thin air. First, the successor to an empty string is a new empty string:
- rb_
str_ ⚠times - Repetition of a string.
- rb_
str_ ⚠tmp_ new - Allocates a “temporary” string. This is a hidden empty string. Handy on occasions.
- rb_
str_ ⚠to_ dbl - Identical to
rb_cstr_to_dbl, except it accepts a Ruby’s string instead of C’s. - rb_
str_ ⚠to_ interned_ str - Identical to
rb_interned_str, except it takes a Ruby’s string instead of C’s. It can also be seen as a routine identical to torb_str_new_shared, except it returns an infamous “f“string. - rb_
str_ ⚠to_ inum - Identical to
rb_cstr2inum, except it takes Ruby’s strings instead of C’s. - rb_
str_ ⚠to_ str - Identical to
rb_check_string_type, except it raises exceptions in case of conversion failures. - rb_
str_ ⚠unlocktmp - Releases a lock formerly obtained by
rb_str_locktmp. - rb_
str_ ⚠update - Replaces some (or all) of the contents of the given string. This is the
implementation of three-argumented
String#[]=. - rb_
str_ ⚠vcatf - Identical to
rb_str_catf, except it takes ava_list. It can also be seen as a routine identical torb_vsprintf, except it renders the output to the specified object rather than creating a new one. - rb_
string_ ⚠value - Identical to
rb_str_to_str, except it fills the passed pointer with the converted object. - rb_
string_ ⚠value_ cstr - Identical to
rb_string_value_ptr, except it additionally checks for the contents for viability as a C string. Ruby can accept wider range of contents as strings, compared to C. This function is to check that. - rb_
string_ ⚠value_ ptr - Identical to
rb_str_to_str, except it returns the converted string’s backend memory region. - rb_
struct_ ⚠alloc - Identical to
rb_struct_new, except it takes the field values as a Ruby array. - rb_
struct_ ⚠alloc_ noinit - Allocates an instance of the given class. This consequential name is of
course because
rb_struct_allocnot only allocates but also initialises an instance. The API design is broken. - rb_
struct_ ⚠aref - Resembles
Struct#[]. - rb_
struct_ ⚠aset - Resembles
Struct#[]=. - rb_
struct_ ⚠define - Defines a struct class.
- rb_
struct_ ⚠define_ under - Identical to
rb_struct_define, except it defines the class under the specified namespace instead of global toplevel. - rb_
struct_ ⚠define_ without_ accessor - Identical to
rb_struct_define, except it does not define accessor methods. You have to define them yourself. Forget about the allocator function parameter; it is for internal use only. Extension libraries are unable to properly allocate a ruby struct, becauseRStructis opaque. - rb_
struct_ ⚠define_ without_ accessor_ under - Identical to
rb_struct_define_without_accessor, except it defines the class under the specified namespace instead of global toplevel. It can also be seen as a routine identical torb_struct_define_under, except it does not define accessor methods. - rb_
struct_ ⚠getmember - Identical to
rb_struct_aref, except it takes ::ID instead of ::VALUE. - rb_
struct_ ⚠initialize - Mass-assigns a struct’s fields.
- rb_
struct_ ⚠members - Queries the list of the names of the fields of the class of the given struct
object. This is almost the same as calling
rb_struct_s_membersover the class of the receiver. - rb_
struct_ ⚠new - Creates an instance of the given struct.
- rb_
struct_ ⚠s_ members - Queries the list of the names of the fields of the given struct class.
- rb_
struct_ ⚠size - Returns the number of struct members.
- rb_
sym2id ⚠ - Converts an instance of ::
rb_cSymbolinto an ::ID. - rb_
sym2str ⚠ - Identical to
rb_id2str, except it takes an instance of ::rb_cSymbolrather than an ::ID. - rb_
sym_ ⚠all_ symbols - Collects every single bits of symbols that have ever interned in the entire history of the current process.
- rb_
sym_ ⚠to_ s - This is an
rb_sym2str+rb_str_dupcombo. - rb_
symname_ ⚠p - Sees if the passed C string constructs a valid syntactic symbol. Invalid ones for instance includes whitespaces.
- rb_
sys_ ⚠fail - Converts a C errno into a Ruby exception, then raises it. For instance:
- rb_
sys_ ⚠fail_ str - Identical to
rb_sys_fail, except it takes the message in Ruby’s String instead of C’s. - rb_
sys_ ⚠warning - Identical to
rb_sys_fail, except it does not raise an exception to render a warning instead. - rb_
syserr_ ⚠fail - Raises appropriate exception that represents a C errno.
- rb_
syserr_ ⚠fail_ str - Identical to
rb_syserr_fail, except it takes the message in Ruby’s String instead of C’s. - rb_
syserr_ ⚠new - Creates an exception object that represents the given C errno.
- rb_
syserr_ ⚠new_ str - Identical to
rb_syserr_new, except it takes the message in Ruby’s String instead of C’s. - rb_
syswait ⚠ - This is a shorthand of
rb_waitpidwithout status and flags. It has been like this since the very beginning. The initial revision already did the same thing. Not sure why, then, it has been namedsyswait. AFAIK this is different from howwait(3posix)works. - rb_
thread_ ⚠add_ event_ hook - Identical to
rb_add_event_hook, except its effect is limited to the passed thread. Other threads are not affected by this. - rb_
thread_ ⚠add_ event_ hook2
- rb_
thread_ ⚠alone - Checks if the thread this function is running is the only thread that is currently alive.
- rb_
thread_ ⚠atfork - A
pthread_atfork(3posix)-like API. Ruby expects its child processes to call this function at the very beginning of their processes. If you plan to fork a process don’t forget to call it. - rb_
thread_ ⚠atfork_ before_ exec - :FIXME: situation of this function is unclear. It seems nobody uses it. Maybe a good idea to KonMari.
- rb_
thread_ ⚠call_ with_ gvl - (Re-)acquires the GVL. This manoeuvre makes it possible for an out-of-GVL routine to one-shot call a ruby method.
- rb_
thread_ ⚠call_ without_ gvl - Allows the passed function to run in parallel with other Ruby threads.
- rb_
thread_ ⚠call_ without_ gvl2 - Identical to
rb_thread_call_without_gvl, except it does not interface with signals etc. As described in #RB_NOGVL_INTR_FAIL, interrupts can hurt you. In case this function detects an interrupt, it returns immediately. You can record progress of your callback and check it after returning from this function. - rb_
thread_ ⚠check_ ints - Checks for interrupts. In ruby, signals are masked by default. You can call this function at will to check if there are pending signals. In case there are, they would be handled in this function.
- rb_
thread_ ⚠create - Creates a Ruby thread that is backended by a C function.
- rb_
thread_ ⚠current - Obtains the “current” thread.
- rb_
thread_ ⚠fd_ close - Notifies a closing of a file descriptor to other threads. Multiple threads can wait for the given file descriptor at once. If such file descriptor is closed, threads need to start propagating their exceptions. This is the API to kick that process.
- rb_
thread_ ⚠fd_ select - Waits for multiple file descriptors at once. This is basically a wrapper of system-provided select() with releasing GVL, to allow other Ruby threads run in parallel.
- rb_
thread_ ⚠fd_ writable - Identical to
rb_thread_wait_fd, except it blocks the current thread until the given file descriptor is ready to be written. - rb_
thread_ ⚠interrupted - Checks if the thread’s execution was recently interrupted. If called from that thread, this function can be used to detect spurious wake-ups.
- rb_
thread_ ⚠kill - Terminates the given thread. Unlike a stopped thread, a killed thread could never be revived. This function does return, when passed e.g. an already killed thread. But if the passed thread is the only one, or a special thread called “main”, then it also terminates the entire process.
- rb_
thread_ ⚠local_ aref - This badly named function reads from a Fiber local storage. When this function was born there was no such thing like a Fiber. The world was innocent. But now… This is a Fiber local storage. Sorry.
- rb_
thread_ ⚠local_ aset - This badly named function writes to a Fiber local storage. When this function was born there was no such thing like a Fiber. The world was innocent. But now… This is a Fiber local storage. Sorry.
- rb_
thread_ ⚠main - Obtains the “main” thread. There are threads called main. Historically the (only) main thread was the one which runs when the process boots. Now that we have Ractor, there are more than one main threads.
- rb_
thread_ ⚠remove_ event_ hook - Identical to
rb_remove_event_hook, except it additionally takes a thread argument. This extra argument is the same as that ofrb_thread_add_event_hook, and this function removes the hook which matches both arguments at once. - rb_
thread_ ⚠remove_ event_ hook_ with_ data - Identical to
rb_thread_remove_event_hook, except it additionally takes the data argument. It can also be seen as a routine identical torb_remove_event_hook_with_data, except it additionally takes the thread. This function deletes hooks that satisfy all three criteria. - rb_
thread_ ⚠run - This is a
rb_thread_wakeup+rb_thread_schedulecombo. - rb_
thread_ ⚠schedule - Tries to switch to another thread. This function blocks until the current thread re-acquires the GVL.
- rb_
thread_ ⚠sleep - Blocks for the given period of time.
- rb_
thread_ ⚠sleep_ deadly - Identical to
rb_thread_sleep_forever, except the thread calling this function is considered “dead” when our deadlock checker is triggered. - rb_
thread_ ⚠sleep_ forever - Blocks indefinitely.
- rb_
thread_ ⚠stop - Stops the current thread. This is not the end of the thread’s lifecycle. A stopped thread can later be woken up.
- rb_
thread_ ⚠wait_ fd - Blocks the current thread until the given file descriptor is ready to be read.
- rb_
thread_ ⚠wait_ for - Identical to
rb_thread_sleep, except it takes structtimevalinstead. - rb_
thread_ ⚠wakeup - Marks a given thread as eligible for scheduling.
- rb_
thread_ ⚠wakeup_ alive - Identical to
rb_thread_wakeup, except it doesn’t raise on an already killed thread. - rb_
throw ⚠ - Transfers control to the end of the active
catchblock waiting fortag. Raises [rb_eUncughtThrow] if there is nocatchblock for the tag. The second parameter supplies a return value for thecatchblock, which otherwise defaults to ::RUBY_Qnil. For examples, seerb_catch. - rb_
throw_ ⚠obj - Identical to
rb_throw, except it allows arbitrary Ruby object to become a tag. - rb_
time_ ⚠interval - Creates a “time interval”. This basically converts an instance of
::
rb_cNumericinto a structtimeval, but for instance negative time interval must not exist. - rb_
time_ ⚠nano_ new - Identical to
rb_time_new, except it accepts the time in nanoseconds resolution. - rb_
time_ ⚠new - Creates an instance of ::
rb_cTimewith the given time and the local timezone. - rb_
time_ ⚠num_ new - Identical to
rb_time_timespec_new, except it takes Ruby values instead of C structs. - rb_
time_ ⚠timespec - Identical to
rb_time_timeval, except for return type. - rb_
time_ ⚠timespec_ interval - Identical to
rb_time_interval, except for return type. - rb_
time_ ⚠timespec_ new - Creates an instance of ::
rb_cTime, with given time and offset. - rb_
time_ ⚠timeval - Converts an instance of
rb_cTimeto a struct timeval that represents the identical point of time. It can also take something numeric; would consider it as a UNIX time then. - rb_
time_ ⚠utc_ offset - Queries the offset, in seconds between the time zone of the time and the UTC.
- rb_
timespec_ ⚠now - Fills the current time into the given struct.
- rb_
to_ ⚠encoding - Identical to
rb_find_encoding, except it raises an exception instead of returning NULL. - rb_
to_ ⚠encoding_ index - Obtains a encoding index from a wider range of objects (than
rb_enc_find_index. - rb_
to_ ⚠float - Identical to
rb_check_to_float, except it raises on error. - rb_
to_ ⚠id - @copydoc
rb_intern_str - rb_
to_ ⚠int - Identical to
rb_check_to_int, except it raises in case of conversion mismatch. - rb_
to_ ⚠symbol - Identical to
rb_intern_str, except it generates a dynamic symbol if necessary. - rb_
tracearg_ ⚠binding - Creates a binding object of the point where the trace is at.
- rb_
tracearg_ ⚠callee_ id - Identical to
rb_tracearg_method_id, except it returns callee id likerb_frame_callee. - rb_
tracearg_ ⚠defined_ class - Queries the class that defines the method that the passed trace is at. This
can be different from the class of
rb_tracearg_self’s return value because of inheritance(s). - rb_
tracearg_ ⚠event - Identical to
rb_tracearg_event_flag, except it returns the name of the event in Ruby’s symbol. - rb_
tracearg_ ⚠event_ flag - Queries the event of the passed trace.
- rb_
tracearg_ ⚠from_ tracepoint - Queries the current event of the passed tracepoint.
- rb_
tracearg_ ⚠lineno - Queries the line of the point where the trace is at.
- rb_
tracearg_ ⚠method_ id - Queries the method name of the point where the trace is at.
- rb_
tracearg_ ⚠object - Queries the allocated/deallocated object that the trace represents.
- rb_
tracearg_ ⚠path - Queries the file name of the point where the trace is at.
- rb_
tracearg_ ⚠raised_ exception - Queries the raised exception that the trace represents.
- rb_
tracearg_ ⚠return_ value - Queries the return value that the trace represents.
- rb_
tracearg_ ⚠self - Queries the receiver of the point trace is at.
- rb_
tracepoint_ ⚠disable - Stops (disables) an already running instance of TracePoint.
- rb_
tracepoint_ ⚠enable - Starts (enables) trace(s) defined by the passed object. A TracePoint object does not immediately take effect on creation. You have to explicitly call this API.
- rb_
tracepoint_ ⚠enabled_ p - Queries if the passed TracePoint is up and running.
- rb_
tracepoint_ ⚠new - Creates a tracepoint by registering a callback function for one or more
tracepoint events. Once the tracepoint is created, you can use
rb_tracepoint_enableto enable the tracepoint. - rb_
typeddata_ ⚠inherited_ p - Checks for the domestic relationship between the two.
- rb_
typeddata_ ⚠is_ kind_ of - Checks if the given object is of given kind.
- rb_
uint2big ⚠ - Converts a C’s
intptr_tinto an instance of ::rb_cInteger. - rb_
uint2inum ⚠ - Converts a C’s
uintptr_tinto an instance of ::rb_cInteger. - rb_
ull2inum ⚠ - Converts a C’s
unsigned long longinto an instance of ::rb_cInteger. - rb_
undef ⚠ - Inserts a method entry that hides previous method definition of the given name. This is not a deletion of a method. Method of the same name defined in a parent class is kept invisible in this way.
- rb_
undef_ ⚠alloc_ func - Deletes the allocator function of a class. It is sometimes desirable to restrict creation of an instance of a class. For example it rarely makes sense for a DB adaptor class to allow programmers creating DB row objects without querying the DB itself. You can kill sporadic creation of such objects then, by nullifying the allocator function using this API. Your object shall be allocated using #RB_NEWOBJ_OF() directly.
- rb_
undef_ ⚠method - Defines an undef of a method. – What?
- rb_
undefine_ ⚠finalizer - Modifies the object so that it has no finalisers at all. This function is mainly provided for symmetry. No practical usages can be thought of.
- rb_
unexpected_ ⚠type - Fails with the given object’s type incompatibility to the type.
- rb_
update_ ⚠max_ fd - Informs the interpreter that the passed fd can be the max. This information
is used from
rb_close_before_exec. - rb_
usascii_ ⚠encindex - Identical to
rb_usascii_encoding, except it returns the encoding’s index instead of the encoding itself. - rb_
usascii_ ⚠encoding - Queries the encoding that represents US-ASCII.
- rb_
usascii_ ⚠str_ new - Identical to
rb_str_new, except it generates a string of “US ASCII” encoding. This is different fromrb_external_str_new, not only for the output encoding, but also it doesn’t convert the contents. - rb_
usascii_ ⚠str_ new_ cstr - Identical to
rb_str_new_cstr, except it generates a string of “US ASCII” encoding. It can also be seen as a routine Identical torb_usascii_str_new, except it assumes the passed pointer is a pointer to a C string. - rb_
usascii_ ⚠str_ new_ static - Identical to
rb_str_new_static, except it generates a string of “US ASCII” encoding instead of “binary”. It can also be seen as a routine identical torb_usascii_str_new, except it takes a C string literal. - rb_
utf8_ ⚠encindex - Identical to
rb_utf8_encoding, except it returns the encoding’s index instead of the encoding itself. - rb_
utf8_ ⚠encoding - Queries the encoding that represents UTF-8.
- rb_
utf8_ ⚠str_ new - Identical to
rb_str_new, except it generates a string of “UTF-8” encoding. - rb_
utf8_ ⚠str_ new_ cstr - Identical to
rb_str_new_cstr, except it generates a string of “UTF-8” encoding. It can also be seen as a routine Identical torb_usascii_str_new, except it assumes the passed pointer is a pointer to a C string. - rb_
utf8_ ⚠str_ new_ static - Identical to
rb_str_new_static, except it generates a string of “UTF-8” encoding instead of “binary”. It can also be seen as a routine identical torb_utf8_str_new, except it takes a C string literal. - rb_
uv_ ⚠to_ utf8 - Encodes a Unicode codepoint into its UTF-8 representation.
- rb_
varargs_ ⚠bad_ length
- rb_
vrescue2 ⚠ - Identical to
rb_rescue2, except it takesva_listinstead of variadic number of arguments. This is exposed to 3rd parties because inline functions use it. Basically you don’t have to bother. - rb_
vsprintf ⚠ - Identical to
rb_sprintf, except it takes ava_list. - rb_
wait_ ⚠for_ single_ fd Deprecated - Blocks until the passed file descriptor is ready for the passed events.
- rb_
waitpid ⚠ - Waits for a process, with releasing GVL.
- rb_warn⚠
- Identical to
rb_warning, except it reports always regardless of runtime-Wflag. - rb_
warning ⚠ - Issues a warning.
- rb_
write_ ⚠error - Writes the given error message to somewhere applicable. On Windows it goes to the console. On POSIX environments it goes to the standard error.
- rb_
write_ ⚠error2 - Identical to
rb_write_error, except it additionally takes the message’s length. Necessary when you want to handle wide characters. - rb_
yield ⚠ - Yields the block. In Ruby there is a concept called a block. You can pass one to a method. In a method, when called with a block, you can yield it using this function.
- rb_
yield_ ⚠block - Pass a passed block.
- rb_
yield_ ⚠splat - Identical to
rb_yield_values, except it splats an array to generate the list of parameters. - rb_
yield_ ⚠splat_ kw - Identical to
rb_yield_splat, except you can specify how to handle the last element of the given array. - rb_
yield_ ⚠values - Identical to
rb_yield, except it takes variadic number of parameters and pass them to the block. - rb_
yield_ ⚠values2 - Identical to
rb_yield_values, except it takes the parameters as a C array instead of variadic arguments. - rb_
yield_ ⚠values_ kw - Identical to
rb_yield_values2, except you can specify how to handle the last element of the given array. - ruby_
brace_ ⚠glob - Identical to ruby_glob(), @shyouhei currently suspects. Historically you had to call this function instead of ruby_glob() if the pattern included “{x,y,…}” syntax. However since commit 0f63d961169989a7f6dcf7c0487fe29da, ruby_glob() also supports that syntax. It seems as of writing these two functions provide basically the same functionality in a different implementation. Is this analysis right? Correct me! :FIXME:
- ruby_
cleanup ⚠ - Destructs the VM.
- ruby_
default_ ⚠signal - Pretends as if there was no custom signal handler. This function sets the signal action to SIG_DFL, then kills itself.
- ruby_
each_ ⚠words - Scans the passed string, with calling the callback function every time it
encounters a “word”. A word here is a series of characters separated by
either a space (of IEEE 1003.1 section 7.3.1.1), or a
','. - ruby_
enc_ ⚠find_ basename - Our own encoding-aware version of
basename(3). Normally, this function returns the last path component of the given name. However in case the passed name ends with a path separator, it returns the name of the directory, not the last (empty) component. Also if the passed name is a root directory, it returns that root directory. Note however that Windows filesystem have drive letters, which this function does not return. - ruby_
enc_ ⚠find_ extname - Our own encoding-aware version of
extname. This function first appliesrb_enc_path_last_separatorto the passed name and only concerns its return value (ignores any parent directories). This function returns complicated results: - ruby_
exec_ ⚠node - Identical to ruby_run_node(), except it returns an opaque execution status.
You can pass it to [
rb_cleanup]. - ruby_
executable_ ⚠node - Checks the return value of ruby_options().
- ruby_
finalize ⚠ - Runs the VM finalization processes.
- ruby_
getcwd ⚠ - This is our own version of
getcwd(3)that uses ruby_xmalloc() instead of system malloc (benefits our GC). - ruby_
glob ⚠ - Identical to
rb_glob, except it returns opaque exception states instead of raising exceptions. - ruby_
incpush ⚠ - Appends the given path to the end of the load path.
- ruby_
init ⚠ - Calls ruby_setup() and check error.
- ruby_
init_ ⚠loadpath - Sets up
$LOAD_PATH. - ruby_
init_ ⚠stack - Set stack bottom of Ruby implementation.
- ruby_
malloc_ ⚠size_ overflow
- ruby_
native_ ⚠thread_ p - Queries if the thread which calls this function is a ruby’s thread.
“Ruby’s” in this context is a thread created using one of our APIs like
rb_thread_create. There are distinctions between ruby’s and other threads. For instance calling ruby methods are allowed only from inside of a ruby’s thread. - ruby_
options ⚠ - Processes command line arguments and compiles the Ruby source to execute.
- ruby_
posix_ ⚠signal
- ruby_
process_ ⚠options - Identical to ruby_options(), except it raises ruby-level exceptions on failure.
- ruby_
prog_ ⚠init - Defines built-in variables
- ruby_
run_ ⚠node - Runs the given compiled source and exits this process.
- ruby_
scan_ ⚠digits - Scans the passed string, assuming the string is a textual representation of an integer. Stops when encountering something non-digit for the passed base.
- ruby_
scan_ ⚠hex - Interprets the passed string a hexadecimal unsigned integer. Stops when encounters something not understood.
- ruby_
scan_ ⚠oct - Interprets the passed string as an octal unsigned integer. Stops when encounters something not understood.
- ruby_
script ⚠ - Sets the current script name to this value.
- ruby_
set_ ⚠argv - Sets argv that ruby understands. Your program might have its own command line parameters etc. Handle them as you wish, and pass remaining parts of argv here.
- ruby_
set_ ⚠script_ name - Identical to ruby_script(), except it takes the name as a Ruby String instance.
- ruby_
setenv ⚠ - Sets an environment variable. In case of POSIX this is a wrapper of
setenv(3). But there are systems which lack one. We try hard emulating. - ruby_
setup ⚠ - Initializes the VM and builtin libraries.
- ruby_
show_ ⚠copyright - Prints the copyright notice of the CRuby interpreter to stdout.
- ruby_
show_ ⚠version - Prints the version information of the CRuby interpreter to stdout.
- ruby_
sig_ ⚠finalize - Clear signal handlers.
- ruby_
signal_ ⚠name - Queries the name of the signal. It returns for instance
"KILL"for SIGKILL. - ruby_
snprintf ⚠ - Our own locale-insensitive version of
snprintf(3). It can also be seen as a routine identical torb_sprintf, except it writes back to the passed buffer instead of allocating a new Ruby object. - ruby_
stack_ ⚠check - Checks for stack overflow.
- ruby_
stack_ ⚠length - Queries what Ruby thinks is the machine stack. Ruby manages a region of memory. It calls that area the “machine stack”. By calling this function, in spite of its name, you can obtain both one end of the stack and its length at once. Which means you can know the entire region.
- ruby_
stop ⚠ - Calls ruby_cleanup() and exits the process.
- ruby_
strdup ⚠ - This is our own version of
strdup(3)that uses ruby_xmalloc() instead of system malloc (benefits our GC). - ruby_
strtod ⚠ - Our own locale-insensitive version of
strtod(3). The conversion is done as if the current locale is set to the “C” locale, no matter actual runtime locale settings. - ruby_
strtoul ⚠ - Our own locale-insensitive version of
strtoul(3). The conversion is done as if the current locale is set to the “C” locale, no matter actual runtime locale settings. - ruby_
sysinit ⚠ - Initializes the process for libruby.
- ruby_
unsetenv ⚠ - Deletes the passed environment variable, if any.
- ruby_
vm_ ⚠at_ exit - ruby_vm_at_exit registers a function func to be invoked when a VM passed away. Functions registered this way runs in reverse order of registration, just like END {} block does. The difference is its timing to be triggered. ruby_vm_at_exit functions runs when a VM passed away, while END {} blocks runs just before a VM is passing away.
- ruby_
vm_ ⚠destruct - Destructs the passed VM. You don’t have to call this API directly now, because there is no way to create one. There is only one VM at one time. ruby_stop() should just suffice.
- ruby_
vsnprintf ⚠ - Identical to ruby_snprintf(), except it takes a
va_list. It can also be seen as a routine identical torb_vsprintf, except it writes back to the passed buffer instead of allocating a new Ruby object. - ruby_
xcalloc ⚠ - Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance. It can also be seen as a routine identical to ruby_xmalloc(), except it calls calloc() instead of malloc().
- ruby_
xfree ⚠ - Deallocates a storage instance.
- ruby_
xmalloc ⚠ - Allocates a storage instance. It is largely the same as system malloc(), except:
- ruby_
xmalloc2 ⚠ - Identical to ruby_xmalloc(), except it allocates
nelems*elemsizbytes. This is needed because the multiplication could integer overflow. On such situations Ruby does not try to allocate at all but raises Ruby level exceptions instead. If there is no integer overflow the behaviour is exactly the same asruby_xmalloc(nelems*elemsiz). - ruby_
xrealloc ⚠ - Resize the storage instance.
- ruby_
xrealloc2 ⚠ - Identical to ruby_xrealloc(), except it resizes the given storage instance
to
newelems*newsizbytes. This is needed because the multiplication could integer overflow. On such situations Ruby does not try to touch the contents of argument pointer at all but raises Ruby level exceptions instead. If there is no integer overflow the behaviour is exactly the same asruby_xrealloc(ptr,nelems*elemsiz). - setproctitle⚠
Type Aliases§
- FILE
- ID
- Onig
Apply AllCase Fold Func
- Onig
Case Fold Type
- Onig
Code Point
- Onig
Ctype
- Onig
Distance
- Onig
Encoding
- Onig
Encoding Type
- Onig
Option Type
- Onig
Position
- Onig
Regex
- Onig
Regex Type
- Onig
Region
- OnigU
Char
- Onig
Warn Func
- RUBY_
DATA_ FUNC - This is the type of callbacks registered to ::RData. The argument is the
datafield. - Regexp
- @old{re_pattern_buffer}
- VALUE
- _IO_
lock_ t
- __
blkcnt_ t
- __
blksize_ t
- __
builtin_ va_ list
- __dev_t
- __
fd_ mask
- __gid_t
- __ino_t
- __
mode_ t
- __
nlink_ t
- __
off64_ t
- __off_t
- __pid_t
- __
pthread_ list_ t
- __
ssize_ t
- __
suseconds_ t
- __
syscall_ slong_ t
- __
time_ t
- __uid_t
- mode_t
- off_t
- pid_t
- rb_
alloc_ func_ t - This is the type of functions that ruby calls when trying to allocate an
object. It is sometimes necessary to allocate extra memory regions for an
object. When you define a class that uses ::RTypedData, it is typically the
case. On such situations define a function of this type and pass it to
rb_define_alloc_func. - rb_
atomic_ t
- rb_
block_ call_ func - This is the type of a function that the interpreter expect for C-backended
blocks. Blocks are often written in Ruby. But C extensions might want to
have their own blocks. In order to do so authors have to create a separate
C function of this type, and pass its pointer to
rb_block_call. - rb_
block_ call_ func_ t - Shorthand type that represents an iterator-written-in-C function pointer.
- rb_
blocking_ function_ t
- rb_
data_ type_ t - This is the struct that holds necessary info for a struct. It roughly
resembles a Ruby level class; multiple objects can share a ::
rb_data_type_tinstance. - rb_
debug_ inspector_ func_ t - Type of the callback function passed to
rb_debug_inspector_open. Inspection shall happen only inside of them. The passed pointers gets invalidated once after the callback returns. - rb_
debug_ inspector_ t - Opaque struct representing a debug inspector.
- rb_
encoding - The type of encoding. Our design here is we take Oniguruma/Onigmo’s multilingualisation schema as our base data structure.
- rb_
enumerator_ size_ func - This is the type of functions that
rb_enumeratorize_with_sizeexpects. In theory an enumerator can have indefinite number of elements, but in practice it often is the case we can compute the size of an enumerator beforehand. If your enumerator has such property, supply a function that calculates such values. - rb_
event_ flag_ t - Represents event(s). As the name implies events are bit flags.
- rb_
event_ hook_ func_ t - Type of event hooks. When an event happens registered functions are kicked with appropriate parameters.
- rb_
gvar_ getter_ t - Type that represents a global variable getter function.
- rb_
gvar_ marker_ t - Type that represents a global variable marker function.
- rb_
gvar_ setter_ t - Type that represents a global variable setter function.
- rb_
hash_ update_ func - Type of callback functions to pass to
rb_hash_update_by. - rb_
internal_ thread_ event_ callback
- rb_
internal_ thread_ event_ data_ t - All Thread events
- rb_
internal_ thread_ event_ hook_ t
- rb_
memory_ view_ available_ p_ func_ t - Type of function of ::
rb_memory_view_entry_t::available_p_func. - rb_
memory_ view_ entry_ t - Operations applied to a specific kind of a memory view.
- rb_
memory_ view_ get_ func_ t - Type of function of ::
rb_memory_view_entry_t::get_func. - rb_
memory_ view_ release_ func_ t - Type of function of ::
rb_memory_view_entry_t::release_func. - rb_
postponed_ job_ func_ t - Type of postponed jobs.
- rb_
ractor_ local_ key_ t - (Opaque) struct that holds a ractor-local storage key.
- rb_
random_ data_ type_ t - This is the type of ::[
rb_random_data_type]. - rb_
random_ get_ bytes_ func - This is the type of functions called from your object’s
#bytesmethod. - rb_
random_ get_ int32_ func - This is the type of functions called from your object’s
#randmethod. - rb_
random_ get_ real_ func - This is the type of functions called from your object’s
#randmethod. - rb_
random_ init_ func - This is the type of functions called when your random object is initialised. Passed buffer is the seed object basically. But in Ruby a number can be really big. This type of functions accept such big integers as a series of machine words.
- rb_
random_ init_ int32_ func - This is the type of functions called when your random object is initialised. Passed data is the seed integer.
- rb_
random_ t - Base components of the random interface.
- rb_
trace_ arg_ t - Type that represents a specific trace event. Roughly resembles the
tracepoint object that is passed to the block of
TracePoint.new: - rb_
unblock_ function_ t - This is the type of UBFs. An UBF is a function that unblocks a blocking
region. For instance when a thread is blocking due to
pselect(3posix), it is highly expected thatpthread_kill(3posix)can interrupt the system call and the thread could revive. Or when a thread is blocking due towaitpid(3posix), it is highly expected that killing the waited process should suffice. An UBF is a function that does such things. Designing your own UBF needs deep understanding of why your blocking region blocks, how threads work in ruby, and a matter of luck. It often is the case you simply cannot cancel something that had already begun. - regex_t
- ruby_
glob_ func - Type of a glob callback function. Called every time glob scans a path.
- ruby_
vm_ t - The opaque struct to hold VM internals. Its fields are intentionally hidden from extension libraries because it changes drastically time to time.
- size_t
- ssize_t
- st_
check_ for_ sizeof_ st_ index_ t
- st_
compare_ func
- st_
data_ t
- st_
foreach_ callback_ func
- st_
foreach_ check_ callback_ func
- st_
hash_ func
- st_
index_ t
- st_
update_ callback_ func
- time_t
- va_list
Unions§
- RArray__
bindgen_ ty_ 1 - Array’s specific fields.
- RArray__
bindgen_ ty_ 1__ bindgen_ ty_ 1__ bindgen_ ty_ 1 - Auxiliary info.
- RObject__
bindgen_ ty_ 1 - Object’s specific fields.
- RString__
bindgen_ ty_ 1 - String’s specific fields.
- RString__
bindgen_ ty_ 1__ bindgen_ ty_ 1__ bindgen_ ty_ 1 - Auxiliary info.
- __
atomic_ wide_ counter
- _bindgen_
ty_ 17
- _bindgen_
ty_ 18
- _bindgen_
ty_ 19
- _bindgen_
ty_ 20
- _bindgen_
ty_ 21
- _bindgen_
ty_ 22
- _bindgen_
ty_ 23