File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ ossl_asn1cons_to_der(VALUE self)
12911291
static VALUE
12921292
ossl_asn1cons_each(VALUE self)
12931293
{
1294-
rb_funcall(ossl_asn1_get_value(self), id_each, 0);
1294+
rb_block_call(ossl_asn1_get_value(self), id_each, 0, 0, 0, 0);
12951295

12961296
return self;
12971297
}
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,13 @@ def test_decode_constructed_overread
566566
assert_equal 17, ret[0][6]
567567
end
568568

569+
def test_constructive_each
570+
data = [OpenSSL::ASN1::Integer.new(0), OpenSSL::ASN1::Integer.new(1)]
571+
seq = OpenSSL::ASN1::Sequence.new data
572+
573+
assert_equal data, seq.entries
574+
end
575+
569576
private
570577

571578
def assert_universal(tag, asn1)

0 commit comments

Comments
 (0)