From 1cc1d9a74ede52f3d9ce774cafb11c57b3905165 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 16 Jul 2024 11:27:57 +0900 Subject: [PATCH] Suppress have_root not initialized warnings on Ruby < 3 --- lib/rexml/parsers/baseparser.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index e8f1a069..860be203 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -165,6 +165,7 @@ def add_listener( listener ) def stream=( source ) @source = SourceFactory.create_from( source ) @closed = nil + @have_root = false @document_status = nil @tags = [] @stack = []