Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Jul 7, 2025

In this context, Encoding means REXML::Encoding not Encoding.

In this context, `Encoding` means `REXML::Encoding` not `Encoding`.
@nobu
Copy link
Member

nobu commented Jul 7, 2025

There may be another issue.
REXML::Encoding#find_encoding may return a lower-case name if name has lower-case, and REXML::Encoding#encoding= compares the previous @encoding with it before upcase.
In that case, it returns true unexpectedly (probably).
Usually the return value of an assignment method affects nothing, but REXML::Source#encoding= calls super, so encoding_updated will be called even the encoding is unchanged actually.

@kou
Copy link
Member Author

kou commented Jul 7, 2025

Good point.

Let's fix it as a separated PR.

@kou kou merged commit 95b8ef8 into ruby:master Jul 7, 2025
67 checks passed
@kou kou deleted the fix-wrong-encodnig branch July 7, 2025 05:30
@kou
Copy link
Member Author

kou commented Jul 7, 2025

#259

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