Results for: "Dir.chdir"

No documentation available

The version requirement for this dependency request

No documentation available
No documentation available

If the stream begins with a BOM (byte order marker), consumes the BOM and sets the external encoding accordingly; returns the result encoding if found, or nil otherwise:

File.write('t.tmp', "\u{FEFF}abc")
io = File.open('t.tmp', 'rb')
io.set_encoding_by_bom # => #<Encoding:UTF-8>
io.close

File.write('t.tmp', 'abc')
io = File.open('t.tmp', 'rb')
io.set_encoding_by_bom # => nil
io.close

Raises an exception if the stream is not binmode or its encoding has already been set.

No documentation available

Returns true, if circular data structures should be checked, otherwise returns false.

No documentation available

Sets the encoding to be used for the response body; returns the encoding.

The given value may be:

See Encoding.

Examples:

http = Net::HTTP.new(hostname)
http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII>
http.response_body_encoding = 'US-ASCII'         # => "US-ASCII"
http.response_body_encoding = 'ASCII'            # => "ASCII"
No documentation available

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

def forced_utf8_encoding?: () -> bool

def forced_binary_encoding?: () -> bool

No documentation available
Search took: 5ms  ·  Total Results: 1391