Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Pathname#grpowned?
() -> bool
grpowned? → true or false
pathname_builtin.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/pathname_builtin.rb, line 2402
def grpowned?() FileTest.grpowned?(@path) end
Returns false on Windows.
On other systems, returns whether the effective group id of the calling process is the owner of the entry at the path in self:
Example
# => "/tmp/t.tmp" File.write(filepath, 'foo') Pathname(filepath).grpowned? # => true Pathname('/etc').grpowned? # => false Pathname('/etc/passwd').grpowned? # => false Pathname('nosuch').grpowned? # => false File.delete(filepath) # Clean up.