From cfa8dd90077000f21f55a6b7e5f041e2b4fd5e04 Mon Sep 17 00:00:00 2001 From: NAITOH Jun Date: Sat, 22 Jun 2024 14:21:28 +0900 Subject: [PATCH] Don't include private_constant-ed module (#155) Included constants are not private. So private constants in private module aren't private. See also: https://github.com/ruby/rexml/pull/154#discussion_r1649469269 --- lib/rexml/parsers/baseparser.rb | 13 ++++++------- lib/rexml/source.rb | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index a003ac29..c83e7958 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -134,7 +134,6 @@ module Private ENTITYDECL_PATTERN = /(?:#{GEDECL_PATTERN})|(?:#{PEDECL_PATTERN})/um end private_constant :Private - include Private def initialize( source ) self.stream = source @@ -302,7 +301,7 @@ def pull_event raise REXML::ParseException.new( "Bad ELEMENT declaration!", @source ) if md.nil? return [ :elementdecl, "