-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Compatibility] Add String#bytesplice
#3044
[Compatibility] Add String#bytesplice
#3044
Conversation
cf890bd
to
f8d22cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
It's a bit unusual to have such complex arguments validation/coercion logic implemented in Ruby but I suppose it's OK.
f8d22cc
to
fe7c4c8
Compare
Could you also add a spec file to the And have 2 commits squashed into one? |
4978506
to
afd4822
Compare
Done. |
Probably the failed spec
|
d20b8be
to
37088e5
Compare
37088e5
to
1c24ac5
Compare
644dfa6
to
20472b3
Compare
src/main/java/org/truffleruby/core/encoding/IsCharacterHeadNode.java
Outdated
Show resolved
Hide resolved
20472b3
to
8f0776f
Compare
8f0776f
to
f0cbd62
Compare
end | ||
end | ||
|
||
len = bytesize - start if len > bytesize - start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primitive.min
would be nicer here, but let's do that in #3043 since this PR is in the merge queue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed there.
Source: #3039
String#bytesplice has been added. [Feature #18598]