Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[ji] RubyString implements CharSequence #5180
knew I saw a draft of this somewhere but did not find it until I checked some old PRs :)
... there's an opportunity here to have
but its a breaking change in 2 ways :
both seem acceptable for a major release such as 9.2 (we sure can not do this in a minor one)
other way to avoid conversion (when seeing
I have no issues with the actual code changes here.
I do worry about the length method changing signature but it does seem unlikely someone would use that rather than "strLength", and that's backward-compatible until everyone can be assured the "IRubyObject length()" is gone. We haven't really had a chance to verify this with any third-party extensions, though.
In general, I like this change at 9.2. I think we need to be more bold these days.
posting some micro-benchmarking numbers :
... instead of testing 'real-world' the case tries to do