Results for: "partition"

Display an error message in a location expected to get error messages. Will ask question if it is not nil.

Return a progress reporter object chosen from the current verbosity.

Return a download reporter object chosen from the current verbosity

do nothing

raise InvalidURIError

do nothing

Returns default port.

Returns default port.

Checks the password v component for RFC2396 compliance and against the URI::Parser Regexp for :USERINFO.

Can not have a registry or opaque component defined, with a user component defined.

Protected setter for the password component v.

See also URI::Generic.password=.

Returns the userinfo ui as [user, password] if properly formatted as ‘user:password’.

Escapes ‘user:password’ v based on RFC 1738 section 3.1.

Checks the port v component for RFC2396 compliance and against the URI::Parser Regexp for :PORT.

Can not have a registry or opaque component defined, with a port component defined.

Protected setter for the port component v.

See also URI::Generic.port=.

Checks the path v component for RFC2396 compliance and against the URI::Parser Regexp for :ABS_PATH and :REL_PATH.

Can not have a opaque component defined, with a path component defined.

Protected setter for the path component v.

See also URI::Generic.path=.

Checks the opaque v component for RFC2396 compliance and against the URI::Parser Regexp for :OPAQUE.

Can not have a host, port, user, or path component defined, with an opaque component defined.

Protected setter for the opaque component v.

See also URI::Generic.opaque=.

Merges a base path base, with relative path rel, returns a modified base path.

Calls the given block once for each key, value pair in the database.

Returns self.

Returns the one-character string which cause Encoding::UndefinedConversionError.

ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP")
begin
  ec.convert("\xa0")
rescue Encoding::UndefinedConversionError
  puts $!.error_char.dump   #=> "\xC2\xA0"
  p $!.error_char.encoding  #=> #<Encoding:UTF-8>
end

Returns the corresponding ASCII compatible encoding.

Returns nil if the argument is an ASCII compatible encoding.

“corresponding ASCII compatible encoding” is an ASCII compatible encoding which can represents exactly the same characters as the given ASCII incompatible encoding. So, no conversion undefined error occurs when converting between the two encodings.

Encoding::Converter.asciicompat_encoding("ISO-2022-JP") #=> #<Encoding:stateless-ISO-2022-JP>
Encoding::Converter.asciicompat_encoding("UTF-16BE") #=> #<Encoding:UTF-8>
Encoding::Converter.asciicompat_encoding("UTF-8") #=> nil

Inserts string into the encoding converter. The string will be converted to the destination encoding and output on later conversions.

If the destination encoding is stateful, string is converted according to the state and the state is updated.

This method should be used only when a conversion error occurs.

ec = Encoding::Converter.new("utf-8", "iso-8859-1")
src = "HIRAGANA LETTER A is \u{3042}."
dst = ""
p ec.primitive_convert(src, dst)    #=> :undefined_conversion
puts "[#{dst.dump}, #{src.dump}]"   #=> ["HIRAGANA LETTER A is ", "."]
ec.insert_output("<err>")
p ec.primitive_convert(src, dst)    #=> :finished
puts "[#{dst.dump}, #{src.dump}]"   #=> ["HIRAGANA LETTER A is <err>.", ""]

ec = Encoding::Converter.new("utf-8", "iso-2022-jp")
src = "\u{306F 3041 3068 2661 3002}" # U+2661 is not representable in iso-2022-jp
dst = ""
p ec.primitive_convert(src, dst)    #=> :undefined_conversion
puts "[#{dst.dump}, #{src.dump}]"   #=> ["\e$B$O$!$H".force_encoding("ISO-2022-JP"), "\xE3\x80\x82"]
ec.insert_output "?"                # state change required to output "?".
p ec.primitive_convert(src, dst)    #=> :finished
puts "[#{dst.dump}, #{src.dump}]"   #=> ["\e$B$O$!$H\e(B?\e$B!#\e(B".force_encoding("ISO-2022-JP"), ""]

Returns a new instance of the C struct with the value ty at the addr address.

Returns a new Fiddle::Pointer instance at the memory address of the given name symbol.

Raises a DLError if the name doesn’t exist.

See Fiddle::CompositeHandler.sym and Fiddle::Handle.sym

Search took: 5ms  ·  Total Results: 2583