Skip to content

Fall back to REXML when nokogiri is not installed - #46

Merged
ashie merged 1 commit into
fluent:masterfrom
Watson1978:fix-rexml-fallback
Oct 15, 2026
Merged

ashie merged 1 commit into
fluent:masterfrom
Watson1978:fix-rexml-fallback

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Since #40, nokogiri is optional and the parsers should fall back to REXML. But a bare rescue does not catch LoadError, so configure fails when nokogiri is not installed, even with the default parser auto. This rescues LoadError explicitly, so the fallback works and parser nokogiri raises the intended ConfigError.

🤖 Generated with Claude Code

A bare rescue only catches StandardError, so the LoadError from
require 'nokogiri' escaped and configure failed with the default
'parser auto'. With 'parser nokogiri', the intended ConfigError
was never raised either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978
Watson1978 requested a review from ashie October 15, 2026 10:09
@ashie

ashie commented Oct 15, 2026

Copy link
Copy Markdown
Member

Oops, thanks catching this!

@ashie
ashie merged commit 5b02aca into fluent:master Oct 15, 2026
16 checks passed
@ashie ashie mentioned this pull request Oct 16, 2026
@Watson1978
Watson1978 deleted the fix-rexml-fallback branch October 16, 2026 00:24
@Watson1978

Copy link
Copy Markdown
Contributor Author

Thanks

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