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

Make String#sub raise IndexError if index is equal to size #14458

Merged

Conversation

HertzDevil
Copy link
Contributor

Previously this would raise Negative count (ArgumentError) instead, unlike any other out-of-bound index.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:text labels Apr 8, 2024
@straight-shoota straight-shoota added this to the 1.13.0 milestone Apr 9, 2024
@straight-shoota straight-shoota merged commit 0c67224 into crystal-lang:master Apr 12, 2024
58 checks passed
@HertzDevil HertzDevil deleted the bug/string-sub-int-indexerror branch April 15, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants