15 #define RUBY_INTERN_H 1
17 #if defined(__cplusplus)
26 #include RUBY_EXTCONF_H
29 #ifdef HAVE_STDARG_PROTOTYPES
44 #define UNLIMITED_ARGUMENTS (-1)
90 #define rb_ary_new2 rb_ary_new_capa
91 #define rb_ary_new3 rb_ary_new_from_args
92 #define rb_ary_new4 rb_ary_new_from_values
107 #define rb_big2int(x) rb_big2long(x)
109 #define rb_big2uint(x) rb_big2ulong(x)
112 LONG_LONG rb_big2ll(
VALUE);
113 unsigned LONG_LONG rb_big2ull(
VALUE);
142 #define INTEGER_PACK_MSWORD_FIRST 0x01
143 #define INTEGER_PACK_LSWORD_FIRST 0x02
144 #define INTEGER_PACK_MSBYTE_FIRST 0x10
145 #define INTEGER_PACK_LSBYTE_FIRST 0x20
146 #define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
147 #define INTEGER_PACK_2COMP 0x80
148 #define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
150 #define INTEGER_PACK_FORCE_BIGNUM 0x100
151 #define INTEGER_PACK_NEGATIVE 0x200
153 #define INTEGER_PACK_LITTLE_ENDIAN \
154 (INTEGER_PACK_LSWORD_FIRST | \
155 INTEGER_PACK_LSBYTE_FIRST)
156 #define INTEGER_PACK_BIG_ENDIAN \
157 (INTEGER_PACK_MSWORD_FIRST | \
158 INTEGER_PACK_MSBYTE_FIRST)
167 #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
168 #define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
170 #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
171 #define rb_rational_new2(x,y) rb_rational_new((x), (y))
173 #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
174 #define rb_Rational2(x,y) rb_Rational((x), (y))
179 #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
180 #define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
182 #define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
183 #define rb_complex_new2(x,y) rb_complex_new((x), (y))
186 #define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
187 #define rb_Complex2(x,y) rb_Complex((x), (y))
234 #define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
235 rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
237 #define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
238 if (!rb_block_given_p()) \
239 return rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()),\
240 (argc), (argv), (size_fn)); \
242 #define RETURN_ENUMERATOR(obj, argc, argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
247 #define rb_exc_new2 rb_exc_new_cstr
248 #define rb_exc_new3 rb_exc_new_str
261 #define rb_check_frozen_internal(obj) do { \
262 VALUE frozen_obj = (obj); \
263 if (OBJ_FROZEN(frozen_obj)) { \
264 rb_error_frozen(rb_obj_classname(frozen_obj)); \
267 #define rb_check_trusted_internal(obj) ((void) 0)
269 #define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
270 #define rb_check_trusted(obj) __extension__({rb_check_trusted_internal(obj);})
277 #define rb_check_frozen(obj) rb_check_frozen_inline(obj)
283 #define rb_check_trusted(obj) rb_check_trusted_inline(obj)
287 #define OBJ_INIT_COPY(obj, orig) \
288 ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
296 #define rb_check_arity rb_check_arity
304 #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
320 #define rb_fd_ptr(f) ((f)->fdset)
321 #define rb_fd_max(f) ((f)->maxfd)
323 #elif defined(_WIN32)
332 #define rb_fd_zero(f) ((f)->fdset->fd_count = 0)
334 #define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
335 #define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
336 #define rb_fd_copy(d, s, n) rb_w32_fd_copy((d), (s), (n))
338 #define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
340 #define rb_fd_select(n, rfds, wfds, efds, timeout) rb_w32_select((n), (rfds) ? ((rb_fdset_t*)(rfds))->fdset : NULL, (wfds) ? ((rb_fdset_t*)(wfds))->fdset : NULL, (efds) ? ((rb_fdset_t*)(efds))->fdset: NULL, (timeout))
341 #define rb_fd_resize(n, f) ((void)(f))
343 #define rb_fd_ptr(f) ((f)->fdset)
344 #define rb_fd_max(f) ((f)->fdset->fd_count)
349 #define rb_fd_zero(f) FD_ZERO(f)
350 #define rb_fd_set(n, f) FD_SET((n), (f))
351 #define rb_fd_clr(n, f) FD_CLR((n), (f))
352 #define rb_fd_isset(n, f) FD_ISSET((n), (f))
353 #define rb_fd_copy(d, s, n) (*(d) = *(s))
354 #define rb_fd_dup(d, s) (*(d) = *(s))
355 #define rb_fd_resize(n, f) ((void)(f))
356 #define rb_fd_ptr(f) (f)
357 #define rb_fd_init(f) FD_ZERO(f)
358 #define rb_fd_init_copy(d, s) (*(d) = *(s))
359 #define rb_fd_term(f) ((void)(f))
360 #define rb_fd_max(f) FD_SETSIZE
361 #define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout))
371 #define rb_disable_super(klass, name) ((void)0)
372 #define rb_enable_super(klass, name) ((void)0)
373 #define HAVE_RB_DEFINE_ALLOC_FUNC 1
515 #define rb_defout rb_stdout
550 #define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
559 #define RB_NUM_COERCE_FUNCS_NEED_OPID 1
639 DEPRECATED(rb_pid_t rb_fork_err(
int*,
int (*)(
void*,
char*,
size_t),
void*,
VALUE,
char*,
size_t));
662 #define rb_memcmp memcmp
672 #define HAVE_RB_REG_NEW_STR 1
681 #define rb_argv rb_get_argv()
689 #define posix_signal ruby_posix_signal
737 #define rb_str_dup_frozen rb_str_new_frozen
758 #define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
759 #define rb_hash_uint(h, i) st_hash_uint((h), (i))
760 #define rb_hash_end(h) st_hash_end(h)
783 #if defined(__GNUC__) && !defined(__PCC__)
784 #define rb_str_new_cstr(str) __extension__ ( \
786 (__builtin_constant_p(str)) ? \
787 rb_str_new((str), (long)strlen(str)) : \
788 rb_str_new_cstr(str); \
790 #define rb_tainted_str_new_cstr(str) __extension__ ( \
792 (__builtin_constant_p(str)) ? \
793 rb_tainted_str_new((str), (long)strlen(str)) : \
794 rb_tainted_str_new_cstr(str); \
796 #define rb_usascii_str_new_cstr(str) __extension__ ( \
798 (__builtin_constant_p(str)) ? \
799 rb_usascii_str_new((str), (long)strlen(str)) : \
800 rb_usascii_str_new_cstr(str); \
802 #define rb_external_str_new_cstr(str) __extension__ ( \
804 (__builtin_constant_p(str)) ? \
805 rb_external_str_new((str), (long)strlen(str)) : \
806 rb_external_str_new_cstr(str); \
808 #define rb_locale_str_new_cstr(str) __extension__ ( \
810 (__builtin_constant_p(str)) ? \
811 rb_locale_str_new((str), (long)strlen(str)) : \
812 rb_locale_str_new_cstr(str); \
814 #define rb_str_buf_new_cstr(str) __extension__ ( \
816 (__builtin_constant_p(str)) ? \
817 rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
818 (str), (long)strlen(str)) : \
819 rb_str_buf_new_cstr(str); \
821 #define rb_str_buf_cat2(str, ptr) __extension__ ( \
823 (__builtin_constant_p(ptr)) ? \
824 rb_str_buf_cat((str), (ptr), (long)strlen(ptr)) : \
825 rb_str_buf_cat2((str), (ptr)); \
827 #define rb_str_cat2(str, ptr) __extension__ ( \
829 (__builtin_constant_p(ptr)) ? \
830 rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
831 rb_str_cat2((str), (ptr)); \
833 #define rb_exc_new_cstr(klass, ptr) __extension__ ( \
835 (__builtin_constant_p(ptr)) ? \
836 rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
837 rb_exc_new_cstr((klass), (ptr)); \
840 #define rb_str_new2 rb_str_new_cstr
841 #define rb_str_new3 rb_str_new_shared
842 #define rb_str_new4 rb_str_new_frozen
843 #define rb_str_new5 rb_str_new_with_class
844 #define rb_tainted_str_new2 rb_tainted_str_new_cstr
845 #define rb_str_buf_new2 rb_str_buf_new_cstr
846 #define rb_usascii_str_new2 rb_usascii_str_new_cstr
872 #define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
873 #define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
952 #if defined(__cplusplus)
VALUE rb_reg_match_last(VALUE)
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
VALUE rb_big_modulo(VALUE x, VALUE y)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
VALUE rb_mutex_locked_p(VALUE mutex)
VALUE rb_const_list(void *)
int rb_bigzero_p(VALUE x)
VALUE rb_const_get_at(VALUE, ID)
VALUE rb_str_associated(VALUE)
VALUE rb_gc_disable(void)
VALUE rb_ary_unshift(VALUE ary, VALUE item)
VALUE rb_big_clone(VALUE x)
int rb_is_attrset_id(ID id)
VALUE rb_define_module_id_under(VALUE outer, ID id)
VALUE rb_exc_new(VALUE etype, const char *ptr, long len)
VALUE rb_time_num_new(VALUE, VALUE)
VALUE rb_reg_last_match(VALUE)
VALUE rb_str_times(VALUE, VALUE)
VALUE rb_struct_iv_get(VALUE c, const char *name)
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
VALUE rb_thread_main(void)
VALUE rb_f_trace_var(int, VALUE *)
VALUE rb_str_ellipsize(VALUE, long)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
VALUE rb_ary_pop(VALUE ary)
VALUE rb_mod_include_p(VALUE mod, VALUE mod2)
VALUE rb_ary_entry(VALUE ary, long offset)
void rb_set_class_path(VALUE, VALUE, const char *)
VALUE rb_ary_new_capa(long capa)
VALUE rb_obj_instance_exec(int, VALUE *, VALUE)
int rb_is_absolute_path(const char *)
VALUE rb_block_lambda(void)
void rb_compile_error(const char *file, int line, const char *fmt,...)
VALUE rb_require_safe(VALUE, int)
void rb_match_busy(VALUE)
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
VALUE rb_str_resurrect(VALUE str)
void rb_check_inheritable(VALUE super)
Ensures a class can be derived from super.
void rb_mark_tbl(struct st_table *)
VALUE(* rb_alloc_func_t)(VALUE)
#define rb_gc_mark_locations(start, end)
VALUE rb_struct_members(VALUE)
VALUE rb_ary_freeze(VALUE ary)
VALUE rb_make_exception(int argc, VALUE *argv)
void rb_thread_wait_fd(int)
VALUE rb_class_new_instance(int, VALUE *, VALUE)
#define rb_hash_uint32(h, i)
VALUE rb_f_notimplement(int argc, VALUE *argv, VALUE obj)
void rb_thread_atfork_before_exec(void)
VALUE rb_str_buf_cat_ascii(VALUE, const char *)
void * rb_mod_const_at(VALUE, void *)
VALUE rb_mod_module_eval(int, VALUE *, VALUE)
VALUE rb_eval_cmd(VALUE, VALUE, int)
VALUE rb_last_status_get(void)
void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
static int max(int a, int b)
VALUE rb_big2ulong(VALUE x)
#define rb_check_trusted(obj)
VALUE rb_str_tmp_new(long)
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
VALUE rb_str_buf_append(VALUE, VALUE)
VALUE rb_blocking_function_t(void *)
VALUE rb_io_puts(int, VALUE *, VALUE)
VALUE rb_ary_sort(VALUE ary)
VALUE rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE rb_ary_subseq(VALUE ary, long beg, long len)
VALUE rb_io_ungetc(VALUE, VALUE)
VALUE rb_rational_new(VALUE, VALUE)
VALUE rb_struct_define(const char *,...)
VALUE rb_num_coerce_relop(VALUE, VALUE, ID)
VALUE rb_define_class_id_under(VALUE outer, ID id, VALUE super)
Defines a class under the namespace of outer.
VALUE rb_ary_delete_at(VALUE ary, long pos)
double rb_cstr_to_dbl(const char *, int)
SSL_METHOD *(* func)(void)
VALUE rb_dbl_cmp(double, double)
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
VALUE rb_const_get(VALUE, ID)
VALUE rb_obj_remove_instance_variable(VALUE, VALUE)
int rb_str_cmp(VALUE, VALUE)
void rb_syswait(rb_pid_t pid)
VALUE rb_file_s_absolute_path(int, VALUE *)
VALUE rb_external_str_new_cstr(const char *)
void rb_gc_force_recycle(VALUE)
VALUE rb_time_nano_new(time_t, long)
void rb_exec_end_proc(void)
void rb_error_frozen(const char *what)
double rb_genrand_real(void)
VALUE rb_str_locktmp(VALUE)
#define rb_check_frozen(obj)
VALUE rb_ary_shift(VALUE ary)
VALUE rb_mod_ancestors(VALUE mod)
VALUE rb_ary_each(VALUE array)
VALUE rb_big_eql(VALUE x, VALUE y)
VALUE rb_big_plus(VALUE x, VALUE y)
VALUE rb_str_subseq(VALUE, long, long)
VALUE rb_complex_polar(VALUE x, VALUE y)
VALUE rb_exc_new_str(VALUE etype, VALUE str)
VALUE rb_hash_lookup2(VALUE, VALUE, VALUE)
VALUE rb_str_new_cstr(const char *)
#define rb_check_frozen_internal(obj)
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
ID rb_frame_this_func(void)
VALUE rb_obj_freeze(VALUE)
VALUE rb_io_printf(int, VALUE *, VALUE)
long rb_str_strlen(VALUE)
VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE)
void rb_mem_clear(register VALUE *mem, register long size)
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
VALUE rb_mod_remove_cvar(VALUE, VALUE)
void rb_update_max_fd(int fd)
int rb_find_file_ext_safe(VALUE *, const char *const *, int)
VALUE rb_ary_push(VALUE ary, VALUE item)
int rb_proc_exec_n(int argc, VALUE *argv, const char *prog)
#define PRINTF_ARGS(decl, string_index, first_to_check)
VALUE rb_mutex_lock(VALUE mutex)
VALUE rb_singleton_class_clone(VALUE obj)
VALUE rb_hash_freeze(VALUE)
int rb_method_boundp(VALUE, ID, int)
VALUE rb_ary_rassoc(VALUE ary, VALUE value)
VALUE rb_fiber_yield(int argc, VALUE *argv)
VALUE rb_mod_init_copy(VALUE clone, VALUE orig)
VALUE rb_ary_tmp_new(long capa)
void rb_remove_method_id(VALUE, ID)
void rb_lastline_set(VALUE)
void rb_gc_copy_finalizer(VALUE, VALUE)
VALUE rb_ary_shared_with_p(VALUE ary1, VALUE ary2)
int rb_reg_options(VALUE)
int rb_str_comparable(VALUE, VALUE)
VALUE rb_str_buf_cat2(VALUE, const char *)
VALUE rb_obj_tainted(VALUE)
VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE)
VALUE rb_protect(VALUE(*proc)(VALUE), VALUE data, int *state)
VALUE rb_find_file_safe(VALUE, int)
VALUE rb_fiber_alive_p(VALUE fibval)
VALUE rb_autoload_p(VALUE, ID)
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
VALUE rb_struct_new(VALUE,...)
VALUE rb_proc_new(VALUE(*)(ANYARGS), VALUE)
VALUE rb_proc_lambda_p(VALUE)
VALUE rb_fiber_current(void)
VALUE rb_obj_class(VALUE)
VALUE rb_ary_clear(VALUE ary)
VALUE rb_marshal_dump(VALUE, VALUE)
VALUE rb_str_encode_ospath(VALUE)
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
VALUE rb_class_name(VALUE)
VALUE rb_external_str_new(const char *, long)
int rb_exec(const struct rb_exec_arg *e)
rb_pid_t rb_spawn(int, VALUE *)
RUBY_EXTERN VALUE rb_output_rs
VALUE rb_cvar_defined(VALUE, ID)
VALUE rb_struct_alloc(VALUE, VALUE)
void rb_thread_sleep_deadly(void)
void rb_mark_set(struct st_table *)
VALUE rb_obj_untrusted(VALUE)
#define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn)
VALUE rb_locale_str_new(const char *, long)
double rb_big2dbl(VALUE x)
VALUE rb_reg_nth_match(int, VALUE)
void rb_define_protected_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
void rb_must_asciicompat(VALUE)
int rb_cloexec_dup(int oldfd)
VALUE rb_lastline_get(void)
VALUE rb_str_unlocktmp(VALUE)
void rb_big_resize(VALUE big, long len)
VALUE rb_ary_rotate(VALUE ary, long cnt)
void * rb_load_file_str(VALUE)
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
void * rb_load_file(const char *)
VALUE rb_random_bytes(VALUE rnd, long n)
VALUE rb_big_new(long len, int sign)
VALUE rb_str_substr(VALUE, long, long)
int rb_exec_err(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
RUBY_EXTERN VALUE rb_argv0
VALUE rb_path2class(const char *)
VALUE rb_path_to_class(VALUE)
VALUE rb_class_path(VALUE)
void rb_loaderror(const char *fmt,...)
int rb_cmpint(VALUE val, VALUE a, VALUE b)
VALUE rb_sym_all_symbols(void)
VALUE rb_str_new_frozen(VALUE)
VALUE rb_reg_match_post(VALUE)
VALUE rb_method_call_with_block(int, VALUE *, VALUE, VALUE)
int rb_reg_backref_number(VALUE match, VALUE backref)
VALUE rb_f_sprintf(int, const VALUE *)
VALUE rb_ivar_get(VALUE, ID)
VALUE rb_str_concat(VALUE, VALUE)
VALUE rb_str_replace(VALUE, VALUE)
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
void rb_str_modify_expand(VALUE, long)
void rb_fd_fix_cloexec(int fd)
void rb_hash_foreach(VALUE, int(*)(ANYARGS), VALUE)
VALUE rb_str_equal(VALUE str1, VALUE str2)
VALUE rb_file_expand_path(VALUE, VALUE)
int rb_env_path_tainted(void)
void rb_name_error_str(VALUE str, const char *fmt,...)
VALUE rb_hash_delete(VALUE, VALUE)
VALUE rb_flt_rationalize_with_prec(VALUE, VALUE)
void rb_copy_generic_ivar(VALUE, VALUE)
VALUE rb_autoload_load(VALUE, ID)
VALUE rb_cvar_get(VALUE, ID)
void rb_name_error(ID id, const char *fmt,...)
st_index_t rb_hash_start(st_index_t)
#define rb_fd_isset(n, f)
void rb_loaderror_with_path(VALUE path, const char *fmt,...)
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
int rb_feature_provided(const char *, const char **)
VALUE rb_hash_fetch(VALUE, VALUE)
VALUE rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
void st_foreach_safe(struct st_table *, int(*)(ANYARGS), st_data_t)
void rb_exc_raise(VALUE mesg)
int rb_absint_singlebit_p(VALUE val)
VALUE rb_reg_new_str(VALUE, int)
VALUE rb_rational_raw(VALUE, VALUE)
VALUE rb_usascii_str_new(const char *, long)
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
int rb_is_const_id(ID id)
VALUE rb_obj_instance_eval(int, VALUE *, VALUE)
int rb_is_instance_id(ID id)
VALUE rb_ary_assoc(VALUE ary, VALUE key)
unsigned long rb_genrand_ulong_limited(unsigned long i)
sighandler_t posix_signal(int signum, sighandler_t handler)
VALUE rb_big2ulong_pack(VALUE x)
VALUE rb_f_untrace_var(int, VALUE *)
VALUE rb_find_file(VALUE)
VALUE rb_big_divmod(VALUE x, VALUE y)
VALUE rb_file_dirname(VALUE fname)
VALUE rb_binding_new(void)
void rb_str_update(VALUE, long, long, VALUE)
void rb_provide(const char *)
VALUE rb_check_to_float(VALUE)
VALUE rb_obj_is_instance_of(VALUE, VALUE)
VALUE rb_block_proc(void)
VALUE rb_class_inherited(VALUE super, VALUE klass)
Calls Class::inherited.
VALUE rb_fiber_resume(VALUE fibval, int argc, VALUE *argv)
void rb_ary_free(VALUE ary)
VALUE rb_obj_untrust(VALUE)
VALUE rb_dbl2big(double d)
VALUE rb_big_eq(VALUE x, VALUE y)
void rb_compile_error_append(const char *fmt,...)
void rb_compile_error_with_enc(const char *file, int line, void *enc, const char *fmt,...)
VALUE rb_Rational(VALUE, VALUE)
long rb_str_offset(VALUE, long)
size_t rb_str_capacity(VALUE)
VALUE rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
void rb_gc_finalize_deferred(void)
double rb_random_real(VALUE rnd)
static void rb_check_trusted_inline(VALUE obj)
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
VALUE rb_file_open(const char *, const char *)
VALUE rb_reg_new(const char *, long, int)
VALUE rb_detach_process(rb_pid_t pid)
VALUE rb_locale_str_new_cstr(const char *)
VALUE rb_random_int(VALUE rnd, VALUE max)
VALUE rb_ary_replace(VALUE copy, VALUE orig)
int rb_run_exec_options_err(const struct rb_exec_arg *e, struct rb_exec_arg *s, char *errmsg, size_t errmsg_buflen)
VALUE rb_big_cmp(VALUE x, VALUE y)
VALUE rb_hash_clear(VALUE)
void rb_define_class_variable(VALUE, const char *, VALUE)
VALUE rb_ary_to_s(VALUE ary)
VALUE rb_str_cat2(VALUE, const char *)
int rb_cloexec_pipe(int fildes[2])
VALUE rb_method_call(int, VALUE *, VALUE)
void rb_w32_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
void rb_str_shared_replace(VALUE, VALUE)
VALUE rb_check_to_integer(VALUE, const char *)
void rb_clear_cache(void)
VALUE rb_ary_new_from_args(long n,...)
void rb_ary_store(VALUE ary, long idx, VALUE val)
VALUE rb_mod_class_variables(int, VALUE *, VALUE)
void rb_backref_set(VALUE)
VALUE rb_define_module_id(ID id)
void rb_last_status_set(int status, rb_pid_t pid)
int rb_thread_alone(void)
VALUE rb_fiber_new(VALUE(*func)(ANYARGS), VALUE obj)
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
double rb_str_to_dbl(VALUE, int)
VALUE rb_struct_define_under(VALUE, const char *,...)
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
VALUE rb_io_print(int, VALUE *, VALUE)
VALUE rb_str_freeze(VALUE)
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t,...)
#define range(low, item, hi)
VALUE rb_check_hash_type(VALUE)
static void rb_check_frozen_inline(VALUE obj)
unsigned char buf[MIME_BUF_SIZE]
void rb_unblock_function_t(void *)
VALUE rb_num_coerce_cmp(VALUE, VALUE, ID)
SIGNED_VALUE rb_big2long(VALUE x)
VALUE rb_str_buf_new_cstr(const char *)
void rb_num_zerodiv(void)
int rb_provided(const char *)
VALUE rb_time_succ(VALUE)
void rb_str_setter(VALUE, ID, VALUE *)
VALUE rb_big2str(VALUE x, int base)
VALUE rb_reg_init_str(VALUE re, VALUE s, int options)
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
VALUE rb_reg_match(VALUE, VALUE)
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
VALUE rb_str_new_shared(VALUE)
VALUE rb_str_buf_cat(VALUE, const char *, long)
VALUE rb_file_absolute_path(VALUE, VALUE)
void rb_thread_polling(void)
VALUE rb_tainted_str_new_cstr(const char *)
VALUE rb_filesystem_str_new(const char *, long)
VALUE rb_struct_s_members(VALUE)
VALUE rb_obj_as_string(VALUE)
VALUE rb_ary_to_ary(VALUE obj)
VALUE rb_file_directory_p(VALUE, VALUE)
VALUE rb_tainted_str_new(const char *, long)
int rb_thread_select(int max, fd_set *read, fd_set *write, fd_set *except, struct timeval *timeout)
VALUE rb_big_minus(VALUE x, VALUE y)
VALUE rb_str_resize(VALUE, long)
VALUE rb_flt_rationalize(VALUE)
VALUE rb_str_format(int, const VALUE *, VALUE)
VALUE rb_obj_clone(VALUE)
VALUE rb_str_scrub(VALUE, VALUE)
VALUE rb_marshal_load(VALUE)
int rb_symname_p(const char *name)
void rb_thread_atfork(void)
VALUE rb_thread_current(void)
void * rb_mod_const_of(VALUE, void *)
VALUE rb_reg_match2(VALUE)
VALUE rb_f_require(VALUE, VALUE)
VALUE rb_range_new(VALUE, VALUE, int)
VALUE rb_sprintf(const char *format,...)
VALUE rb_str_split(VALUE, const char *)
VALUE rb_big_div(VALUE x, VALUE y)
VALUE rb_big_idiv(VALUE x, VALUE y)
VALUE rb_mutex_trylock(VALUE mutex)
int rb_const_defined(VALUE, ID)
VALUE rb_f_exit(int, VALUE *)
VALUE rb_include_class_new(VALUE module, VALUE super)
#define rb_fd_copy(d, s, n)
void rb_ary_modify(VALUE ary)
VALUE rb_ary_delete(VALUE ary, VALUE item)
VALUE rb_io_get_io(VALUE)
#define RUBY_SYMBOL_EXPORT_END
VALUE rb_class_inherited_p(VALUE, VALUE)
int rb_is_local_id(ID id)
VALUE rb_io_ungetbyte(VALUE, VALUE)
VALUE rb_f_global_variables(void)
int rb_uv_to_utf8(char[6], unsigned long)
static int min(int a, int b)
VALUE rb_assoc_new(VALUE car, VALUE cdr)
const char * ruby_signal_name(int)
VALUE rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE(*func)(VALUE, long))
void rb_attr(VALUE, ID, int, int, int)
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
void rb_const_set(VALUE, ID, VALUE)
VALUE rb_file_s_expand_path(int, VALUE *)
unsigned int rb_genrand_int32(void)
VALUE rb_str_inspect(VALUE)
VALUE rb_thread_run(VALUE)
VALUE rb_file_open_str(VALUE, const char *)
VALUE rb_quad_unpack(const char *buf, int signed_p)
VALUE rb_f_kill(int, VALUE *)
VALUE rb_io_ascii8bit_binmode(VALUE)
VALUE rb_obj_untaint(VALUE)
VALUE rb_thread_kill(VALUE)
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
VALUE rb_big_mul(VALUE x, VALUE y)
void rb_clear_method_cache_by_class(VALUE)
void rb_alias(VALUE, ID, ID)
VALUE rb_str_buf_new(long)
int rb_mod_method_arity(VALUE, ID)
VALUE rb_obj_trust(VALUE)
int rb_const_defined_at(VALUE, ID)
VALUE rb_obj_frozen_p(VALUE)
VALUE rb_thread_local_aref(VALUE, ID)
rb_hash_aset(hash, RARRAY_AREF(key_value_pair, 0), RARRAY_AREF(key_value_pair, 1))
VALUE rb_thread_wakeup_alive(VALUE)
#define RUBY_SYMBOL_EXPORT_BEGIN
void rb_undef_alloc_func(VALUE)
VALUE rb_make_metaclass(VALUE obj, VALUE unused)
VALUE rb_io_getbyte(VALUE)
VALUE rb_undefine_finalizer(VALUE)
int rb_is_global_id(ID id)
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
int rb_const_defined_from(VALUE, ID)
VALUE rb_gc_latest_gc_info(VALUE)
VALUE rb_attr_get(VALUE, ID)
VALUE rb_Complex(VALUE x, VALUE y)
void rb_check_copyable(VALUE obj, VALUE orig)
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
VALUE rb_obj_method(VALUE, VALUE)
VALUE rb_define_finalizer(VALUE, VALUE)
VALUE rb_time_new(time_t, long)
void rb_thread_schedule(void)
unsigned int rb_random_int32(VALUE rnd)
int rb_reserved_fd_p(int fd)
VALUE rb_obj_is_method(VALUE)
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
VALUE rb_complex_new(VALUE x, VALUE y)
void rb_jump_tag(int tag)
int rb_find_file_ext(VALUE *, const char *const *)
VALUE rb_mod_constants(int, VALUE *, VALUE)
VALUE rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
void rb_gc_mark_maybe(VALUE)
VALUE rb_ivar_defined(VALUE, ID)
VALUE rb_obj_is_proc(VALUE)
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
VALUE rb_vsprintf(const char *, va_list)
void rb_set_end_proc(void(*func)(VALUE), VALUE data)
VALUE rb_io_binmode(VALUE)
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
void rb_gc_set_params(void)
VALUE rb_obj_taint(VALUE)
struct st_table * rb_generic_ivar_table(VALUE)
void rb_write_error2(const char *, long)
VALUE rb_reg_nth_defined(int, VALUE)
void rb_thread_sleep_forever(void)
int rb_proc_exec(const char *)
int rb_obj_method_arity(VALUE, ID)
VALUE rb_thread_wakeup(VALUE)
VALUE rb_mutex_unlock(VALUE mutex)
VALUE rb_obj_init_copy(VALUE, VALUE)
VALUE rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE rb_ary_resize(VALUE ary, long len)
expands or shrinks ary to len elements.
void rb_str_modify(VALUE)
VALUE rb_str_cat(VALUE, const char *, long)
VALUE rb_str_length(VALUE)
struct timeval rb_time_interval(VALUE num)
void rb_define_method_id(VALUE klass, ID mid, VALUE(*func)(ANYARGS), int argc)
VALUE rb_struct_aref(VALUE, VALUE)
VALUE rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
void rb_singleton_class_attached(VALUE klass, VALUE obj)
Attach a object to a singleton class.
VALUE rb_exc_new_cstr(VALUE etype, const char *s)
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
#define UNLIMITED_ARGUMENTS
VALUE rb_cv_get(VALUE, const char *)
VALUE rb_enum_values_pack(int argc, const VALUE *argv)
RUBY_EXTERN VALUE rb_default_rs
VALUE rb_str2inum(VALUE str, int base)
void rb_thread_wait_for(struct timeval)
VALUE rb_check_to_int(VALUE)
void rb_cvar_set(VALUE, ID, VALUE)
VALUE rb_module_new(void)
VALUE rb_obj_is_kind_of(VALUE, VALUE)
int rb_method_basic_definition_p(VALUE, ID)
long rb_str_sublen(VALUE, long)
VALUE rb_ary_plus(VALUE x, VALUE y)
VALUE rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
VALUE rb_proc_call(VALUE, VALUE)
VALUE rb_big_and(VALUE x, VALUE y)
VALUE rb_num_coerce_bit(VALUE, VALUE, ID)
void rb_str_associate(VALUE, VALUE)
void rb_thread_sleep(int)
st_index_t rb_memhash(const void *ptr, long len)
VALUE rb_mod_remove_const(VALUE, VALUE)
VALUE rb_check_array_type(VALUE ary)
VALUE rb_complex_raw(VALUE x, VALUE y)
VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e)
void rb_error_arity(int argc, int min, int max)
int rb_obj_respond_to(VALUE, ID, int)
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
VALUE rb_struct_initialize(VALUE, VALUE)
#define rb_str_dup_frozen
#define rb_fd_select(n, rfds, wfds, efds, timeout)
st_index_t rb_str_hash(VALUE)
VALUE rb_str_catf(VALUE str, const char *format,...)
VALUE rb_reg_match_pre(VALUE)
VALUE rb_f_exec(int, VALUE *)
VALUE rb_mod_const_missing(VALUE, VALUE)
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *)
VALUE rb_big_norm(VALUE x)
VALUE rb_ary_includes(VALUE ary, VALUE item)
VALUE rb_str_new_with_class(VALUE, const char *, long)
void rb_clear_constant_cache(void)
VALUE rb_struct_aset(VALUE, VALUE, VALUE)
VALUE rb_const_remove(VALUE, ID)
VALUE rb_big_lshift(VALUE x, VALUE y)
void rb_cv_set(VALUE, const char *, VALUE)
VALUE rb_str_vcatf(VALUE, const char *, va_list)
VALUE rb_big2str0(VALUE x, int base, int trim)
VALUE rb_make_backtrace(void)
#define rb_check_trusted_internal(obj)
VALUE rb_class_path_cached(VALUE)
rb_alloc_func_t rb_get_alloc_func(VALUE)
void ruby_default_signal(int)
int rb_respond_to(VALUE, ID)
VALUE rb_ary_sort_bang(VALUE ary)
VALUE rb_big_pow(VALUE x, VALUE y)
int rb_cloexec_dup2(int oldfd, int newfd)
VALUE rb_ary_dup(VALUE ary)
VALUE rb_backref_get(void)
VALUE rb_apply(VALUE, ID, VALUE)
Calls a method.
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
void rb_thread_fd_close(int)
VALUE rb_ary_concat(VALUE x, VALUE y)
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
rb_ivar_set(yielder, id_memo, LONG2NUM(++count))
VALUE rb_ary_join(VALUE ary, VALUE sep)
void rb_set_class_path_string(VALUE, VALUE, VALUE)
VALUE rb_str_new(const char *, long)
int rb_is_class_id(ID id)
void rb_write_error(const char *)
VALUE rb_str_drop_bytes(VALUE, long)
VALUE rb_hash_delete_if(VALUE)
void rb_frozen_class_p(VALUE klass)
VALUE rb_struct_getmember(VALUE, ID)
VALUE rb_range_beg_len(VALUE, long *, long *, long, int)
VALUE rb_thread_stop(void)
VALUE rb_const_get_from(VALUE, ID)
VALUE rb_obj_alloc(VALUE)
VALUE rb_str_intern(VALUE)
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
void rb_gc_call_finalizer_at_exit(void)
int rb_sym_interned_p(VALUE)
VALUE rb_ary_reverse(VALUE ary)
VALUE rb_mod_included_modules(VALUE mod)
int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val)
void rb_error_untrusted(VALUE obj)
VALUE rb_class_real(VALUE)
VALUE rb_define_class_id(ID id, VALUE super)
Defines a new class.
void rb_mark_hash(struct st_table *)
int rb_str_hash_cmp(VALUE, VALUE)
VALUE rb_hash_aref(VALUE, VALUE)
int rb_path_check(const char *)
st_index_t rb_ivar_count(VALUE)
VALUE rb_fix2str(VALUE, int)
VALUE rb_class_get_superclass(VALUE)
char * rb_str_subpos(VALUE, long, long *)
void rb_big_2comp(VALUE x)
void rb_remove_method(VALUE, const char *)
VALUE rb_thread_create(VALUE(*)(ANYARGS), void *)
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
VALUE rb_f_abort(int, VALUE *)
VALUE rb_big_rshift(VALUE x, VALUE y)
VALUE rb_ary_cmp(VALUE ary1, VALUE ary2)
struct timespec rb_time_timespec(VALUE time)
int rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s)
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
VALUE rb_ary_resurrect(VALUE ary)
void rb_name_class(VALUE, ID)
int rb_memcicmp(const void *, const void *, long)
void rb_ivar_foreach(VALUE, int(*)(ANYARGS), st_data_t)
VALUE rb_filesystem_str_new_cstr(const char *)
void rb_exec_arg_fixup(struct rb_exec_arg *e)
void rb_exc_fatal(VALUE mesg)
VALUE rb_num_coerce_bin(VALUE, VALUE, ID)
void rb_load_protect(VALUE, int, int *)
VALUE rb_check_string_type(VALUE)
void rb_free_generic_ivar(VALUE)
VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1, rb_unblock_function_t *ubf, void *data2)
void rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
VALUE rb_class_new(VALUE super)
Creates a new class.
static int match(VALUE str, VALUE pat, VALUE hash, int(*cb)(VALUE, VALUE))
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
void rb_quad_pack(char *buf, VALUE val)
int rb_thread_fd_writable(int)
void rb_invalid_str(const char *str, const char *type)
VALUE rb_class_boot(VALUE super)
A utility function that wraps class_alloc.
#define rb_obj_instance_variables(object)
VALUE rb_big_or(VALUE x, VALUE y)
VALUE rb_convert_type(VALUE, int, const char *, const char *)
VALUE rb_check_convert_type(VALUE, int, const char *, const char *)
VALUE rb_cstr2inum(const char *str, int base)
void rb_reset_random_seed(void)
rb_pid_t rb_spawn_err(int, VALUE *, char *, size_t)
void rb_cmperr(VALUE x, VALUE y)
VALUE rb_usascii_str_new_cstr(const char *)
VALUE rb_io_fdopen(int, int, const char *)
VALUE rb_struct_alloc_noinit(VALUE)
VALUE rb_mod_module_exec(int, VALUE *, VALUE)
VALUE rb_ary_aref(int argc, VALUE *argv, VALUE ary)
VALUE rb_big_xor(VALUE x, VALUE y)
VALUE rb_class_superclass(VALUE)
VALUE rb_io_addstr(VALUE, VALUE)
VALUE rb_str_plus(VALUE, VALUE)
struct st_table * rb_hash_tbl(VALUE)
#define rb_hash_uint(h, i)
struct timeval rb_time_timeval(VALUE)
void rb_alias_variable(ID, ID)
VALUE rb_io_write(VALUE, VALUE)
int rb_thread_interrupted(VALUE thval)
void rb_autoload(VALUE, ID, const char *)
void rb_str_set_len(VALUE, long)