Adapt code to frozen string literal, reduce string copies#456
Adapt code to frozen string literal, reduce string copies#456czj wants to merge 1 commit intokjvarga:masterfrom
Conversation
|
hi @kjvarga are you open to taking this? |
|
@czj hello! I'm a bit nervous to merge this PR since CI didn't run. Do you know how to trigger CI? Thank you! |
Hi! I don't know why the CI didn't trigger automatically for this particular repo. Is it a configuration issue with a forked repo, or a problem on my side? |
|
@czj I finally managed to run the CI : it's not all green 😢 |
|
Oh, I see. Will try to fix ASAP ! Thanks 🙂
|
|
might be worth not supporting ruby versions |
@kjvarga wdyt? |
|
@n-rodriguez I'm okay with it for a new major release. It'll simplify some things, which is a plus. |
|
I vote for sitemap_generator 7.0! The latest release is 6.3 from 2022 right? |
Indeed, only 3.2, 3.3, and 3.4 are supported as of 2025. |
|
Let me know if you want to drop support for Ruby < 3.0 and I’ll remove it from CI. If you’d prefer, I can also adapt the code for Ruby 2.6+. I’m happy to do either :) |
|
I think support for < 3.0 should be removed anyway, as older rubies do not receive security updates:
PR looks good to me. Although, to fix CI issues with older rubies I think it's enough to leave plus here: @xml_wrapper_start = +<<-HTML
Also it'd be better to use squiggly heredoc |
|
@kjvarga everything is ready for a |
|
Sounds good! Will email you |
Avoids last frozen string literal warnings by implying the passed string will always be frozen in upcoming Ruby versions.
Also reduces object allocations, including string copies, arrays, and maps, backported partly from #445 which it replaces.