Path of activations from the current
list.
Return a String
indicating who caused this request to be added (only valid for implicit requests)
Returns the path to the trusted certificate with the given ASN.1 name
Add a certificate to trusted certificate list.
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 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.
Returns the offset from the start of the file for the given byte offset counting in code units for the given encoding.
This method is tested with UTF-8, UTF-16, and UTF-32. If there is the concept of code units that differs from the number of characters in other encodings, it is not captured here.
Returns the column number in code units for the given encoding for the given byte offset.
Returns the offset from the start of the file for the given byte offset counting in code units for the given encoding.
This method is tested with UTF-8, UTF-16, and UTF-32. If there is the concept of code units that differs from the number of characters in other encodings, it is not captured here.
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`.
The character offset from the beginning of the source where this location ends.