Specialized version of ‘code_units_column` that does not depend on `code_units_offset`, which is a more expensive operation. This is essentialy the same as `Prism::Source#column`.
Compile a name associated with a constant.
Regular gems take precedence over default gems
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.
Sets the encoding according to the BOM (Byte Order Mark) in the string.
Returns self
if the BOM is found, otherwise +nil.
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
an unresolved Gem::Specification
of default gem from path