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: refactor to_s #4575

Merged

Conversation

makenowjust
Copy link
Contributor

It's a tiny refactoring.

io << ":"
self[i]?.inspect(io)
end
io << name_table.fetch(i) { i } << ":" if i > 0
Copy link
Member

Choose a reason for hiding this comment

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

Just a minor thing, but fetch(i, i) would be easier to read

Copy link
Contributor Author

Choose a reason for hiding this comment

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

name_table.fetch(i) { i } appears three times in match_data.cr. I would like to fix all them, so I'll create a new pull request after merging this.

@Sija
Copy link
Contributor

Sija commented Sep 10, 2017

Is it GTG? Lets 🎲

@asterite asterite merged commit 7369daa into crystal-lang:master Sep 10, 2017
@RX14 RX14 added this to the Next milestone Sep 10, 2017
@makenowjust makenowjust deleted the fix/regex-match-data/refactor-to-s branch September 11, 2017 01:19
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.

5 participants