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

@makenowjust makenowjust commented Jun 15, 2017

It's a tiny refactoring.

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

@straight-shoota straight-shoota Jun 16, 2017

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

@makenowjust makenowjust Jun 19, 2017

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 Sija commented Sep 10, 2017

Is it GTG? Lets 🎲

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

5 participants