split()
public
Show source
static VALUE
path_split(VALUE self)
{
VALUE str = get_strpath(self);
VALUE ary, dirname, basename;
ary = rb_funcall(rb_cFile, id_split, 1, str);
ary = rb_check_array_type(ary);
dirname = rb_ary_entry(ary, 0);
basename = rb_ary_entry(ary, 1);
dirname = rb_class_new_instance(1, &dirname, rb_obj_class(self));
basename = rb_class_new_instance(1, &basename, rb_obj_class(self));
return rb_ary_new3(2, dirname, basename);
}