fnmatch(p1, p2 = v2)
public
Return true if the receiver matches the given pattern.
See File.fnmatch.
Show source
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, rb_intern("fnmatch"), 2, pattern, str);
else
return rb_funcall(rb_cFile, rb_intern("fnmatch"), 3, pattern, str, flags);
}