End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Pathname#fnmatch
pathname.fnmatch(pattern, [flags]) → true or false
ext/pathname/pathname.c
View on GitHub ↗
static VALUE
path_fnmatch(int argc, VALUE *argv, VALUE self)
{
VALUE str = get_strpath(self);
VALUE pattern, flags;
if (rb_scan_args(argc, argv, "11", &pattern, &flags) == 1)
return rb_funcall(rb_cFile, id_fnmatch, 2, pattern, str);
else
return rb_funcall(rb_cFile, id_fnmatch, 3, pattern, str, flags);
}
Return true if the receiver matches the given pattern.
See File.fnmatch.