Returns the full file path of this frame.
Same as path
, except that it will return absolute path even if the frame is in the main script.
Iterates the given block for each element with an index, which starts from offset
. If no block is given, returns a new Enumerator
that includes the index, starting from offset
offset
the starting index to use
Returns a new lazy enumerator with the concatenated results of running block
once for every element in the lazy enumerator.
["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:
x
responds to both each and force, which means that x
is a lazy enumerator.
x
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}]
Load an iseq object from binary format String
object created by RubyVM::InstructionSequence.to_binary
.
This loader does not have a verifier, so that loading broken/modified binary causes critical problem.
You should not load binary data provided by others. You should use binary data translated by yourself.
Returns integer 80
, the default port to use for HTTP requests:
Net::HTTP.http_default_port # => 80
Returns integer 443
, the default port to use for HTTPS requests:
Net::HTTP.https_default_port # => 443
Sets the encoding to be used for the response body; returns the encoding.
The given value
may be:
An Encoding
object.
The name of an encoding.
An alias for an encoding name.
See Encoding
.
Examples:
http = Net::HTTP.new(hostname) http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII> http.response_body_encoding = 'US-ASCII' # => "US-ASCII" http.response_body_encoding = 'ASCII' # => "ASCII"
Returns integer 80
, the default port to use for HTTP requests:
Net::HTTP.http_default_port # => 80
Returns integer 443
, the default port to use for HTTPS requests:
Net::HTTP.https_default_port # => 443
Sets the encoding to be used for the response body; returns the encoding.
The given value
may be:
An Encoding
object.
The name of an encoding.
An alias for an encoding name.
See Encoding
.
Examples:
http = Net::HTTP.new(hostname) http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII> http.response_body_encoding = 'US-ASCII' # => "US-ASCII" http.response_body_encoding = 'ASCII' # => "ASCII"
Returns whether the request may have a body:
Net::HTTP::Post.new(uri).request_body_permitted? # => true Net::HTTP::Get.new(uri).request_body_permitted? # => false
Define --enable
/ --disable
style option
Appears as --enable-name
in help message.
Define --enable
/ --disable
style option
Appears as --disable-name
in help message.
Visit the child nodes of the given node.
Compile a AndNode
node
Compile a AssocNode
node
Compile a BeginNode
node
Compile a BlockNode
node
Compile a BreakNode
node
Compile a CallNode
node
Compile a CaseNode
node