Skip to content

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

instance method

IO#external_encoding

io.external_encoding → encoding

Returns the Encoding object that represents the encoding of the file. If io is in write mode and no encoding is specified, returns nil.

See also #expect #fcntl #erase_screen #fdatasync also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1