Skip to content

Cleanup unused accessor methods inf REXML::Functions - #368

Open
tompng wants to merge 1 commit into
ruby:masterfrom
tompng:cleanup_functions_state
Open

Cleanup unused accessor methods inf REXML::Functions#368
tompng wants to merge 1 commit into
ruby:masterfrom
tompng:cleanup_functions_state

Conversation

@tompng

@tompng tompng commented Sep 1, 2026

Copy link
Copy Markdown
Member

Removes unused Functions.variables. It was write only, never read.
Removes Functions.namespace_context. It was only used from QuickPath, and QuickPath has been removed in #362

Removes unused Functions.variables. It was write only, never read.
Removes Functions.namespace_context. It was only used from QuickPath.
Copilot AI lite review requested due to automatic review settings September 1, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR cleans up dead state/accessors in REXML::FunctionsClass and removes now-unnecessary plumbing from the XPath parsers, following the earlier removal of QuickPath (#362).

Changes:

  • Removes the unused FunctionsClass#variables and #namespace_context accessors and their internal state.
  • Stops propagating namespaces/variables into FunctionsClass from both REXML::XPathParser and REXML::Parsers::XPathParser.
  • Tightens the singleton thread-safety note to reflect the remaining shared state.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/rexml/xpath_parser.rb Stops writing namespaces/variables into @functions; keeps variables coercion local to the parser.
lib/rexml/parsers/xpathparser.rb Removes the (now-unused) namespace propagation into Functions.
lib/rexml/functions.rb Removes unused accessor methods/state and updates the singleton thread-safety comment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants