Returns the file name of this frame.
For example, using caller_locations.rb
from Thread::Backtrace::Location
loc = c(0..1).first loc.path #=> caller_locations.rb
@return [Object] the requirement that led to ‘requirement` being added
to the list of requirements.
Add the current {#possibility} to the dependency graph of the current {#state} @return [void]
Get all [gem, version] from the command line.
An argument in the form gem:ver is pull apart into the gen name and version, respectively.
Finds a spec and the source_uri it came from for gem gem_name
and version
. Returns an Array of specs and sources required for installation of the gem.
In case we’re building docs in a background process, this method waits for that process to exit (or if it’s already been reaped, or never happened, swallows the Errno::ECHILD error).
Returns a new lazy enumerator with the concatenated results of running block once for every element in lazy.
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force #=> ["f", "o", "o", "b", "a", "r"]
A value x returned by block is decomposed if either of the following conditions is true:
a) <i>x</i> responds to both each and force, which means that <i>x</i> is a lazy enumerator. b) <i>x</i> is an array or responds to to_ary.
Otherwise, x is contained as-is in the return value.
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force #=> [{:a=>1}, {:b=>2}]
bn.num_bits => integer
bn.set_bit!(bit) -> self
Returns boolean of whether bit
is set. Bitwise operations for openssl BIGNUMs.
bn.bit_set?(bit) => true | false
Emit a scalar with value
and tag
This method is called when a parse error is found.
ERROR_TOKEN_ID is an internal ID of token which caused error. You can get string representation of this ID by calling token_to_str
.
ERROR_VALUE is a value of error token.
value_stack is a stack of symbol values. DO NOT MODIFY this object.
This method raises ParseError
by default.
If this method returns, parsers enter “error recovering mode”.
This method is called when some event handler is undefined. event
is :on_XXX, token
is the scanned token, and data
is a data accumulator.
The return value of this method is passed to the next event handler (as of Enumerable#inject
).
Same as IO
.