3static VALUE rb_cPathname;
39 s1 = get_strpath(self);
40 s2 = get_strpath(other);
43 e1 = p1 + RSTRING_LEN(s1);
44 e2 = p2 + RSTRING_LEN(s2);
45 while (p1 < e1 && p2 < e2) {
47 c1 = (
unsigned char)*p1++;
48 c2 = (
unsigned char)*p2++;
49 if (c1 ==
'/') c1 =
'\0';
50 if (c2 ==
'/') c2 =
'\0';
75 VALUE str = get_strpath(self);
81 str = rb_funcallv(str, id_sub, argc, argv);
86#include "pathname_builtin.rbinc"
88static void init_ids(
void);
93#ifdef HAVE_RB_EXT_RACTOR_SAFE
115 id_at_path = rb_intern(
"@path");
116 id_sub = rb_intern(
"sub");
#define rb_define_method(klass, mid, func, arity)
Defines klass#mid.
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
int rb_block_given_p(void)
Determines if the current method is given a block.
#define T_STRING
Old name of RUBY_T_STRING.
#define INT2FIX
Old name of RB_INT2FIX.
#define Qnil
Old name of RUBY_Qnil.
VALUE rb_eTypeError
TypeError exception.
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
VALUE rb_obj_class(VALUE obj)
Queries the class of an object.
VALUE rb_obj_is_kind_of(VALUE obj, VALUE klass)
Queries if the given object is an instance (of possibly descendants) of the given class.
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
void rb_ext_ractor_safe(bool flag)
Asserts that the extension library that calls this function is aware of Ractor.
VALUE rb_ivar_get(VALUE obj, ID name)
Identical to rb_iv_get(), except it accepts the name as an ID instead of a C string.
VALUE rb_block_call(VALUE q, ID w, int e, const VALUE *r, type *t, VALUE y)
Call a method with a block.
#define InitVM(ext)
This macro is for internal use.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.