Skip to content
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

Merged
merged 1 commit into from
May 26, 2023

Conversation

itarato
Copy link
Collaborator

@itarato itarato commented May 10, 2023

Source: #3039

String#bytesplice has been added. [Feature #18598]

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 10, 2023
@itarato itarato self-assigned this May 10, 2023
@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch from cf890bd to f8d22cc Compare May 10, 2023 20:32
@itarato itarato marked this pull request as ready for review May 12, 2023 12:41
Copy link
Member

@andrykonchin andrykonchin left a 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.

spec/ruby/core/string/bytesplice_spec.rb Outdated Show resolved Hide resolved
spec/ruby/core/string/bytesplice_spec.rb Show resolved Hide resolved
spec/ruby/core/string/bytesplice_spec.rb Outdated Show resolved Hide resolved
spec/ruby/core/string/bytesplice_spec.rb Outdated Show resolved Hide resolved
src/main/ruby/truffleruby/core/string.rb Outdated Show resolved Hide resolved
src/main/ruby/truffleruby/core/string.rb Outdated Show resolved Hide resolved
@itarato itarato requested a review from andrykonchin May 18, 2023 15:33
spec/ruby/core/string/bytesplice_spec.rb Outdated Show resolved Hide resolved
spec/ruby/core/string/bytesplice_spec.rb Outdated Show resolved Hide resolved
spec/ruby/core/string/bytesplice_spec.rb Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@andrykonchin
Copy link
Member

andrykonchin commented May 19, 2023

Could you also add a spec file to the next specs list spec/truffleruby.next-specs?
#3043 (comment)

And have 2 commits squashed into one?

@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch from 4978506 to afd4822 Compare May 23, 2023 15:35
@itarato
Copy link
Collaborator Author

itarato commented May 23, 2023

Could you also add a spec file to the next specs list spec/truffleruby.next-specs? #3043 (comment)

And have 2 commits squashed into one?

Done.

@andrykonchin
Copy link
Member

andrykonchin commented May 23, 2023

Probably the failed spec public methods on String should not include bytesplice should be tagged as failed to have it skipped.

 :valid_encoding?]
not to include :bytesplice
/home/runner/work/truffleruby/truffleruby/spec/truffle/methods_spec.rb:91:in `block (5 levels) in <top (required)>'

@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch 2 times, most recently from d20b8be to 37088e5 Compare May 23, 2023 17:45
@itarato itarato requested a review from andrykonchin May 24, 2023 13:36
@andrykonchin andrykonchin added the in-ci The PR is being tested in CI. Do not push new commits. label May 24, 2023
src/main/ruby/truffleruby/core/string.rb Outdated Show resolved Hide resolved
src/main/ruby/truffleruby/core/string.rb Outdated Show resolved Hide resolved
src/main/ruby/truffleruby/core/string.rb Show resolved Hide resolved
@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch from 37088e5 to 1c24ac5 Compare May 25, 2023 14:36
@andrykonchin andrykonchin removed the in-ci The PR is being tested in CI. Do not push new commits. label May 25, 2023
@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch 2 times, most recently from 644dfa6 to 20472b3 Compare May 25, 2023 16:23
@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch from 20472b3 to 8f0776f Compare May 25, 2023 18:45
@itarato itarato force-pushed the feature/PA-3039-string-bytesplice branch from 8f0776f to f0cbd62 Compare May 25, 2023 18:46
@itarato itarato requested a review from eregon May 25, 2023 18:58
@eregon eregon added the in-ci The PR is being tested in CI. Do not push new commits. label May 26, 2023
end
end

len = bytesize - start if len > bytesize - start
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed there.

@graalvmbot graalvmbot merged commit 2372d09 into oracle:master May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-ci The PR is being tested in CI. Do not push new commits. OCA Verified All contributors have signed the Oracle Contributor Agreement. shopify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants