Skip to content

MatchData: refactor to_s#4575

Merged
asterite merged 1 commit intocrystal-lang:masterfrom
makenowjust:fix/regex-match-data/refactor-to-s
Sep 10, 2017
Merged

MatchData: refactor to_s#4575
asterite merged 1 commit intocrystal-lang:masterfrom
makenowjust:fix/regex-match-data/refactor-to-s

Conversation

@makenowjust
Copy link
Copy Markdown
Contributor

It's a tiny refactoring.

Comment thread src/regex/match_data.cr
io << ":"
self[i]?.inspect(io)
end
io << name_table.fetch(i) { i } << ":" if i > 0
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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