Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

FileTest#readable_real?

File.readable_real?(file_name) → true or false

Returns true if the named file is readable by the real user and group id of this process. See access(3).

Note that some OS-level security features may cause this to return true even though the file is not readable by the real user/group.

See also #readable? #setgid? #pipe? #setuid? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0