Flags for shareable constant nodes.
A module responsible for deserializing parse results.
Mixin methods for local and remote Gem::Command
options.
This module is used for safely loading Marshal
specs from a gem. The ‘safe_load` method defined on this module is specifically designed for loading Gem specifications.
A stub yaml serializer that can handle only hashes and strings (as of now).
Extends Fiddle::Closure
to allow for building the closure in a block
Raised when the buffer cannot be allocated for some reason, or you try to use a buffer that’s not allocated.
An optional constant field represents a constant value on a node that may or may not be present. It resolves to either a symbol or nil in Ruby.
An optional location field represents the location of some part of the node in the source code that may or may not be present. It resolves to either a Prism::Location
or nil in Ruby.
Raised when a tar file is corrupt
Shows the context around code provided by “falling” indentation
If this is the original code lines:
class OH def hello it "foo" do end end
And this is the line that is captured
it "foo" do
It will yield its surrounding context:
class OH def hello end end
Example:
FallingIndentLines.new( block: block, code_lines: @code_lines ).call do |line| @lines_to_output << line end
The top-level class representing any ASN.1 object. When parsed by ASN1.decode
, tagged values are always represented by an instance of ASN1Data
.
ASN1Data
for parsing tagged values When encoding an ASN.1 type it is inherently clear what original type (e.g. INTEGER, OCTET STRING etc.) this value has, regardless of its tagging. But opposed to the time an ASN.1 type is to be encoded, when parsing them it is not possible to deduce the “real type” of tagged values. This is why tagged values are generally parsed into ASN1Data
instances, but with a different outcome for implicit and explicit tagging.
An implicitly 1-tagged INTEGER value will be parsed as an ASN1Data
with
tag equal to 1
tag_class equal to :CONTEXT_SPECIFIC
value equal to a String
that carries the raw encoding of the INTEGER.
This implies that a subsequent decoding step is required to completely decode implicitly tagged values.
An explicitly 1-tagged INTEGER value will be parsed as an ASN1Data
with
tag equal to 1
tag_class equal to :CONTEXT_SPECIFIC
value equal to an Array
with one single element, an instance of OpenSSL::ASN1::Integer
, i.e. the inner element is the non-tagged primitive value, and the tagging is represented in the outer ASN1Data
int = OpenSSL::ASN1::Integer.new(1, 0, :IMPLICIT) # implicit 0-tagged seq = OpenSSL::ASN1::Sequence.new( [int] ) der = seq.to_der asn1 = OpenSSL::ASN1.decode(der) # pp asn1 => #<OpenSSL::ASN1::Sequence:0x87326e0 # @indefinite_length=false, # @tag=16, # @tag_class=:UNIVERSAL, # @tagging=nil, # @value= # [#<OpenSSL::ASN1::ASN1Data:0x87326f4 # @indefinite_length=false, # @tag=0, # @tag_class=:CONTEXT_SPECIFIC, # @value="\x01">]> raw_int = asn1.value[0] # manually rewrite tag and tag class to make it an UNIVERSAL value raw_int.tag = OpenSSL::ASN1::INTEGER raw_int.tag_class = :UNIVERSAL int2 = OpenSSL::ASN1.decode(raw_int) puts int2.value # => 1
int = OpenSSL::ASN1::Integer.new(1, 0, :EXPLICIT) # explicit 0-tagged seq = OpenSSL::ASN1::Sequence.new( [int] ) der = seq.to_der asn1 = OpenSSL::ASN1.decode(der) # pp asn1 => #<OpenSSL::ASN1::Sequence:0x87326e0 # @indefinite_length=false, # @tag=16, # @tag_class=:UNIVERSAL, # @tagging=nil, # @value= # [#<OpenSSL::ASN1::ASN1Data:0x87326f4 # @indefinite_length=false, # @tag=0, # @tag_class=:CONTEXT_SPECIFIC, # @value= # [#<OpenSSL::ASN1::Integer:0x85bf308 # @indefinite_length=false, # @tag=2, # @tag_class=:UNIVERSAL # @tagging=nil, # @value=1>]>]> int2 = asn1.value[0].value[0] puts int2.value # => 1
Generic exception class of the Timestamp
module.
This class represents a YAML Alias. It points to an anchor
.
A Psych::Nodes::Alias
is a terminal node and may have no children.
This class represents a YAML Scalar.
This node type is a terminal node and should not have any children.
TimeStamp
struct
Raised if you try to access a buffer slice which no longer references a valid memory range of the underlying source.
Dummy session storage class.
Implements session storage place holder. No actual storage will be done.