@@ -2253,13 +2253,24 @@ rb_file_rowned_p(VALUE obj, VALUE fname)
22532253
22542254/*
22552255 * call-seq:
2256- * File.grpowned?(file_name) -> true or false
2256+ * File.grpowned?(object) -> true or false
22572257 *
2258- * Returns <code>true</code> if the named file exists and the
2259- * effective group id of the calling process is the owner of
2260- * the file. Returns <code>false</code> on Windows.
2258+ * Returns whether the filesystem entry for the given +object+ exists,
2259+ * and the effective group id of the calling process is the owner of the entry.
22612260 *
2262- * _file_name_ can be an IO object.
2261+ * The given +object+ may be the string path to a file or directory entry:
2262+ *
2263+ * File.grpowned?('lib') # => true
2264+ * File.grpowned?('README.md') # => true
2265+ * File.grpowned?('/etc/passwd') # => false
2266+ * File.grpowned?('nosuch') # => false
2267+ *
2268+ * Or an open IO stream:
2269+ *
2270+ * File.open('README.md', 'r') {|file| File.grpowned?(file) } # => true
2271+ * File.open('/etc/passwd', 'r') {|file| File.grpowned?(file) } # => false
2272+ *
2273+ * Returns +false+ on Windows.
22632274 */
22642275
22652276static VALUE
@@ -6374,15 +6385,19 @@ rb_stat_rowned(VALUE obj)
63746385}
63756386
63766387/*
6377- * call-seq:
6378- * stat.grpowned? -> true or false
6388+ * call-seq:
6389+ * stat.grpowned?(path) -> true or false
6390+ *
6391+ * Returns whether the filesystem entry for the given string +path+ exists,
6392+ * and the effective group id of the calling process is the owner of the entry:
63796393 *
6380- * Returns true if the effective group id of the process is the same as
6381- * the group id of <i>stat</i>. On Windows, returns <code>false</code>.
6394+ * File.stat('README.md').grpowned? # => true
6395+ * File.stat('lib').grpowned? # => true
6396+ * File.stat('/etc/passwd').grpowned? # => false
63826397 *
6383- * File.stat("testfile").grpowned? #=> true
6384- * File.stat("/etc/passwd").grpowned? #=> false
6398+ * Raises an exception if there is no entry at the given +path+.
63856399 *
6400+ * Returns +false+ on Windows.
63866401 */
63876402
63886403static VALUE
0 commit comments