End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
FileTest#grpowned?
File.grpowned?(file_name) → true or false
file.c
View on GitHub ↗
static VALUE
rb_file_grpowned_p(VALUE obj, VALUE fname)
{
#ifndef _WIN32
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
if (rb_group_member(st.st_gid)) return Qtrue;
#endif
return Qfalse;
}
Returns true if the named file exists and the effective group id of the calling process is the owner of the file. Returns false on Windows.
file_name can be an IO object.