The full path to the gem (install path + full name).
Full paths in the gem to add to $LOAD_PATH
when this gem is activated.
The name of the configuration file.
Helper method for grabbing elements from document
Like ‘take_while` except when it stops iterating, it also returns the line that caused it to stop
Returns the source encoding name as a string.
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.
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
Returns a string decoded from the given URL-encoded string str
.
The given string is first encoded as Encoding::ASCII-8BIT (using String#b
), then decoded (as below), and finally force-encoded to the given encoding enc
.
The returned string:
Preserves:
Characters '*'
, '.'
, '-'
, and '_'
.
Character in ranges 'a'..'z'
, 'A'..'Z'
, and '0'..'9'
.
Example:
URI.decode_www_form_component('*.-_azAZ09') # => "*.-_azAZ09"
Converts:
Character '+'
to character ' '
.
Each “percent notation” to an ASCII character.
Example:
URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A') # => "Here are some punctuation characters: ,;?:"
Related: URI.decode_uri_component
(preserves '+'
).
Full name of the tar entry
Compile a InstanceVariableOperatorWriteNode
node
@foo &&= bar
becomes
@foo && @foo = bar
@foo ||= bar
becomes
@foo || @foo = bar