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

MatchData: support negative index #4566

Conversation

makenowjust
Copy link
Contributor

Now it works:

m = "foo".match(/(f)(oo)/).not_nil!
m[-1] # => "oo"
m[-2] # => "f"
m[-3] # => "foo"

@asterite
Copy link
Member

This now needs a rebase because of #4567

@makenowjust makenowjust force-pushed the feature/regex-match-data/support-negative-index branch from 67323fd to edb10b5 Compare June 15, 2017 15:02
@makenowjust
Copy link
Contributor Author

@asterite Done git rebase.

@asterite asterite added this to the Next milestone Jun 20, 2017
@asterite asterite merged commit 2f5f9bf into crystal-lang:master Jun 20, 2017
@asterite
Copy link
Member

@makenowjust Thank you!

@makenowjust makenowjust deleted the feature/regex-match-data/support-negative-index branch August 7, 2017 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants