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

[GR-44710] Fix String#slice with negative offset #3800

Merged
merged 4 commits into from
Feb 26, 2025

Conversation

graalvmbot
Copy link
Collaborator

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 25, 2025
@graalvmbot graalvmbot force-pushed the ak/fix-liquid-gem-tests branch from a867d2a to 7dea533 Compare February 25, 2025 16:09
This fix resolves the issue with String#slice(index, offset) called with negative offset.
#slice should return `nil` when offset is negative but returned a String itself:

```ruby
"foobar".slice(0, -1) #=> "foobar"
```
@graalvmbot graalvmbot force-pushed the ak/fix-liquid-gem-tests branch from 7dea533 to be9d64f Compare February 25, 2025 16:39
@graalvmbot graalvmbot closed this Feb 26, 2025
@graalvmbot graalvmbot deleted the ak/fix-liquid-gem-tests branch February 26, 2025 10:57
@graalvmbot graalvmbot merged commit 87fe4ae into master Feb 26, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants