Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Conversation

@gniquil
Copy link

@gniquil gniquil commented Oct 18, 2013

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

@gniquil you could do all this in one step by splitting on the pattern /\D*/ (any number of non-number characters)

I might also move line =~ /^-+/ into a named private method. The line would then look like:

line.split(/\D*/) unless separator_line?

Copy link
Author

Choose a reason for hiding this comment

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

Great point on both. Thanks for the feedback. I will change them soon.

Frank

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch there with a regex that will split out both numbers and periods 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants