Returns the source encoding name as a string.
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.
Return all reachable objects from root.
Sets the basic list of characters that signal a break between words for rl_complete_internal(). The default is the value of Readline.basic_word_break_characters
.
Raises NotImplementedError
if the using readline library does not support.
Gets the basic list of characters that signal a break between words for rl_complete_internal().
Raises NotImplementedError
if the using readline library does not support.
Decodes given str
of URL-encoded form data.
This decodes + to SP.
Quietly ensure the Gem
directory dir
contains all the proper subdirectories for handling default gems. If we can’t create a directory due to a permission problem, then we will silently continue.
If mode
is given, missing directories are created with this mode.
World-writable directories will never be created.
Find
a Gem::Specification
of default gem from path
Full name of the tar entry
This integer returns the current initial length of the buffer.
This sets the initial length of the buffer to length
, if length
> 0, otherwise its value isn’t changed.
Returns every spec that has the given full_name