lib/rasn1.rb in rasn1-0.8.0 vs lib/rasn1.rb in rasn1-0.9.0
- old
+ new
@@ -44,10 +44,10 @@
def self.parse(der, ber: false)
root = nil
until der.empty?
type = Types.id2type(der)
type.parse!(der, ber: ber)
- root = type if root.nil?
+ root ||= type
if [Types::Sequence, Types::Set].include? type.class
subder = type.value
ary = []
until subder.empty?