From a4e2fa8e009fc5f90c5812c8cb3224fd924b9282 Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Mon, 6 Oct 2025 21:22:29 +0200 Subject: [PATCH] Use `coefficient_ring` in serialization --- src/Serialization/Rings.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serialization/Rings.jl b/src/Serialization/Rings.jl index 0cf3dbe4a3bc..ce67e1110503 100644 --- a/src/Serialization/Rings.jl +++ b/src/Serialization/Rings.jl @@ -144,7 +144,7 @@ end # elements function save_object(s::SerializerState, p::Union{UniversalPolyRingElem, MPolyRingElem}) # we use this line instead of typeof(coeff(p, 1)) to catch the 0 polynomial - coeff_type = elem_type(base_ring(parent(p))) + coeff_type = elem_type(coefficient_ring(p)) save_data_array(s) do for i in 1:length(p) save_data_array(s) do