Here's the Pull Request and commit that introduced the change.
The Pull Request shows that the purpose of the change is to fix a memory allocation issue.
On large projects with a number of Rubygems it can reduce String allocations by nearly
50%. I think this is an acceptable bug fix with respect to SemVer.
Additionally, SemVer is around versioning of the public API. As the Gem specification
source that is generated by Rubygems is not actually part of the public API, I don't
even think SemVer applies. Modifying them (via sed, no less) is akin to monkey-patching
private methods, which is not covered by SemVer.
May I suggest that instead of using sed against the source, which could potentially
corrupt the file into invalid Ruby, that we use Ruby to parse Ruby itself? Since the file
is valid Ruby, Ripper could be use to parse the source, manipulate the S-expressions, and
then emit the valid, modified Ruby. This feels more forward-compatible in the long run.